mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 21:29:17 +01:00
Let the mode decide in which jars to search for during auto completion
This will allow Android mode to add android.jar to this searchable jars list. Signed-off-by: Umair Khan <omerjerk@gmail.com>
This commit is contained in:
@@ -263,6 +263,20 @@ public class JavaMode extends Mode {
|
||||
JavaBuild build = new JavaBuild(sketch);
|
||||
return build.exportApplication();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSearchPath() {
|
||||
StringBuilder tehPath = new StringBuilder(System.getProperty("java.class.path"));
|
||||
|
||||
// Starting with JDK 1.7, no longer using Apple's Java, so
|
||||
// rt.jar has the same path on all OSes
|
||||
tehPath.append(File.pathSeparatorChar
|
||||
+ System.getProperty("java.home") + File.separator + "lib"
|
||||
+ File.separator + "rt.jar");
|
||||
|
||||
return tehPath.toString();
|
||||
}
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
@@ -306,14 +306,7 @@ public class ASTGenerator {
|
||||
protected void loadJars() {
|
||||
factory = new ClassPathFactory();
|
||||
|
||||
StringBuilder tehPath =
|
||||
new StringBuilder(System.getProperty("java.class.path"));
|
||||
|
||||
// Starting with JDK 1.7, no longer using Apple's Java, so
|
||||
// rt.jar has the same path on all OSes
|
||||
tehPath.append(File.pathSeparatorChar
|
||||
+ System.getProperty("java.home") + File.separator + "lib"
|
||||
+ File.separator + "rt.jar" + File.pathSeparatorChar);
|
||||
StringBuilder tehPath = new StringBuilder(editor.getMode().getSearchPath());
|
||||
|
||||
if (errorCheckerService.classpathJars != null) {
|
||||
synchronized (errorCheckerService.classpathJars) {
|
||||
|
||||
Reference in New Issue
Block a user