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  |
Eclipse User |
|
|
|
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 #142647 is a reply to message #142619] |
Tue, 17 February 2004 09:51   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
Goto Forum:
Current Time: Fri May 09 23:10:57 EDT 2025
Powered by FUDForum. Page generated in 0.03151 seconds
|