This commit is contained in:
Manindra Moharana
2015-09-07 20:53:46 -07:00
parent 78626a598b
commit 074b306d4a
3 changed files with 17 additions and 18 deletions

View File

@@ -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);

View File

@@ -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(".*");
}
}

View File

@@ -181,6 +181,7 @@ public class JavaTextArea extends JEditTextArea {
if (suggestion.isVisible()) {
prepareSuggestions(evt);
}
return;
}
}