소스 검색

Check startsWith (see if setter) like the original tried

Toni Helenius 5 년 전
부모
커밋
a3e8809ff2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      jme3-code-check/src/com/jme3/gde/codecheck/hints/ReadOnlyPrimitiveHint.java

+ 2 - 2
jme3-code-check/src/com/jme3/gde/codecheck/hints/ReadOnlyPrimitiveHint.java

@@ -39,8 +39,8 @@ public class ReadOnlyPrimitiveHint {
             Tree t = treePath.getLeaf();
             Element el = info.getTrees().getElement(info.getTrees().getPath(info.getCompilationUnit(), t));
 
-            //TODO: add more checks
-            if ("set".equals(el.getSimpleName().toString())) {
+            // TODO: add more checks
+            if (el.getSimpleName().toString().startsWith("set")) {
                 Fix fix = new ReadOnlyPrimitiveHint.FixImpl(ctx.getInfo(), ctx.getPath()).toEditorFix();
                 return ErrorDescriptionFactory.forName(
                         ctx,