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.
|Summary:||Properties panel should be updated for the selected XML element|
|Product:||xml||Reporter:||Asgeir Asgeirsson <asgeir>|
|Component:||Text-Edit||Assignee:||_ pkuzel <pkuzel>|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
|Bug Depends on:||17868|
Description Asgeir Asgeirsson 2002-04-12 17:16:25 UTC
Then the caret position of the XML text editor is located inside an XML element (or node), the properties for that element should be shown in the properties panel. The properties panel should be consistent to the properties panel for the element in the tree view. Properties and Customize actions should be available in the context menu and should have the same effect as the same actions in the context menu of the tree editor. The properties window should be refreshed in the same way as done in the the java source editor. In the java editor, the properties are shown for methods, but the XML editor should show them for Nodes.
Comment 1 _ pkuzel 2002-04-12 17:21:49 UTC
Implementation is not so trivial. It requires position information. It in fact means that we must rewrite Xerces 2 XMLScanner to provide them (no ouf-of-stock parser provides position info). Once having those positions we need their mapping to XML document model (beware text editor must stay independent on tree editor).
Comment 2 Asgeir Asgeirsson 2002-04-12 18:21:56 UTC
Isn't it possible to traverse up tree of Syntax elements in the XML editor, collect the path information and traverse down coresponding DOM tree to locate the node?
Comment 3 _ pkuzel 2002-04-12 18:30:27 UTC
It is a possibility. But: - it does not scale well - it does not work for any DTD (internal) related stuff On the other hand it sounds pretty simple and therefore worthy to try it.
Comment 4 _ pkuzel 2002-06-03 12:26:17 UTC
Let these are considered while planning next release.
Comment 5 Marek Grummich 2002-07-19 16:58:18 UTC
Target milestone was changed from not determined to TBD
Comment 6 Asgeir Asgeirsson 2002-10-16 18:42:54 UTC
I have implemented this. I added getProperties() method to the org.netbeans.modules.xml.api.model.GrammarQuery interface, taking HintContext as parameter. If the GrammarQuery being used by an XML document returns Node.Property array, it is displayed in the properties panel. To allow GrammarQuery implementations to update attribute values using the HintContext, I had to implement the setValue() method in org.netbeans.modules.xml.text.syntax.dom.AttrImpl and the setAttribute() method in org.netbeans.modules.xml.text.syntax.dom.Tag. If the GrammarQuery.getProperties() method returns null value, the Properties panel displays the attributes of the selected element in the text editor.
Comment 7 _ pkuzel 2002-10-17 10:27:51 UTC
Nice work. I'm not sure if making syntax.dom mutable is correct approach because it violates HintContext interface specification promising read-only DOM. It may appear as problem in future. However extreme programing paradigm allows it :-).
Comment 8 _ pkuzel 2003-02-06 10:38:28 UTC
This functionality is targeted to be a part of NetBeans 3.5 standard release. At this moment it is necessary to stabilize it fully, pass I18N checks, pass A11Y checks, pass UI checks and properly document it.