Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Project selected and expanded on creation
Project selected and expanded on creation [message #510440] Wed, 27 January 2010 14:26 Go to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Eclipse community,

I have a Project creation wizard with a custom perspective, in this
prespective I use "Project Explorer" view and I would like on project
creation have the newly created project selected and expanded.
But I don't find API to control Project Explorer UI elements, Project
Explorer seems to be usable with CNF. But I don't find any more help in
CNF side.

Someone have an idea of how to do that?

Thanks.
Re: Project selected and expanded on creation [message #510611 is a reply to message #510440] Thu, 28 January 2010 00:12 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
You can get the Project Explorer ViewPart which is an instance of the CommonNavgiator. From the CommonNavigator you can get its viewer, using getCommonViewer(). This viewer is a TreeViewer subclass so you can do the usual things to select and expand. The view ID for the project explorer is in ProjectExplorer.VIEW_ID.

Re: Project selected and expanded on creation [message #511359 is a reply to message #510611] Mon, 01 February 2010 11:59 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Thanks Francis,

I have done that in the Wizard.dispose() method in a Display.asynExec()
Runnable to have a IWorkbenchPage != null, and it works.

Thanks.

Francis Upton wrote:
> You can get the Project Explorer ViewPart which is an instance of the
> CommonNavgiator. From the CommonNavigator you can get its viewer, using
> getCommonViewer(). This viewer is a TreeViewer subclass so you can do
> the usual things to select and expand. The view ID for the project
> explorer is in ProjectExplorer.VIEW_ID.
Previous Topic:How soon after BundleActivator#start() can I print to the console?
Next Topic:Bundle error in org.eclipse.e4.ui.widgets-rap
Goto Forum:
  


Current Time: Thu Apr 25 13:19:28 GMT 2024

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

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

Back to the top