Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Custom Common Navigator(Expand files showing their content)
Custom Common Navigator [message #1074330] Fri, 26 July 2013 14:12 Go to next message
Ayoub El Barji is currently offline Ayoub El BarjiFriend
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 10:41 Go to previous message
Daniel Mising name is currently offline Daniel Mising nameFriend
Messages: 9
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 10:42]

Report message to a moderator

Previous Topic:IConsolePageParticipant not found
Next Topic:Project with multiple natures: Icon precedence?
Goto Forum:
  


Current Time: Wed Apr 24 21:11:29 GMT 2024

Powered by FUDForum. Page generated in 0.03465 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top