Author: xcoulon
Date: 2012-03-23 09:51:00 -0400 (Fri, 23 Mar 2012)
New Revision: 39797
Modified:
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java
Log:
Fixed - JBIDE-11377
Failed to compute completion proposal
Modified:
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java 2012-03-23
13:50:25 UTC (rev 39796)
+++
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java 2012-03-23
13:51:00 UTC (rev 39797)
@@ -78,7 +78,8 @@
}
IJavaElement invocationElement = javaContext.getCompilationUnit().getElementAt(
context.getInvocationOffset());
- if (invocationElement.getElementType() == IJavaElement.METHOD) {
+ // ICompilationUnit.getElementAt(int) method may return null
+ if (invocationElement != null && invocationElement.getElementType() ==
IJavaElement.METHOD) {
IJaxrsResourceMethod resourceMethod = metamodel.getElement(invocationElement,
IJaxrsResourceMethod.class);
// the java method must be associated with a JAX-RS Resource Method.
Show replies by date