Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Indexer and AST question
Indexer and AST question [message #11079] Thu, 01 May 2003 16:10 Go to next message
Eclipse UserFriend
Originally posted by: lopian.netvision.net.il

Hi,
I would like to know if it is possible to parse a Java/Class file that is
external to the project and build an AST?
or how can I read the Index information from outside eclipse.
This can help is creating an index database external to eclipse.

thanks
Re: Indexer and AST question [message #11233 is a reply to message #11079] Thu, 01 May 2003 16:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam.kiezun.gmx.net.remove

> I would like to know if it is possible to parse a Java/Class file that is
> external to the project and build an AST?

yes
use AST.parseCompilationUnit(char[]) or

of course, no bindings will be available then (or maybe only 'local' bindings,
not sure)

a.
--
eclipse.org
Re: Indexer and AST question [message #11346 is a reply to message #11233] Thu, 01 May 2003 17:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lopian.netvision.net.il

thanks Adam for the quick reply:
1. What are the bindings?
2. Are there API's for the Index infomation kept on disk?

LE
Re: Indexer and AST question [message #11381 is a reply to message #11346] Thu, 01 May 2003 17:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam.kiezun.gmx.net.remove

> 1. What are the bindings?

symbol-table information (meanings of names)

a.
--
eclipse.org
Re: Indexer and AST question [message #11854 is a reply to message #11079] Fri, 02 May 2003 08:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Thu, 1 May 2003 22:10:48 +0200, "Eli" <lopian@netvision.net.il>
wrote:
>or how can I read the Index information from outside eclipse.
>This can help is creating an index database external to eclipse.
We don't have such a support right now. This is in the works for the
next release.
--
Olivier
Re: Indexer and AST question [message #11888 is a reply to message #11233] Fri, 02 May 2003 08:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Thu, 1 May 2003 22:25:38 +0200, "Adam Kiezun"
<adam.kiezun@gmx.net.remove> wrote:
>use AST.parseCompilationUnit(char[]) or
>of course, no bindings will be available then (or maybe only 'local' bindings,
>not sure)
This API gives no binding at all. There is no context to resolve them.
--
Olivier
Re: Indexer and AST question [message #12256 is a reply to message #11888] Fri, 02 May 2003 08:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.spam.protection.com

> This API gives no binding at all. There is no context to resolve them.

i guess, theoretically, bindings for names local to the file could be maybe made available
(Olivier, could they?)

but that'd be a feature request for jdt core

a.
--
eclipse.org
Re: Indexer and AST question [message #12279 is a reply to message #12256] Fri, 02 May 2003 08:59 Go to previous message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Fri, 2 May 2003 14:52:17 +0200, "Adam Kiezun"
<adam_kiezun@ch.ibm.spam.protection.com> wrote:
>i guess, theoretically, bindings for names local to the file could be maybe made available
>(Olivier, could they?)
>but that'd be a feature request for jdt core
I would not push for that. First reason is that to resolve a binding
you always need a context that at least include java.lang.Object. All
bindings are resolved or none, but not simply a subset.
Second reason is consistency. How do you know which bindings could be
available? I prefer to have them all or none.
Third reason: This API clearly states that no binding are available.
* This method does not compute binding information; all
<code>resolveBinding</code>
* methods applied to nodes of the resulting AST return
<code>null</code>.

If you want bindings, then use another API :-).
--
Olivier
Previous Topic:Unable to read workbench state
Next Topic:Ctrl+C is not working.
Goto Forum:
  


Current Time: Sun May 04 05:05:47 EDT 2025

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

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

Back to the top