Skip to content

Commit 16922cd

Browse files
committed
Merge pull request #50 from grizeldi/master
Moved strings from codechecks to bundle.properties
2 parents be46130 + 2b2b7d1 commit 16922cd

File tree

5 files changed

+36
-16
lines changed

5 files changed

+36
-16
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
UpdateHint.display-name=Updating is not needed in jME3, check your update order if you need to call this.
2+
UpdateHint.id=Update States / Bound
3+
UpdateHint.description=Checks for calls to updateGeometricState(), updateLogicalState() and updateModelBound().
4+
UpdateHint.fix-text=Remove this call
5+
TempVarsHint.display-name=TempVars might not be released
6+
TempVarsHint.id=TempVars release check
7+
TempVarsHint.description=Checks for calls TempVars.get() and search for correspondinng release() call
8+
TempVarsHint.fix-text=Add a release() call at the end of the method
9+
ReadOnlyPrimitiveHint.display-name=This primitive is read only and should not be modified!
10+
ReadOnlyPrimitiveHint.id=ReadOnly Primitives
11+
ReadOnlyPrimitiveHint.description=Checks for modifications to readonly primitives. (getLocalTranslation().set())
12+
ReadOnlyPrimitiveHint.fix-text=Remove this call
13+
InternalMethodHint.display-name=You should not call this method, its for internal use only!
14+
InternalMethodHint.id=Internal Methods
15+
InternalMethodHint.description=Checks for calls to internal methods.
16+
InternalMethodHint.fix-text=Remove this call

jme3-code-check/src/com/jme3/gde/codecheck/hints/InternalMethodHint.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
2323
import org.netbeans.spi.editor.hints.Fix;
2424
import org.openide.awt.StatusDisplayer;
25+
import org.openide.util.NbBundle;
2526

2627
public class InternalMethodHint extends AbstractHint {
2728

@@ -84,19 +85,19 @@ public void cancel() {
8485
//Message that the user sees in the left sidebar:
8586
@Override
8687
public String getDisplayName() {
87-
return "You should not call this method, its for internal use only!";
88+
return NbBundle.getMessage(InternalMethodHint.class, "InternalMethodHint.display-name");
8889
}
8990

9091
//Name of the hint in the Options window:
9192
@Override
9293
public String getId() {
93-
return "Internal Methods";
94+
return NbBundle.getMessage(InternalMethodHint.class, "InternalMethodHint.id");
9495
}
9596

9697
//Description of the hint in the Options window:
9798
@Override
9899
public String getDescription() {
99-
return "Checks for calls to internal methods.";
100+
return NbBundle.getMessage(InternalMethodHint.class, "InternalMethodHint.description");
100101
}
101102

102103
class MessagesFix implements EnhancedFix {
@@ -118,7 +119,7 @@ public CharSequence getSortText() {
118119

119120
@Override
120121
public String getText() {
121-
return "Remove this call";
122+
return NbBundle.getMessage(InternalMethodHint.class, "InternalMethodHint.fix-text");
122123
}
123124

124125
@Override

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
2222
import org.netbeans.spi.editor.hints.Fix;
2323
import org.openide.awt.StatusDisplayer;
24+
import org.openide.util.NbBundle;
2425

2526
public class ReadOnlyPrimitiveHint extends AbstractHint {
2627

@@ -94,19 +95,19 @@ public void cancel() {
9495
//Message that the user sees in the left sidebar:
9596
@Override
9697
public String getDisplayName() {
97-
return "This primitive is read only and should not be modified!";
98+
return NbBundle.getMessage(ReadOnlyPrimitiveHint.class, "ReadOnlyPrimitiveHint.display-name");
9899
}
99100

100101
//Name of the hint in the Options window:
101102
@Override
102103
public String getId() {
103-
return "ReadOnly Primitives";
104+
return NbBundle.getMessage(ReadOnlyPrimitiveHint.class, "ReadOnlyPrimitiveHint.id");
104105
}
105106

106107
//Description of the hint in the Options window:
107108
@Override
108109
public String getDescription() {
109-
return "Checks for modifications to readonly primitives. (getLocalTranslation().set())";
110+
return NbBundle.getMessage(ReadOnlyPrimitiveHint.class, "ReadOnlyPrimitiveHint.description");
110111
}
111112

112113
class MessagesFix implements EnhancedFix {
@@ -128,7 +129,7 @@ public CharSequence getSortText() {
128129

129130
@Override
130131
public String getText() {
131-
return "Remove this call";
132+
return NbBundle.getMessage(ReadOnlyPrimitiveHint.class, "ReadOnlyPrimitiveHint.fix-text");
132133
}
133134

134135
@Override

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
2525
import org.netbeans.spi.editor.hints.Fix;
2626
import org.openide.awt.StatusDisplayer;
27+
import org.openide.util.NbBundle;
2728

2829
public class TempVarsHint extends AbstractHint {
2930

@@ -135,19 +136,19 @@ public void cancel() {
135136
//Message that the user sees in the left sidebar:
136137
@Override
137138
public String getDisplayName() {
138-
return "TempVars might not be released";
139+
return NbBundle.getMessage(TempVarsHint.class, "TempVarsHint.display-name");
139140
}
140141

141142
//Name of the hint in the Options window:
142143
@Override
143144
public String getId() {
144-
return "TempVars release check";
145+
return NbBundle.getMessage(TempVarsHint.class, "TempVarsHint.id");
145146
}
146147

147148
//Description of the hint in the Options window:
148149
@Override
149150
public String getDescription() {
150-
return "Checks for calls TempVars.get() and search for correspondinng release() call";
151+
return NbBundle.getMessage(TempVarsHint.class, "TempVarsHint.description");
151152
}
152153

153154
class MessagesFix implements EnhancedFix {
@@ -169,7 +170,7 @@ public CharSequence getSortText() {
169170

170171
@Override
171172
public String getText() {
172-
return "Add a release() call at the end of the method";
173+
return NbBundle.getMessage(TempVarsHint.class, "TempVarsHint.fix-text");
173174
}
174175

175176
@Override

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
2222
import org.netbeans.spi.editor.hints.Fix;
2323
import org.openide.awt.StatusDisplayer;
24+
import org.openide.util.NbBundle;
2425

2526
public class UpdateHint extends AbstractHint {
2627

@@ -86,19 +87,19 @@ public void cancel() {
8687
//Message that the user sees in the left sidebar:
8788
@Override
8889
public String getDisplayName() {
89-
return "Updating is not needed in jME3, check your update order if you need to call this.";
90+
return NbBundle.getMessage(UpdateHint.class, "UpdateHint.display-name");
9091
}
9192

9293
//Name of the hint in the Options window:
9394
@Override
9495
public String getId() {
95-
return "Update States / Bound";
96+
return NbBundle.getMessage(UpdateHint.class, "UpdateHint.id");
9697
}
9798

9899
//Description of the hint in the Options window:
99100
@Override
100101
public String getDescription() {
101-
return "Checks for calls to updateGeometricState(), updateLogicalState() and updateModelBound().";
102+
return NbBundle.getMessage(UpdateHint.class, "UpdateHint.description");
102103
}
103104

104105
class MessagesFix implements EnhancedFix {
@@ -120,7 +121,7 @@ public CharSequence getSortText() {
120121

121122
@Override
122123
public String getText() {
123-
return "Remove this call";
124+
return NbBundle.getMessage(UpdateHint.class, "UpdateHint.fix-text");
124125
}
125126

126127
@Override

0 commit comments

Comments
 (0)