Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » "Go Into" a specific project in the package explorer
"Go Into" a specific project in the package explorer [message #695079] Sun, 10 July 2011 23:40 Go to next message
timm is currently offline timmFriend
Messages: 3
Registered: July 2011
Junior Member
Hi.

I'm currently listing all projects, via ResourcePlugin.getWorkspace().getRoot().getPlugins(), this is the easy part.

You know that you can "Go Into" a project by right-clicking it and selecting "Go Into" in the package explorer(of the JDT). I now want to do exactly that in my java code, I just don't know how. looking at the plugin.xml of org.eclipse.jdt.ui, I can only see the org.eclipse.jdt.ui.PackageExplorer class which
1) I can't use in my code(eclipse does not give me content assist for it)
2) I can't find in the source jar(org.eclipse.jdt.ui.source[...].jar)

Another alternative would be some kind of Filter I can apply to only show resources of a specific project(if that's possible).


So, I hope someone knows how to achieve what I want.
Re: "Go Into" a specific project in the package explorer [message #695262 is a reply to message #695079] Mon, 11 July 2011 11:47 Go to previous messageGo to next message
vinay  is currently offline vinay Friend
Messages: 26
Registered: March 2011
Junior Member
You will have to add org.eclipse.jdt.ui in your plugin.xml dependencies so that you can use org.eclipse.jdt.ui.PackageExplorer class while implementation.

For a specific project you can use ResourcePlugin.getWorkspace().getRoot().getProject(projectName) to get a specific project.

Thanks & regards,
Vinay

[Updated on: Mon, 11 July 2011 11:48]

Report message to a moderator

Re: "Go Into" a specific project in the package explorer [message #695369 is a reply to message #695262] Mon, 11 July 2011 15:43 Go to previous messageGo to next message
timm is currently offline timmFriend
Messages: 3
Registered: July 2011
Junior Member
Quote:
You will have to add org.eclipse.jdt.ui in your plugin.xml dependencies so that you can use org.eclipse.jdt.ui.PackageExplorer class while implementation.

I already did that.(org.eclipse.jdt.ui is 3.7 btw), but seems like there's no PackageExplorer class. I only get PackageExplorerContentProvider, PackageExplorerLabelProvider, PackageExplorerOpenActionProvider, PackageExplorerPart and PackageExplorerProblemsDecorator.


Quote:
For a specific project you can use ResourcePlugin.getWorkspace().getRoot().getProject(projectName) to get a specific project.

I know that. But what I want to achieve is the following:
- Let the user select a project from my project list. When he selects one, I want the PackageExplorer to "go into"(i.e. only show resources of) that project.

[Updated on: Tue, 12 July 2011 17:35]

Report message to a moderator

Re: "Go Into" a specific project in the package explorer [message #697117 is a reply to message #695369] Fri, 15 July 2011 15:06 Go to previous message
timm is currently offline timmFriend
Messages: 3
Registered: July 2011
Junior Member
I looked into it again, and it looks like the ProjectExplorer also has the "Go Into" functionality and since I use my own perspective and don't really want a JDT dependency, using the ProjectExplorer is more appropriate.
Unfortunately, I also can't find information about how to achieve it with the ProjectExplorer. Googling is kinda hard, most of the entries are simply about how to add a filter with the UI :/
Previous Topic:NoClassDefFoundError during export
Next Topic:Find out different versions of installed plugin
Goto Forum:
  


Current Time: Sat Dec 20 23:47:58 GMT 2014

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

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