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.
To give users more of a hint at what type of value should be typed into properties that have a text entry (like the Name property of a Java class), the property editor dialog should be more flexible, instead of putting up the standard "string property editor dialog" which shows a very large textarea. This solution, though consistent through the properties that have text entry, is not elegant and may make users have to think that much longer to figure out what kind of value is expected. Suggestions are 1) Provide API so module developer can specify what the size of the text entry area (e.g. one line vs text area) 2) Provide API so that module developer can suppress the "..." from appearing in the property sheet (since it may not be necessary for user to have to open a whole other property editor to edit a name of a java class, for example.
reassigne to Tim, new owner of property editors.
Note that such things are normally done using nonnormative hints set on the property editor, which should be listed in the table in the Explorer API.
Attaching a patch which implements this enhancement. Node.Property objects can return Boolean.TRUE from getValue ("oneline") to hint to the property editor that it should use a JTextField, not a JTextArea. Node.Property objects can return Boolean.TRUE from getValue ("suppressCustomEditor") to hint to the property editor that it should return false from supportsCustomEditor(). The attached patch also allows a Node.Property to include user-visible instructions by returning a String from getValue ("instructions") Patch includes necessary docs modifications. Let me know if it is acceptable.
Created attachment 9242 [details] Patch implementing the enhancement for String editors
Note you'll still need to figure out which specific strings in the IDE should use the one-line editor and which should suppress the custom editor altogether, and probably create tasks for developers of those modules. The default behavior is unchanged.
Fixed in trunk, StringEditor.java 1.18 and StringCustomEditor.java 1.24. StringEditor now honors the following hints: "oneline" - Boolean - if true, use a JTextField "suppressCustomEditor" - don't show the custom editor button "instructions" - provide text instructions to display above the text field/area (also maps to accessible description)