From ec6010bf45d7545d5c9b25a3b90f3e77bda1f56d Mon Sep 17 00:00:00 2001 From: Rostyslav Zatserkovnyi Date: Mon, 9 May 2016 00:48:37 +0300 Subject: [PATCH] Adjust Problem changes --- build/shared/lib/languages/PDE.properties | 2 +- .../mode/java/pdex/ErrorMessageSimplifier.java | 2 +- java/src/processing/mode/java/pdex/Problem.java | 9 --------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/build/shared/lib/languages/PDE.properties b/build/shared/lib/languages/PDE.properties index c20b773b4..7a5e08644 100644 --- a/build/shared/lib/languages/PDE.properties +++ b/build/shared/lib/languages/PDE.properties @@ -370,7 +370,7 @@ editor.status.type_mismatch = Type mismatch, "%s" does not match with "%s" editor.status.unused_variable = The value of the local variable "%s" is not used editor.status.uninitialized_variable = The local variable "%s" may not have been initialized editor.status.no_effect_assignment = The assignment to variable "%s" has no effect -editor.status.hiding_enclosing_type = The class "%s" cannot have the same name as the name of your sketch +editor.status.hiding_enclosing_type = The class "%s" cannot have the same name as your sketch or its' enclosing class # Footer buttons editor.footer.errors = Errors diff --git a/java/src/processing/mode/java/pdex/ErrorMessageSimplifier.java b/java/src/processing/mode/java/pdex/ErrorMessageSimplifier.java index 082ea51df..806170898 100644 --- a/java/src/processing/mode/java/pdex/ErrorMessageSimplifier.java +++ b/java/src/processing/mode/java/pdex/ErrorMessageSimplifier.java @@ -256,7 +256,7 @@ public class ErrorMessageSimplifier { break; case IProblem.HidingEnclosingType: - if (args.length > 0 && args[0].equals(problem.getClassName())) { + if (args.length > 0) { result = Language.interpolate("editor.status.hiding_enclosing_type", args[0]); } } diff --git a/java/src/processing/mode/java/pdex/Problem.java b/java/src/processing/mode/java/pdex/Problem.java index 42b9ea42e..8d8fac2e0 100644 --- a/java/src/processing/mode/java/pdex/Problem.java +++ b/java/src/processing/mode/java/pdex/Problem.java @@ -37,10 +37,6 @@ public class Problem implements ErrorTable.Entry { * The IProblem which is being wrapped */ private IProblem iProblem; - /** - * The class name for the current sketch - */ - private String className; /** * The tab number to which the error belongs to */ @@ -87,7 +83,6 @@ public class Problem implements ErrorTable.Entry { } this.tabIndex = tabIndex; this.lineNumber = lineNumber; - this.className = iProblem.getArguments()[0]; this.message = process(iProblem); this.message = ErrorMessageSimplifier.getSimplifiedErrorMessage(this); //ErrorMessageSimplifier.getSimplifiedErrorMessage(this); @@ -128,10 +123,6 @@ public class Problem implements ErrorTable.Entry { return iProblem; } - public String getClassName() { - return className; - } - public int getTabIndex() { return tabIndex; }