Bug 119017 - [comp-upgrade] JavaCore.create(..) doesn't work
Summary: [comp-upgrade] JavaCore.create(..) doesn't work
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0M5   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 118148
  Show dependency tree
 
Reported: 2005-12-02 05:58 EST by Sian January CLA
Modified: 2010-01-26 17:22 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sian January CLA 2005-12-02 05:58:51 EST
I am working with the new AST support, however ASTParser states that to be able to resolve bindings it needs an IJavaProject instance.  Calling org.aspectj.org.eclipse.jdt.core.JavaCore.create(IProject) causes the following exception to be thrown: 

java.lang.NoClassDefFoundError
at org.aspectj.org.eclipse.jdt.core.JavaCore.create(JavaCore.java:1213)
at org.eclipse.ajdt.internal.ui.viewsupport.SelectionListenerWithAJASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithAJASTManager.java:173)
at org.eclipse.ajdt.internal.ui.viewsupport.SelectionListenerWithAJASTManager$3.run(SelectionListenerWithAJASTManager.java:145)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

It would be nice to have this supported so that this feature of the AST can be used.
Comment 1 Andrew Clement CLA 2006-05-30 10:24:42 EDT
the 3.2 compiler allows AST manipulation without initializing projects and things... so this should be fixed when the 3.2compiler is integrated.
Comment 2 Rafal Krzewski CLA 2006-10-19 18:18:19 EDT
Is there a workaround for this problem with the current compiler, ie. a way to manualy intialize 'projects and things' before calling this method? Or do I have to wait for the new compiler to be integrated to get hold on AJ's version of ICompilationUnit? 
If I understand things correctly the latter is a prequisite for resolving type bindings in the AST tree. (See bug 146528)
Comment 3 Macneil Shonle CLA 2007-01-16 16:31:32 EST
I would also be interested in any workarounds possible, including something along the lines of setSource(char[]). I'd really like to build upon AJDT and this is blocking me.
Comment 4 Andrew Clement CLA 2007-10-23 11:46:27 EDT
The compiler upgrade may resolve this problem