mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
Fixes #3720
This commit is contained in:
@@ -1297,24 +1297,15 @@ public class ASTGenerator {
|
||||
|
||||
for (ImportStatement impS : imports) {
|
||||
String temp = impS.getPackageName();
|
||||
|
||||
if (temp.endsWith("*")) {
|
||||
temp = temp.substring(0, temp.length() - 1) + className;
|
||||
} else {
|
||||
int x = temp.lastIndexOf('.');
|
||||
//log("fclife " + temp.substring(x + 1));
|
||||
if (!temp.substring(x + 1).equals(className)) {
|
||||
continue;
|
||||
}
|
||||
if (impS.isStarredImport() && className.indexOf('.') == -1) {
|
||||
temp = impS.getPackageName() + "." + className;
|
||||
}
|
||||
tehClass = loadClass(temp);
|
||||
if (tehClass != null) {
|
||||
log(tehClass.getName() + " located.");
|
||||
return tehClass;
|
||||
}
|
||||
|
||||
//log("Doesn't exist in package: " + impS.getImportName());
|
||||
|
||||
//log("Doesn't exist in imp package: " + impS.getImportName());
|
||||
}
|
||||
|
||||
PdePreprocessor p = new PdePreprocessor(null);
|
||||
|
||||
@@ -69,11 +69,18 @@ public class ImportStatement {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public int getTab() {
|
||||
return tab;
|
||||
}
|
||||
public int getTab() {
|
||||
return tab;
|
||||
}
|
||||
|
||||
public int getLineNumber() {
|
||||
return lineNumber;
|
||||
}
|
||||
public int getLineNumber() {
|
||||
return lineNumber;
|
||||
}
|
||||
|
||||
public boolean isStarredImport() {
|
||||
String ret = new String(importName.trim());
|
||||
if(ret.endsWith(";"))
|
||||
ret = ret.substring(0, ret.length() - 1).trim();
|
||||
return ret.endsWith(".*");
|
||||
}
|
||||
}
|
||||
@@ -181,6 +181,7 @@ public class JavaTextArea extends JEditTextArea {
|
||||
if (suggestion.isVisible()) {
|
||||
prepareSuggestions(evt);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user