Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Hiding project name in CommonNavigator(CommonNavigator issue)
Hiding project name in CommonNavigator [message #550101] Thu, 29 July 2010 07:16 Go to next message
Janusz Dalecki is currently offline Janusz DaleckiFriend
Messages: 63
Registered: January 2010
Location: Sydney
Member
Is there a way of hiding root workspace project name when using CommonNavigator Framework?
I create one project called "Reports" and set its absolute location on drive c:\ using code below:
 
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("Reports") ;
if (!project.exists()) {
IProjectDescription desc = workspace.newProjectDescription("Reports");
desc.setLocation(new Path('c:\something'));
project.create(desc, null);
}

The Common Navigator shows main folder (project) "Reports" and under it all folders contained by the location I set using 'desc' object ('c:\something') which looks something like this:

Reports

  • Local

    • Blah1

  • Report

    • Blah3

  • Search

    • Blah4



That is all correct, but my question is whether I can somehow hide the very first node which is "Reports" that is not really a folder but just project name.
Re: Hiding project name in CommonNavigator [message #550128 is a reply to message #550101] Thu, 29 July 2010 08:49 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
Yes you can do this.

I'm not sure if you are using the navigator content extensions from org.eclipse.ui.navigator.resources or not.

If you are using them, then you will need to create a new navigator content extension that overrides the NCE that provides the resources. You can set the trigger point to the be IWOrkspaceRoot and then have its associated content provider provide the children of your project.

If you are not using the o.e.ui.navigator.resources, then you don't need to do the override.


Re: Hiding project name in CommonNavigator [message #550479 is a reply to message #550128] Fri, 30 July 2010 13:57 Go to previous message
Janusz Dalecki is currently offline Janusz DaleckiFriend
Messages: 63
Registered: January 2010
Location: Sydney
Member
Thanks Francis - I am trying it out
Previous Topic:Opening a view when an EMF Generated editor opens
Next Topic:Eclipse flags ALL XML tags as invalid.
Goto Forum:
  


Current Time: Thu Apr 25 07:46:15 GMT 2024

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

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

Back to the top