| Common Navigator Content Provider [message #989224] |
Wed, 05 December 2012 04:50  |
Mat Mathiew Messages: 26 Registered: July 2012 |
Junior Member |
|
|
I am building an RCP application and I am using the Common Navigator.
When the user executes my custom project some files are created that I want to show in the navigator as children of the file that was executed in the navigator.
I do this by using a Content Provider. The problem is that right now these files are created in the project and then are duplicated as children of the file in the navigator because these children need to be IFiles to show them, as navigator supports also files that are in the workspace.
What should be the right approach to have these files appear only once as children and not again in workspace?Can I in some way create them outside of the projects and then load them as children?
For example in the example below I dont want to have the ChildrenFolder in the Project but I need in some way to load the ChildrenFiles as resources.
Attachment: nav.bmp
(Size: 317.10KB, Downloaded 178 times)
[Updated on: Wed, 05 December 2012 04:51] Report message to a moderator
|
|
|
| Re: Common Navigator Content Provider [message #991772 is a reply to message #989224] |
Thu, 20 December 2012 01:55  |
Ajinkya Dhumal Messages: 11 Registered: September 2011 |
Junior Member |
|
|
Hi Mat,
You can customize content of Navigator. There is provision that you can show objects in navigator which are not of type IResource.
For the same you need to edit plugin.xml file of Navigator plugin (In which you have used common navigator).
You can edit it visually also. Goto plugin.xml -> Extensions tab.
Add new node to org.eclipse.ui.navigator.navigatorContent.
You can see description of required fields as a tooltip of field name.
For details of available options, you can check for plugin.xml -> Extensions tab -> Open Extension Point Schema (Link below Extension details).
Hope this will be helpful.
Thanks & Regards,
Ajinkya
|
|
|
Powered by
FUDForum. Page generated in 0.01840 seconds