mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge branch 'master' of github.com:processing/processing
This commit is contained in:
@@ -350,6 +350,7 @@ editor.status.missing.right_curly_bracket = Missing right curly bracket "}"
|
||||
editor.status.missing.add = Consider adding "%s"
|
||||
editor.status.reserved_words = "color" and "int" are reserved words & cannot be used as variable names
|
||||
editor.status.undefined_method = The function "%s(%s)" does not exist
|
||||
editor.status.undefined_constructor = The constructor "%s(%s)" does not exist
|
||||
editor.status.empty_param = The function "%s()" does not expect any parameters
|
||||
editor.status.wrong_param = The function "%s()" expects parameters like: "%s(%s)"
|
||||
editor.status.undef_global_var = The global variable "%s" does not exist
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.util.TreeMap;
|
||||
import org.eclipse.jdt.core.compiler.IProblem;
|
||||
import org.eclipse.jdt.internal.compiler.problem.DefaultProblem;
|
||||
|
||||
import processing.app.Base;
|
||||
import processing.app.Language;
|
||||
import processing.core.PApplet;
|
||||
import processing.data.StringList;
|
||||
@@ -163,6 +164,21 @@ public class ErrorMessageSimplifier {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IProblem.UndefinedConstructor:
|
||||
if (args.length == 2) {
|
||||
String constructorName = args[0];
|
||||
// For messages such as "contructor sketch_name.ClassXYZ() is undefined", change
|
||||
// constructor name to "ClassXYZ()". See #3434
|
||||
if (constructorName.contains(".")) {
|
||||
// arg[0] contains sketch name twice: sketch_150705a.sketch_150705a.Thing
|
||||
constructorName = constructorName.substring(constructorName.indexOf('.') + 1);
|
||||
constructorName = constructorName.substring(constructorName.indexOf('.') + 1);
|
||||
}
|
||||
String constructorArgs = removePackagePrefixes(args[args.length - 1]);
|
||||
result = Language.interpolate("editor.status.undefined_constructor", constructorName, constructorArgs);
|
||||
}
|
||||
break;
|
||||
|
||||
case IProblem.UndefinedMethod:
|
||||
if (args.length > 2) {
|
||||
|
||||
Reference in New Issue
Block a user