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.
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).
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.
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.
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.
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.
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.
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.
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