Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to access all projects at runtime
How to access all projects at runtime [message #321058] Sat, 06 October 2007 14:04 Go to next message
Eclipse UserFriend
I am doing a plugin projects which exports some files from different Java projects automatically.

But at runtime I can get only access to the current project with the following <b>
ConcreteUIPlugin.getInstance().getBundle()</b>

ConcreteUIPlugin extends AbstractUIPlugin

How can I traverse to other projects than the current project?
Re: How to access all projects at runtime [message #321059 is a reply to message #321058] Sat, 06 October 2007 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zx.us.ibm.com

Platform.getBundle("org.eclipse.mybundle")

Bundle.getEntry(...)

Cheers,

~ Chris
Re: How to access all projects at runtime [message #321060 is a reply to message #321058] Sat, 06 October 2007 15:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

Sorry, I didn't clearly understand your question. In case you are asking how to access the projects in the Eclipse instance where your plugin is running, you can use this API: ResourcesPlugin.getWorkspace().getRoot().getProjects()
Re: How to access all projects at runtime [message #321066 is a reply to message #321060] Sun, 07 October 2007 13:02 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Chris and Prakash !
Unfortunately, your suggestions don't solve my problem.

Sorry for the unclarity.

I try to describe my problem in detail.

This is the path for my Eclipse plugin project

...<b>thomas/workspace/PluginProject</b>

At runtime that plugin should automatically load some files from another project which is located at :

....<b>thomas/workspace/JAXBProject</b>

With the command <b> ConcreteUIPlugin.getInstance().getBundle()</b>, I can get access to <b>thomas/workspace/PluginProject</b>.
But how can I traverse from that point to <b>thomas/workspace/JAXBProject</b> ?
Re: How to access all projects at runtime [message #321072 is a reply to message #321066] Mon, 08 October 2007 01:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

This is what I understand. You have workspace 1 where you are developing your plugin. It has two projects - one your plugin project and the other a jaxbproject. You run your plugin in another Eclipse application, which runs in workspace 2. Now you want to access the jaxbproject from the Eclipse running in workspace 2.

You shouldn't be doing this!

When you ship your plugin to your customer, do you expect him to run two instances of Eclipse?
Re: How to access all projects at runtime [message #321105 is a reply to message #321072] Tue, 09 October 2007 06:15 Go to previous messageGo to next message
Eclipse UserFriend
Hello Prakash,

Yes, you did understand it. Anyway it's only for internal usage.

Otherwise the whole stuff would be a plugin with File Wizard Dialog .

You know how I can get a quick and dirty solution for my problem ?
Re: How to access all projects at runtime [message #321113 is a reply to message #321105] Tue, 09 October 2007 10:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

You seem to be confusing the development time workspace with the runtime
workspace. When you develop a plugin, you are working in a development
workspace. You can have multiple plugin projects in the development
workspace that have references to each other. When you launch, you have a
second runtime workspace. It has no reference to the development workspace.
You can't reference projects in the development workspace from the runtime
workspace. Even if you could, it wouldn't make sense.

Perhaps you should provide a more detailed description about what
requirement you are trying to satisfy. That way you can get suggestions
that make sense for the Eclipse platform.

"Thomas" wrote in message
news:1047928104.11191924936615.JavaMail.root@cp9.dzone.com...
> Hello Prakash,
>
> Yes, you did understand it. Anyway it's only for internal usage.
>
> Otherwise the whole stuff would be a plugin with File Wizard Dialog .
>
> You know how I can get a quick and dirty solution for my problem ?

[Updated on: Thu, 31 December 2020 09:16] by Moderator

Re: How to access all projects at runtime [message #321120 is a reply to message #321113] Tue, 09 October 2007 12:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

I agree.

Thomas, perhaps you are trying to solve a problem in a wrong way! You can describe the original problem and try to get a right solution perhaps?
Re: How to access all projects at runtime [message #321193 is a reply to message #321058] Thu, 11 October 2007 02:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

can u plz tell or give the detailed code for acessing current project.i want to retrieve the current selected project name to display tht in the new wizard i hve created.

i hve created wizard on right click of project ,i want to create a folder in that project,so i need to retrieve the project name,but i m not able to do tht.

i hve tried with
ResourcesPlugin.getWorkspace().getRoot().getProjects()
it is giving output like
Lorg.eclipse.core.resources.IProject;@200470
Re: How to access all projects at runtime [message #321195 is a reply to message #321113] Thu, 11 October 2007 02:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

Hello Thomas

Can u tell me how to retrieve project names from second runtime workspace,

i hve tried by
ResourcesPlugin.getWorkspace().getRoot().getProjects()
it is showing o/p like
Lorg.eclipse.core.resources.IProject;@200470

and ResourcesPlugin.getWorkspace()displays the runtime workspace, how to get project names from that workspace.
Re: How to access all projects at runtime [message #321196 is a reply to message #321195] Thu, 11 October 2007 02:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

ResourcesPlugin.getWorkspace().getRoot().getProjects() returns IProject[]. Iterate thru them and projects[i].getName() should give you the name of the project
Re: How to access all projects at runtime [message #321197 is a reply to message #321195] Thu, 11 October 2007 02:49 Go to previous message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

Hello Dave

Can u tell me how to retrieve project names from second runtime workspace,

i hve tried by
ResourcesPlugin.getWorkspace().getRoot().getProjects()
it is showing o/p like
Lorg.eclipse.core.resources.IProject;@200470

and ResourcesPlugin.getWorkspace()displays the runtime workspace, how to get project names from that workspace.
Previous Topic:How to build for a pre-carbon Mac?
Next Topic:[PDE] plugin dependency bug ?
Goto Forum:
  


Current Time: Wed Nov 05 08:38:16 EST 2025

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

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

Back to the top