mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 13:49:18 +01:00
Add friendlier error message for HidingEnclosingType
This commit is contained in:
@@ -254,6 +254,11 @@ public class ErrorMessageSimplifier {
|
||||
result = Language.interpolate("editor.status.no_effect_assignment", args[0]);
|
||||
}
|
||||
break;
|
||||
|
||||
case IProblem.HidingEnclosingType:
|
||||
if (args.length > 0 && args[0].equals(problem.getClassName())) {
|
||||
result = Language.interpolate("editor.status.hiding_enclosing_type", args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
//log("Simplified Error Msg: " + result);
|
||||
|
||||
@@ -37,6 +37,10 @@ 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
|
||||
*/
|
||||
@@ -83,6 +87,7 @@ 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);
|
||||
@@ -123,6 +128,10 @@ public class Problem implements ErrorTable.Entry {
|
||||
return iProblem;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public int getTabIndex() {
|
||||
return tabIndex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user