Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Can I create javaModel in non-java project?
Can I create javaModel in non-java project? [message #142603] Tue, 17 February 2004 09:03 Go to next message
Eclipse UserFriend
Originally posted by: tigerlet.rebel.org

Hi,
I am try to study the plug-in development, but know little about JDT
APIs.
In a "IProject" not have "java nature", I just want to get all "Java
Types" under a "IPath", that is, treat this "IPath" as a "IPackageFragment"
.. Is it possible?
Need to "IProject" -> "IJavaProect"?
Can create "JavaModel" in a "IProject"(has no java nature)?

Thanks for any tips!
----------------------
tigerlet
Re: Can I create javaModel in non-java project? [message #142619 is a reply to message #142603] Tue, 17 February 2004 09:38 Go to previous messageGo to next message
Eclipse UserFriend
A project must carry the Java nature in order for it to be usable in the
JavaModel.

"Tigerlet" <tigerlet@rebel.org> wrote in message
news:c0t6n3$ihp$2@eclipse.org...
> Hi,
> I am try to study the plug-in development, but know little about JDT
> APIs.
> In a "IProject" not have "java nature", I just want to get all "Java
> Types" under a "IPath", that is, treat this "IPath" as a
"IPackageFragment"
> . Is it possible?
> Need to "IProject" -> "IJavaProect"?
> Can create "JavaModel" in a "IProject"(has no java nature)?
>
> Thanks for any tips!
> ----------------------
> tigerlet
>
>
>
>
>
Re: Can I create javaModel in non-java project? [message #142647 is a reply to message #142619] Tue, 17 February 2004 09:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tigerlet.rebel.org

Hi, Philippe Mulet,

If adding the "Java nature" to the "IProject", ...
This "IProject" has been a "IJavaProject" ?
Is it possible to get all "Java Types"(class, interface) in a "IPath"
or "Folder" of this "IProject" ?

Thanks for any tips!
---------------------
tigerlet.


"Philippe Mulet" <philippe_mulet@fr.ibm.com> wrote in message
news:c0t8qu$lm1$1@eclipse.org...
> A project must carry the Java nature in order for it to be usable in the
> JavaModel.
>
> "Tigerlet" <tigerlet@rebel.org> wrote in message
> news:c0t6n3$ihp$2@eclipse.org...
> > Hi,
> > I am try to study the plug-in development, but know little about JDT
> > APIs.
> > In a "IProject" not have "java nature", I just want to get all "Java
> > Types" under a "IPath", that is, treat this "IPath" as a
> "IPackageFragment"
> > . Is it possible?
> > Need to "IProject" -> "IJavaProect"?
> > Can create "JavaModel" in a "IProject"(has no java nature)?
> >
> > Thanks for any tips!
> > ----------------------
> > tigerlet
> >
> >
> >
> >
> >
>
>
Re: Can I create javaModel in non-java project? [message #142667 is a reply to message #142647] Tue, 17 February 2004 10:44 Go to previous messageGo to next message
Eclipse UserFriend
Yes, you can navigate the Java model and find all types in each package
fragment.
Or you can search for all types, which may be less cpu/memory intensive, if
you only care about a few ones.

"Tigerlet" <tigerlet@rebel.org> wrote in message
news:c0t9gj$mj4$1@eclipse.org...
> Hi, Philippe Mulet,
>
> If adding the "Java nature" to the "IProject", ...
> This "IProject" has been a "IJavaProject" ?
> Is it possible to get all "Java Types"(class, interface) in a "IPath"
> or "Folder" of this "IProject" ?
>
> Thanks for any tips!
> ---------------------
> tigerlet.
>
>
> "Philippe Mulet" <philippe_mulet@fr.ibm.com> wrote in message
> news:c0t8qu$lm1$1@eclipse.org...
> > A project must carry the Java nature in order for it to be usable in the
> > JavaModel.
> >
> > "Tigerlet" <tigerlet@rebel.org> wrote in message
> > news:c0t6n3$ihp$2@eclipse.org...
> > > Hi,
> > > I am try to study the plug-in development, but know little about
JDT
> > > APIs.
> > > In a "IProject" not have "java nature", I just want to get all
"Java
> > > Types" under a "IPath", that is, treat this "IPath" as a
> > "IPackageFragment"
> > > . Is it possible?
> > > Need to "IProject" -> "IJavaProect"?
> > > Can create "JavaModel" in a "IProject"(has no java nature)?
> > >
> > > Thanks for any tips!
> > > ----------------------
> > > tigerlet
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
Re: Can I create javaModel in non-java project? [message #142683 is a reply to message #142667] Tue, 17 February 2004 12:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tigerlet.rebel.org

Hi, Philippe Mulet,
Thank you very much! But I have some new questions ... :(
I want to get the "Java Type"s under only one "Folder/IPath" of the
"JavaProject", not all of them (ps: the "Folder/IPath" may be my package
folder)
Is it possible ?
I have tried to use the "(JavaCore.create(IProject
project)).getJavaModel() "
to get the "JavaModel" . But I find the "IPackageFragmentRoot" and
"IPackageFragment[]"
in "JavaModel" is fixed, I can not change them to my desired
"Folder/IPath".
maybe, it is impossible ?

Thanks for any tips!
---------------------
tigerlet.



"Philippe Mulet" <philippe_mulet@fr.ibm.com> wrote in message
news:c0tcn4$rfa$1@eclipse.org...
> Yes, you can navigate the Java model and find all types in each package
> fragment.
> Or you can search for all types, which may be less cpu/memory intensive,
if
> you only care about a few ones.
>
> "Tigerlet" <tigerlet@rebel.org> wrote in message
> news:c0t9gj$mj4$1@eclipse.org...
> > Hi, Philippe Mulet,
> >
> > If adding the "Java nature" to the "IProject", ...
> > This "IProject" has been a "IJavaProject" ?
> > Is it possible to get all "Java Types"(class, interface) in a
"IPath"
> > or "Folder" of this "IProject" ?
> >
> > Thanks for any tips!
> > ---------------------
> > tigerlet.
> >
> >
> > "Philippe Mulet" <philippe_mulet@fr.ibm.com> wrote in message
> > news:c0t8qu$lm1$1@eclipse.org...
> > > A project must carry the Java nature in order for it to be usable in
the
> > > JavaModel.
> > >
> > > "Tigerlet" <tigerlet@rebel.org> wrote in message
> > > news:c0t6n3$ihp$2@eclipse.org...
> > > > Hi,
> > > > I am try to study the plug-in development, but know little about
> JDT
> > > > APIs.
> > > > In a "IProject" not have "java nature", I just want to get all
> "Java
> > > > Types" under a "IPath", that is, treat this "IPath" as a
> > > "IPackageFragment"
> > > > . Is it possible?
> > > > Need to "IProject" -> "IJavaProect"?
> > > > Can create "JavaModel" in a "IProject"(has no java nature)?
> > > >
> > > > Thanks for any tips!
> > > > ----------------------
> > > > tigerlet
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: Can I create javaModel in non-java project? [message #143302 is a reply to message #142683] Thu, 19 February 2004 06:29 Go to previous message
Eclipse UserFriend
The JavaModel is a tree, which root is an instance of IJavaModel. So instead
of going down, you went up to the root.

IJavaModel
+- IJavaProject
+- IPackageFragmentRoot
+- IPackageFragment
+- ICompilationUnit
+- IType
...
I recommend you start by reading the JDT Core help:
Help>Help contents>JDT Plug-in Developer Guide>Programmer's Guide>JDT Core


http://127.0.0.1:6975/help/topic/org.eclipse.jdt.doc.isv/gui de/jdt_int_core.htm


"Tigerlet" <tigerlet@rebel.org> wrote in message
news:c0ti0i$3aq$1@eclipse.org...
> Hi, Philippe Mulet,
> Thank you very much! But I have some new questions ... :(
> I want to get the "Java Type"s under only one "Folder/IPath" of the
> "JavaProject", not all of them (ps: the "Folder/IPath" may be my package
> folder)
> Is it possible ?
> I have tried to use the "(JavaCore.create(IProject
> project)).getJavaModel() "
> to get the "JavaModel" . But I find the "IPackageFragmentRoot" and
> "IPackageFragment[]"
> in "JavaModel" is fixed, I can not change them to my desired
> "Folder/IPath".
> maybe, it is impossible ?
>
> Thanks for any tips!
> ---------------------
> tigerlet.
>
>
>
> "Philippe Mulet" <philippe_mulet@fr.ibm.com> wrote in message
> news:c0tcn4$rfa$1@eclipse.org...
> > Yes, you can navigate the Java model and find all types in each package
> > fragment.
> > Or you can search for all types, which may be less cpu/memory intensive,
> if
> > you only care about a few ones.
> >
> > "Tigerlet" <tigerlet@rebel.org> wrote in message
> > news:c0t9gj$mj4$1@eclipse.org...
> > > Hi, Philippe Mulet,
> > >
> > > If adding the "Java nature" to the "IProject", ...
> > > This "IProject" has been a "IJavaProject" ?
> > > Is it possible to get all "Java Types"(class, interface) in a
> "IPath"
> > > or "Folder" of this "IProject" ?
> > >
> > > Thanks for any tips!
> > > ---------------------
> > > tigerlet.
> > >
> > >
> > > "Philippe Mulet" <philippe_mulet@fr.ibm.com> wrote in message
> > > news:c0t8qu$lm1$1@eclipse.org...
> > > > A project must carry the Java nature in order for it to be usable in
> the
> > > > JavaModel.
> > > >
> > > > "Tigerlet" <tigerlet@rebel.org> wrote in message
> > > > news:c0t6n3$ihp$2@eclipse.org...
> > > > > Hi,
> > > > > I am try to study the plug-in development, but know little
about
> > JDT
> > > > > APIs.
> > > > > In a "IProject" not have "java nature", I just want to get all
> > "Java
> > > > > Types" under a "IPath", that is, treat this "IPath" as a
> > > > "IPackageFragment"
> > > > > . Is it possible?
> > > > > Need to "IProject" -> "IJavaProect"?
> > > > > Can create "JavaModel" in a "IProject"(has no java nature)?
> > > > >
> > > > > Thanks for any tips!
> > > > > ----------------------
> > > > > tigerlet
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Previous Topic:getting started with eclipse - java webapp development
Next Topic:Can I sort the list of files in package explorer?
Goto Forum:
  


Current Time: Sat May 10 03:44:31 EDT 2025

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

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

Back to the top