Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.0m1
-
Fix Version/s: 2.0.0RC1
-
Component/s: Content Assist
-
Labels:None
-
Environment:HideGroovy-Eclipse plugin Version: 2.0.0.xx-20091124-1600-e35
eclipse.buildId=M20090917-0800
java.version=1.6.0_0
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.productShowGroovy-Eclipse plugin Version: 2.0.0.xx-20091124-1600-e35 eclipse.buildId=M20090917-0800 java.version=1.6.0_0 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product
-
Number of attachments :
Description
This autocomplete NPE was thrown when navigating packages in my import statements. Attached stack trace from error log.
This was the code that threw it (see the commented section)
====
import org.junit.runner.RunWith
import spock.lang.Specification;
import spock.//<-- pressing this '.' brought up autocomplete and threw the error
@RunWith(Sputnik)
class EntryCommiterTest extends Specification {
}
I am able to avoid raising an exception here by changing a small piece of code. However, getting the content assist proposals that you expect is a lot more difficult. The reason is partially because of the lack of recovery of the parser from an invalid import statement that you have above.
As an alternative, you can get content assist for imports like this:
import S<--
And all classes that begin with S in any package appear as proposals.
I will not be able to provide a proper fix for M2, but will try for RC1.