我想使用 SWT 或 JFace 构建如下所示的树:http: //publib.boulder.ibm.com/infocenter/adiehelp/v5r1m1/topic/com.ibm.etools.xsdeditor.doc/images/ncalxml.gif
如何基于 XML 构建树?以及如何同步树和xml(当我更新树节点(或xml)时,xml(或树)应该同时更新)。
谁能给我一个教程?
我想使用 SWT 或 JFace 构建如下所示的树:http: //publib.boulder.ibm.com/infocenter/adiehelp/v5r1m1/topic/com.ibm.etools.xsdeditor.doc/images/ncalxml.gif
如何基于 XML 构建树?以及如何同步树和xml(当我更新树节点(或xml)时,xml(或树)应该同时更新)。
谁能给我一个教程?
Take a look at Structured Source Editors framework from WebTools project - http://www.eclipse.org/webtools/wst/components/sse/overview.html
Note it is pretty standalone, so you won't have to add whole WTP to your project.
It provides you a base class for editors with source/grid/design tabs, XML parser that properly handles broken code (XML is invalid when the user is typing so most parsers fail) and a DOM where you can listen for events.