Browse Source

Moved strings from ReadOnlyPrimitiveHint to bundle.properties

grizeldi 9 years ago
parent
commit
a3c0e26258

+ 5 - 1
jme3-code-check/src/com/jme3/gde/codecheck/hints/Bundle.properties

@@ -5,4 +5,8 @@ UpdateHint.fix-text=Remove this call
 TempVarsHint.display-name=TempVars might not be released
 TempVarsHint.display-name=TempVars might not be released
 TempVarsHint.id=TempVars release check
 TempVarsHint.id=TempVars release check
 TempVarsHint.description=Checks for calls TempVars.get() and search for correspondinng release() call
 TempVarsHint.description=Checks for calls TempVars.get() and search for correspondinng release() call
-TempVarsHint.fix-text=Add a release() call at the end of the method
+TempVarsHint.fix-text=Add a release() call at the end of the method
+ReadOnlyPrimitiveHint.display-name=This primitive is read only and should not be modified!
+ReadOnlyPrimitiveHint.id=ReadOnly Primitives
+ReadOnlyPrimitiveHint.description=Checks for modifications to readonly primitives. (getLocalTranslation().set())
+ReadOnlyPrimitiveHint.fix-text=Remove this call

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

@@ -21,6 +21,7 @@ import org.netbeans.spi.editor.hints.ErrorDescription;
 import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
 import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
 import org.netbeans.spi.editor.hints.Fix;
 import org.netbeans.spi.editor.hints.Fix;
 import org.openide.awt.StatusDisplayer;
 import org.openide.awt.StatusDisplayer;
+import org.openide.util.NbBundle;
 
 
 public class ReadOnlyPrimitiveHint extends AbstractHint {
 public class ReadOnlyPrimitiveHint extends AbstractHint {
 
 
@@ -94,19 +95,19 @@ public class ReadOnlyPrimitiveHint extends AbstractHint {
     //Message that the user sees in the left sidebar:
     //Message that the user sees in the left sidebar:
     @Override
     @Override
     public String getDisplayName() {
     public String getDisplayName() {
-        return "This primitive is read only and should not be modified!";
+        return NbBundle.getMessage(ReadOnlyPrimitiveHint.class, "ReadOnlyPrimitiveHint.display-name");
     }
     }
 
 
     //Name of the hint in the Options window:
     //Name of the hint in the Options window:
     @Override
     @Override
     public String getId() {
     public String getId() {
-        return "ReadOnly Primitives";
+        return NbBundle.getMessage(ReadOnlyPrimitiveHint.class, "ReadOnlyPrimitiveHint.id");
     }
     }
 
 
     //Description of the hint in the Options window:
     //Description of the hint in the Options window:
     @Override
     @Override
     public String getDescription() {
     public String getDescription() {
-        return "Checks for modifications to readonly primitives. (getLocalTranslation().set())";
+        return NbBundle.getMessage(ReadOnlyPrimitiveHint.class, "ReadOnlyPrimitiveHint.description");
     }
     }
 
 
     class MessagesFix implements EnhancedFix {
     class MessagesFix implements EnhancedFix {
@@ -128,7 +129,7 @@ public class ReadOnlyPrimitiveHint extends AbstractHint {
 
 
         @Override
         @Override
         public String getText() {
         public String getText() {
-            return "Remove this call";
+            return NbBundle.getMessage(ReadOnlyPrimitiveHint.class, "ReadOnlyPrimitiveHint.fix-text");
         }
         }
 
 
         @Override
         @Override