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 09:26 Go to next message
Esteban Dugueperoux is currently offline Esteban Dugueperoux
Messages: 309
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] Wed, 27 January 2010 19:12 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IV
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 06:59 Go to previous message
Esteban Dugueperoux is currently offline Esteban Dugueperoux
Messages: 309
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: Sat Aug 30 10:22:49 EDT 2014

Powered by FUDForum. Page generated in 0.07964 seconds