Browse Source

Moved strings from UpdateHint to bundle.properties

grizeldi 9 years ago
parent
commit
1c781760f7

+ 4 - 0
jme3-code-check/src/com/jme3/gde/codecheck/hints/Bundle.properties

@@ -0,0 +1,4 @@
+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

+ 9 - 4
jme3-code-check/src/com/jme3/gde/codecheck/hints/UpdateHint.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 UpdateHint extends AbstractHint {
 public class UpdateHint extends AbstractHint {
 
 
@@ -86,19 +87,22 @@ public class UpdateHint 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 "Updating is not needed in jME3, check your update order if you need to call this.";
+        //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:
     //Name of the hint in the Options window:
     @Override
     @Override
     public String getId() {
     public String getId() {
-        return "Update States / Bound";
+        //return "Update States / Bound";
+        return NbBundle.getMessage(UpdateHint.class, "UpdateHint.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 calls to updateGeometricState(), updateLogicalState() and updateModelBound().";
+        //return "Checks for calls to updateGeometricState(), updateLogicalState() and updateModelBound().";
+        return NbBundle.getMessage(UpdateHint.class, "UpdateHint.description");
     }
     }
 
 
     class MessagesFix implements EnhancedFix {
     class MessagesFix implements EnhancedFix {
@@ -120,7 +124,8 @@ public class UpdateHint extends AbstractHint {
 
 
         @Override
         @Override
         public String getText() {
         public String getText() {
-            return "Remove this call";
+            //return "Remove this call";
+            return NbBundle.getMessage(UpdateHint.class, "UpdateHint.fix-text");
         }
         }
 
 
         @Override
         @Override