Author: xcoulon
Date: 2012-03-23 09:56:06 -0400 (Fri, 23 Mar 2012)
New Revision: 39798
Modified:
trunk/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:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java
===================================================================
---
trunk/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)
+++
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java 2012-03-23
13:56:06 UTC (rev 39798)
@@ -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