diff -r c5a58b0104ea websvc.restapi/src/org/netbeans/modules/websvc/rest/model/impl/Utils.java --- a/websvc.restapi/src/org/netbeans/modules/websvc/rest/model/impl/Utils.java Thu May 01 17:03:52 2008 -0700 +++ b/websvc.restapi/src/org/netbeans/modules/websvc/rest/model/impl/Utils.java Fri May 09 16:11:47 2008 -0700 @@ -170,16 +170,17 @@ if (cpi != null) { FileObject fo = SourceUtils.getFile(ElementHandle.create(top), cpi); for (String d : getDiagnostics(fo)) { - if (d.contains(RestConstants.PATH) || - d.contains(RestConstants.PATH_ANNOTATION) || - d.contains(RestConstants.GET) || - d.contains(RestConstants.GET_ANNOTATION) || - d.contains(RestConstants.PUT) || - d.contains(RestConstants.PUT_ANNOTATION) || - d.contains(RestConstants.POST) || - d.contains(RestConstants.POST_ANNOTATION) || - d.contains(RestConstants.DELETE) || - d.contains(RestConstants.DELETE_ANNOTATION)) { + System.out.println("d = " + d); + if (d.equals(RestConstants.PATH) || + d.equals(RestConstants.PATH_ANNOTATION) || + d.equals(RestConstants.GET) || + d.equals(RestConstants.GET_ANNOTATION) || + d.equals(RestConstants.PUT) || + d.equals(RestConstants.PUT_ANNOTATION) || + d.equals(RestConstants.POST) || + d.equals(RestConstants.POST_ANNOTATION) || + d.equals(RestConstants.DELETE) || + d.equals(RestConstants.DELETE_ANNOTATION)) { return true; } } @@ -214,10 +215,14 @@ for (Diagnostic d : ci.getDiagnostics()) { if (Kind.ERROR == d.getKind()) { try { - int start = (int) d.getStartPosition(); + int start = (int) d.getStartPosition() - 1; int len = (int) d.getEndPosition() - start; String snip = doc.getText(start, len); - result.add(snip); + + // Only add the snip if it starts with @ + if (snip.startsWith("@")) { //NOI18N + result.add(snip.substring(1)); + } } catch (BadLocationException ex) { continue; }