This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 39870 - need help ID for Java property sheet
Summary: need help ID for Java property sheet
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on: 31006
Blocks:
  Show dependency tree
 
Reported: 2004-02-10 11:22 UTC by John Jullion-ceccarelli
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Jullion-ceccarelli 2004-02-10 11:22:37 UTC
Please give the property sheet for Java nodes a
help ID. In the new prop sheet implementation, you
assign prop sheet help IDs as follows:

Return a String from
Node.getValue("propertiesHelpID") with the help id
that should be used for the *properties* of the
node (not the node itself).
Comment 1 Jan Pokorsky 2004-02-10 18:03:10 UTC
Hmm, but it does not work for me. The JavaNode's property sheet
contains two custom sets. So I used 

Nodes.setValue("textPropertiesHelpID", "...")
Nodes.setValue("ExecutionHelpID", "...")

in the constructor. But it results in using help intended for the node.

Is the syntax documented anywhere? I have glimpsed to nodes and
propertysheet apis without success.
Comment 2 John Jullion-ceccarelli 2004-02-10 18:54:53 UTC
Tim can comment more, but basically we just want one help ID for the
whole property sheet. The help IDs on the text and execution
properties are left-overs from 3.5, where each of these was a single
tab and therefore had its own help ID. Now the property sheet looks
for the help ID on the first propertySet in the property sheet, and if
it doesn't exist looks for a help ID for the property sheet itself.
All other propertySet help IDs are ignored.
Comment 3 _ tboudreau 2004-02-10 22:25:48 UTC
It's not documented anywhere yet - it was just implemented a couple days ago, as a last 
minute fix for the changes docs wants.

The only syntax the property sheet help button will look for on the *node* is 
"propertiesHelpID" - docs wants each tab have one help id for all the displayed properties, 
or in the case of "normal" property sheets, one help id for the entire property sheet.

On tabbed property sheet, it will call somePropertySet.getValue("helpID") to try to find a 
help id.  It will do this on the the first visible property set (should be programmatic order, 
therefore).

Here's how it works:  To enable/disable the help button, and find the right help ID, the 
property sheet will do the following:
 - Look for a helpID on the selected property, if any
 - If none, find the *first* visible property set, and call getValue("propertiesHelpID") on
   it.  "First" means:
      - For normal property sheets, getPropertySets[0]
      - For tabbed property sets, the lowest index property set with the current tab name.
         This is in whatever order they're added to the Sheet.Set.
 - If none, look for "propertiesHelpID" on the node

So, sorry if this wasn't clearly explained - for everybody *except* the form editor, it is just 
supply "propertiesHelpID" from their node.  For you, since the form editor is special and 
uses tabs, you need to do it using the key "helpID" on your property sets.  

As far as your other existing help ID's, if two sets with different id's appear on the same 
tab, John and Patrick, you guys need to work that out.
Comment 4 Jan Pokorsky 2004-02-12 11:46:58 UTC
Thanks for clarification.

Unfortunatelly it does not work.
PropertySheet.ProxyHelpProvider.getHelpCtx queries a current node for
"propertiesHelpID" and this is the issue. Most often you get a
FilterNode here but it does not delegate FeatureDescriptor.getValue to
its original. So you will have to modify the FilterNode implementation
or propose another solution to get help id.

Of course workaround exist propertySet[0].setValue("helpID").

In regards to the form editor, it does not add any tab to the java
node but even if its provider could override java node's propertiesHelpID.
Comment 5 _ tboudreau 2004-02-12 14:41:07 UTC
I created issue 40022 - FilterNode should delegate setValue().  Up to you if you want to 
make it block this issue or go with the workaround.  I can't think of any reason such a 
change would be incompatible, it should be doable.
Comment 6 Jan Pokorsky 2004-02-12 15:43:34 UTC
I make it block this. Petr N. wrote to issue #39583 he is going to
commit the change tomorrow. So I do not want to clutter the code vainly.
Comment 7 Jan Pokorsky 2004-02-13 15:46:01 UTC
Introduced help id for java node properties
propertiesHelpID=org.netbeans.modules.java.JavaNode.properties

The old help id org.netbeans.modules.java.JavaNode.textProperties is
obsoleted now.

/cvs/java/src/org/netbeans/modules/java/JavaNode.java,v1.98
/cvs/java/manifest.mf,v1.73