| Custom Common Navigator [message #1074330] |
Fri, 26 July 2013 10:12  |
Ayoub El Barji Messages: 15 Registered: April 2013 |
Junior Member |
|
|
Hi,
I am building an plugin application and I am using the common navigator.
I am using files with a .xmlprj extension ,(ex: toto.xmlprj). Those files are juste like xml files but containing xi:include of several xml files. One xmlprj file is calling all the needed xml file with xi:include.
The aim is to customise the common navigator, juste like when your click on a xmlprj file you can expand it and show all the xml files that is containing.
i managed doing this; First i parsed my xmlprj file with a Dom parser to obtain the xml files name and i use a contentprovider and labelprovider to show them in the navigator.
My Problem is i want to return xml files in the navigator not juste their labels!
i want when you doubleclick on a child(xml file) you can open the xml file in the editor.
I thank you in advance for your help.
Ayoub
|
|
|
| Re: Custom Common Navigator [message #1120240 is a reply to message #1074330] |
Sun, 29 September 2013 06:41  |
Daniel Mising name Messages: 5 Registered: April 2011 |
Junior Member |
|
|
Your content provider must be returning an array of objects from it's getChildren() method, try returning the included file resources from there.
Of course that could lead to an infinite depth of nested files if one were badly written, a more sophisticated approach would be to adapt the returned include nodes to IContributorResourceAdapter. You must then write your own instance of IContributorResourceAdapter which then returns the actual XML file resource. I used this approach to get image and label descriptors on one of my views for free, in that case the content provider was extended from WorkbenchContentProvider.
[Updated on: Sun, 29 September 2013 06:42] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01527 seconds