Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » getting IJavaElement from workspace
getting IJavaElement from workspace [message #164583] Tue, 15 June 2004 11:11 Go to next message
Eclipse UserFriend
Originally posted by: creremoi.aol.com

Hello,

I have a workspace and I need to get all the IJavaElement from this
workspace.
I've already tried an IresourceVisitor but I can't get things like
CompilationUnit with it.

Do you know if there a simple way to do it or will I have to create
CompilationUnits for each IFiles of the workspace ?

Thanks a lot.

Satch.
Re: getting IJavaElement from workspace [message #164590 is a reply to message #164583] Tue, 15 June 2004 11:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olivier_thomannNO.ca.ibm.comSPAM

Le Tue, 15 Jun 2004 17:11:59 +0200, "Satch" <creremoi@aol.com> a écrit
:
>I have a workspace and I need to get all the IJavaElement from this
>workspace.
>I've already tried an IresourceVisitor but I can't get things like
>CompilationUnit with it.
>
>Do you know if there a simple way to do it or will I have to create
>CompilationUnits for each IFiles of the workspace ?
To get ICompilationUnit, you first need to have a IJavaProject.
Check the create.... methods on org.eclipse.jdt.core.JavaCore.
--
Olivier
Re: getting IJavaElement from workspace [message #164717 is a reply to message #164590] Wed, 16 June 2004 03:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: creremoi.aol.com

yes, i knew it.
But what I wanted to say is when i'm looking into a workingSet I have
IJavaProjects whereas when I'm looking into the workspace I juste have
IProjects.

won't the fact of calling the create method for each IProject (if they're a
lot) be to slow ?

Thanks

Satch

"Olivier Thomann" <olivier_thomannNO@ca.ibm.comSPAM> wrote in message
news:at4uc05tb3g1h984pq3knpaeur4pegq88p@4ax.com...
> Le Tue, 15 Jun 2004 17:11:59 +0200, "Satch" <creremoi@aol.com> a
Re: getting IJavaElement from workspace [message #167268 is a reply to message #164717] Mon, 05 July 2004 06:16 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Satch wrote:

>yes, i knew it.
>But what I wanted to say is when i'm looking into a workingSet I have
>IJavaProjects whereas when I'm looking into the workspace I juste have
>IProjects.
>
>won't the fact of calling the create method for each IProject (if they're a
>lot) be to slow ?
>
>
You can directly get the Java Model:
JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());

Dani

>Thanks
>
>Satch
>
>"Olivier Thomann" <olivier_thomannNO@ca.ibm.comSPAM> wrote in message
>news:at4uc05tb3g1h984pq3knpaeur4pegq88p@4ax.com...
>
>
>>Le Tue, 15 Jun 2004 17:11:59 +0200, "Satch" <creremoi@aol.com> a écrit
>>:
>>
>>
>>>I have a workspace and I need to get all the IJavaElement from this
>>>workspace.
>>>I've already tried an IresourceVisitor but I can't get things like
>>>CompilationUnit with it.
>>>
>>>Do you know if there a simple way to do it or will I have to create
>>>CompilationUnits for each IFiles of the workspace ?
>>>
>>>
>>To get ICompilationUnit, you first need to have a IJavaProject.
>>Check the create.... methods on org.eclipse.jdt.core.JavaCore.
>>--
>>Olivier
>>
>>
>
>
>
>
Previous Topic:Java Runtime Targetting.
Next Topic:project selection, search for main method
Goto Forum:
  


Current Time: Mon Jul 14 12:06:24 EDT 2025

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

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

Back to the top