Community
Participate
Working Groups
Build Identifier: I20100608-0911 I'm working for scala-ide. The plugin use jdt-weaving but doesn't require ajdt to be installed. Then there is no real adapter registered for every org.eclipse.contribution.jdt.itdawareness.*Aspect . So new RenameAdapter().getProvider() == null searchAdapter.getProvider() == null But there is no null check. Then some NPE are raised like ~~~ java.lang.NullPointerException at org.eclipse.jdt.core.search.SearchPattern.createPattern_aroundBody1$advice(SearchPattern.java:338) at org.eclipse.jdt.core.search.SearchPattern.createPattern(SearchPattern.java:1) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:124) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:91) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) ~~~ scala-ide related bugs : * https://www.assembla.com/spaces/scala-ide/tickets/1000095-jdt-weaving---npe-search-on-java-project * https://www.assembla.com/spaces/scala-ide/tickets/1000075-jdt-weaving-used-in-sdt-for-eclipse-3-6-breaks-java-refactoring The bug is also present for eclipse 3.5.2 Reproducible: Always Steps to Reproduce: Install only JDT weaving without AJDT (core/ui) try to do a search by reference in a java file. I suppose scala-ide installation is not required to reproduce the bug.
*** Bug 321844 has been marked as a duplicate of this bug. ***
We need to be more careful about problems like these. I'll have a look through the code today.
May be method that could return null should return some sort of Option<X> (like in scala) ;-) to informer caller. (the scala-ide code also have lot of missing null check where integrate with eclipse/jdt API) Thanks for your time
In all the cases that I have explored so far, the default should be just to behave as normal. These adapter objects exist to hook extra functionality into JDT, specifically to add intertype declaration support for things like searching, navigating, and content assist. When the adapter does not exist (ie- null), the correct behavior is to continue on as usual, and return the JDT results only.
I just committed a few fixes for the 3.6 branch of AJDT. I'll be back porting the changes to the 3.5 branch soon. I believe that all of these fixes will address the problems that you are seeing. I'll post here when a dev build is available to try out.
Thank you
A new build on the 3.6 stream is available and has all the fixes required. Please let me know when you get a chance to try this out. A build on the 3.5 stream will be available soon. I'm closing this issue now, but feel free to re-open or raise a new issue if you see any more problems.
fixed.
So to test it I should keep JDT weaving from http://download.eclipse.org/tools/ajdt/36/dev/update ? (until 2.1.1 release)
Andrew, Do you have an ETA of 2.1.1 release ?
(In reply to comment #9) > So to test it I should keep JDT weaving from > http://download.eclipse.org/tools/ajdt/36/dev/update ? > (until 2.1.1 release) Yes. (In reply to comment #10) > Andrew, > Do you have an ETA of 2.1.1 release ? We are scheduled to release in the middle of October.
*** Bug 328886 has been marked as a duplicate of this bug. ***