Browse Source

Moved strings from TempVarsHint to bundle.properties

grizeldi 9 years ago
parent
commit
6560e31620

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

@@ -1,4 +1,8 @@
 UpdateHint.display-name=Updating is not needed in jME3, check your update order if you need to call this.
 UpdateHint.id=Update States / Bound
 UpdateHint.description=Checks for calls to updateGeometricState(), updateLogicalState() and updateModelBound().
-UpdateHint.fix-text=Remove this call
+UpdateHint.fix-text=Remove this call
+TempVarsHint.display-name=TempVars might not be released
+TempVarsHint.id=TempVars release check
+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

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

@@ -24,6 +24,7 @@ import org.netbeans.spi.editor.hints.ErrorDescription;
 import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
 import org.netbeans.spi.editor.hints.Fix;
 import org.openide.awt.StatusDisplayer;
+import org.openide.util.NbBundle;
 
 public class TempVarsHint extends AbstractHint {
 
@@ -135,19 +136,19 @@ public class TempVarsHint extends AbstractHint {
     //Message that the user sees in the left sidebar:
     @Override
     public String getDisplayName() {
-        return "TempVars might not be released";
+        return NbBundle.getMessage(TempVarsHint.class, "TempVarsHint.display-name");
     }
 
     //Name of the hint in the Options window:
     @Override
     public String getId() {
-        return "TempVars release check";
+        return NbBundle.getMessage(TempVarsHint.class, "TempVarsHint.id");
     }
 
     //Description of the hint in the Options window:
     @Override
     public String getDescription() {
-        return "Checks for calls TempVars.get() and search for correspondinng release() call";
+        return NbBundle.getMessage(TempVarsHint.class, "TempVarsHint.description");
     }
 
     class MessagesFix implements EnhancedFix {
@@ -169,7 +170,7 @@ public class TempVarsHint extends AbstractHint {
 
         @Override
         public String getText() {
-            return "Add a release() call at the end of the method";
+            return NbBundle.getMessage(TempVarsHint.class, "TempVarsHint.fix-text");
         }
 
         @Override

+ 0 - 4
jme3-code-check/src/com/jme3/gde/codecheck/hints/UpdateHint.java

@@ -87,21 +87,18 @@ public class UpdateHint extends AbstractHint {
     //Message that the user sees in the left sidebar:
     @Override
     public String getDisplayName() {
-        //return "Updating is not needed in jME3, check your update order if you need to call this.";
         return NbBundle.getMessage(UpdateHint.class, "UpdateHint.display-name");
     }
 
     //Name of the hint in the Options window:
     @Override
     public String getId() {
-        //return "Update States / Bound";
         return NbBundle.getMessage(UpdateHint.class, "UpdateHint.id");
     }
 
     //Description of the hint in the Options window:
     @Override
     public String getDescription() {
-        //return "Checks for calls to updateGeometricState(), updateLogicalState() and updateModelBound().";
         return NbBundle.getMessage(UpdateHint.class, "UpdateHint.description");
     }
 
@@ -124,7 +121,6 @@ public class UpdateHint extends AbstractHint {
 
         @Override
         public String getText() {
-            //return "Remove this call";
             return NbBundle.getMessage(UpdateHint.class, "UpdateHint.fix-text");
         }