Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Use of jdt.core.dom outside of Eclipse platform?
Use of jdt.core.dom outside of Eclipse platform? [message #154025] Tue, 13 April 2004 12:43 Go to next message
Eclipse UserFriend
Originally posted by: admin.gentlywear.com

Hi folks,

I'm a newbie so please no flaming...

My question is simple, is it possible to use the org.eclipse.jdt.core.dom
functionality outside of the Eclipse platform?

In other words, can I convert a java source file (or any arbitrary source
code string) into a java representation. (In a similar way that JDOM
[www.jdom.org] converts a XML file into a java representation)

If so, how would I do it, i.e. how would I create a workspace and projects?
Do I need a workspace?

I'm sorry if this has been asked 500 times before (can find anything similar
on this newsgroup, although I am using Outlook Express...), I just have a
project in mind that the jdt DOM would be perfect for but the inclusion of
the Eclipse platform would be a costly overhead (in other words I would like
to cherry-pick the jdt DOM functionality...)

So, please let me know, or can you point me at some relevant
documents/websites, I can't find anything that seems to do what I want.

Many thanks,

Gary...

P.S. I don't really want to HAVE to use the Eclipse platform, whilst it
looks like a great tool I'm quite happy with javac and XEmacs ;)
Re: Use of jdt.core.dom outside of Eclipse platform? [message #154071 is a reply to message #154025] Tue, 13 April 2004 19:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hallorant.yahoo.com

"Gary Bentley" <admin@gentlywear.com> wrote in message
news:c5h4ut$qj9$1@eclipse.org...
> My question is simple, is it possible to use the org.eclipse.jdt.core.dom
> functionality outside of the Eclipse platform?

This can be done, but is probably not the easiest thing to start off doing
when programming within Eclipse -- if you are undaunted you might want to
look at the test code for the JDT, some of them are (or were) sans-IDE
(Workbench). We had this working (as a test) quite a while back -- but
haven't kept it working.

> In other words, can I convert a java source file (or any arbitrary source
> code string) into a java representation. (In a similar way that JDOM
> [www.jdom.org] converts a XML file into a java representation)

I think you'd need to setup a project to allow references to be found (i.e.,
binding) if that is needed, you can create an AST without binding. I
suspect you still need to be within a project with a Java nature.

> If so, how would I do it, i.e. how would I create a workspace and
projects?
> Do I need a workspace?

Yes, its the workbench you don't want.

Workbench=IDE
Workspace=resource management (files, directories, projects, Java files,
etc.)
Re: Use of jdt.core.dom outside of Eclipse platform? [message #154143 is a reply to message #154071] Wed, 14 April 2004 04:27 Go to previous message
Eclipse UserFriend
Originally posted by: admin.gentlywear.com

Thanks Tim, that's very helpful, at least it gives me a starting point!

Yours,

Gary Bentley

P.S. I actually like the concept of a workspace and project so that'll help
me along... I just wish I could find better documentation about actually
coding rather than just binding your plugin into the GUI... oh well...

"Tim Halloran" wrote in message news:c5huc9$q62$1@eclipse.org...
>
> "Gary Bentley" <admin@gentlywear.com> wrote in message
> news:c5h4ut$qj9$1@eclipse.org...
> > My question is simple, is it possible to use the
org.eclipse.jdt.core.dom
> > functionality outside of the Eclipse platform?
>
> This can be done, but is probably not the easiest thing to start off doing
> when programming within Eclipse -- if you are undaunted you might want to
> look at the test code for the JDT, some of them are (or were) sans-IDE
> (Workbench). We had this working (as a test) quite a while back -- but
> haven't kept it working.
>
> > In other words, can I convert a java source file (or any arbitrary
source
> > code string) into a java representation. (In a similar way that JDOM
> > [www.jdom.org] converts a XML file into a java representation)
>
> I think you'd need to setup a project to allow references to be found
(i.e.,
> binding) if that is needed, you can create an AST without binding. I
> suspect you still need to be within a project with a Java nature.
>
> > If so, how would I do it, i.e. how would I create a workspace and
> projects?
> > Do I need a workspace?
>
> Yes, its the workbench you don't want.
>
> Workbench=IDE
> Workspace=resource management (files, directories, projects, Java files,
> etc.)
>
>
Previous Topic:[Q]: Refactoring: How to get errors/warnings on unused or unreferenced public/protected methods/fiel
Next Topic:JDT Example Plug-ins
Goto Forum:
  


Current Time: Tue Jul 22 15:44:39 EDT 2025

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

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

Back to the top