Skip to content

Commit 2caed0d

Browse files
committed
Adjust Problem changes
1 parent ec9282e commit 2caed0d

3 files changed

Lines changed: 2 additions & 11 deletions

File tree

build/shared/lib/languages/PDE.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ editor.status.type_mismatch = Type mismatch, "%s" does not match with "%s"
370370
editor.status.unused_variable = The value of the local variable "%s" is not used
371371
editor.status.uninitialized_variable = The local variable "%s" may not have been initialized
372372
editor.status.no_effect_assignment = The assignment to variable "%s" has no effect
373-
editor.status.hiding_enclosing_type = The class "%s" cannot have the same name as the name of your sketch
373+
editor.status.hiding_enclosing_type = The class "%s" cannot have the same name as your sketch or its' enclosing class
374374

375375
# Footer buttons
376376
editor.footer.errors = Errors

java/src/processing/mode/java/pdex/ErrorMessageSimplifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public static String getSimplifiedErrorMessage(Problem problem) {
256256
break;
257257

258258
case IProblem.HidingEnclosingType:
259-
if (args.length > 0 && args[0].equals(problem.getClassName())) {
259+
if (args.length > 0) {
260260
result = Language.interpolate("editor.status.hiding_enclosing_type", args[0]);
261261
}
262262
}

java/src/processing/mode/java/pdex/Problem.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ public class Problem implements ErrorTable.Entry {
3737
* The IProblem which is being wrapped
3838
*/
3939
private IProblem iProblem;
40-
/**
41-
* The class name for the current sketch
42-
*/
43-
private String className;
4440
/**
4541
* The tab number to which the error belongs to
4642
*/
@@ -87,7 +83,6 @@ else if(iProblem.isWarning()) {
8783
}
8884
this.tabIndex = tabIndex;
8985
this.lineNumber = lineNumber;
90-
this.className = iProblem.getArguments()[0];
9186
this.message = process(iProblem);
9287
this.message = ErrorMessageSimplifier.getSimplifiedErrorMessage(this);
9388
//ErrorMessageSimplifier.getSimplifiedErrorMessage(this);
@@ -128,10 +123,6 @@ public IProblem getIProblem() {
128123
return iProblem;
129124
}
130125

131-
public String getClassName() {
132-
return className;
133-
}
134-
135126
public int getTabIndex() {
136127
return tabIndex;
137128
}

0 commit comments

Comments
 (0)