Author: xcoulon
Date: 2012-03-01 03:58:15 -0500 (Thu, 01 Mar 2012)
New Revision: 39221
Modified:
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java
Log:
Fixed - JBIDE-11069
Wrong/Missing marker information on JAX-RS validation errors
Modified:
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java 2012-03-01
08:23:40 UTC (rev 39220)
+++
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java 2012-03-01
08:58:15 UTC (rev 39221)
@@ -339,6 +339,10 @@
int severity, final int offset, int length) throws JavaModelException {
final ValidatorMessage validationMsg = ValidatorMessage.create(msg,
this.getResource());
+ validationMsg.setType(JaxrsMetamodelBuilder.JAXRS_PROBLEM);
+ final ICompilationUnit compilationUnit = this.getJavaElement().getCompilationUnit();
+ final CompilationUnit ast =
CompilationUnitsRepository.getInstance().getAST(compilationUnit);
+ validationMsg.setAttribute(IMarker.LOCATION, NLS.bind(ValidationMessages.LINE_NUMBER,
ast.getLineNumber(offset)));
validationMsg.setAttribute(IMarker.MARKER,
JaxrsMetamodelBuilder.JAXRS_PROBLEM);
validationMsg.setAttribute(IMarker.SEVERITY, severity);
Show replies by date