Skip to content

Commit 8fdd5f7

Browse files
committed
moving this into JavaMode
1 parent f0dc231 commit 8fdd5f7

4 files changed

Lines changed: 23 additions & 18 deletions

File tree

app/src/processing/app/Mode.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,10 @@ public void prepareExportFolder(File targetFolder) {
937937
// }
938938

939939

940-
public String getSearchPath() {
941-
return null;
942-
}
940+
// this is Java-specific, so keeping it in JavaMode
941+
// public String getSearchPath() {
942+
// return null;
943+
// }
943944

944945

945946
@Override

build/shared/revisions.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ the bugs. See "your contributions are funding graphics fixes," below.
6767
+ Implement add(x, y) and sub(x, y) in PVector
6868
https://github.com/processing/processing/issues/3593
6969

70+
+ Add method to JavaMode for search path
71+
https://github.com/processing/processing/pull/3648
72+
7073

7174
[ google summer of code ]
7275

java/src/processing/mode/java/pdex/ASTGenerator.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -306,34 +306,34 @@ protected void done() {
306306
protected void loadJars() {
307307
factory = new ClassPathFactory();
308308

309-
StringBuilder tehPath = new StringBuilder();
310-
String modeClassPath = editor.getMode().getSearchPath();
309+
StringBuilder path = new StringBuilder();
310+
String modeClassPath = ((JavaMode) editor.getMode()).getSearchPath();
311311
if (modeClassPath != null) {
312-
tehPath.append(modeClassPath);
312+
path.append(modeClassPath);
313313
}
314314

315315
if (errorCheckerService.classpathJars != null) {
316316
synchronized (errorCheckerService.classpathJars) {
317317
for (URL jarPath : errorCheckerService.classpathJars) {
318318
//log(jarPath.getPath());
319-
tehPath.append(jarPath.getPath() + File.pathSeparatorChar);
319+
path.append(jarPath.getPath() + File.pathSeparatorChar);
320320
}
321321
}
322322
}
323323

324-
classPath = factory.createFromPath(tehPath.toString());
324+
classPath = factory.createFromPath(path.toString());
325325
log("Classpath created " + (classPath != null));
326326
log("Sketch classpath jars loaded.");
327327
if (Platform.isMacOS()) {
328-
File f = new File(System.getProperty("java.home") + File.separator + "bundle"
329-
+ File.separator + "Classes" + File.separator + "classes.jar");
330-
log(f.getAbsolutePath() + " | classes.jar found?"
331-
+ f.exists());
328+
File f = new File(System.getProperty("java.home") +
329+
File.separator + "bundle" +
330+
File.separator + "Classes" +
331+
File.separator + "classes.jar");
332+
log(f.getAbsolutePath() + " | classes.jar found?" + f.exists());
332333
} else {
333-
File f = new File(System.getProperty("java.home") + File.separator
334-
+ "lib" + File.separator + "rt.jar" + File.separator);
335-
log(f.getAbsolutePath() + " | rt.jar found?"
336-
+ f.exists());
334+
File f = new File(System.getProperty("java.home") + File.separator +
335+
"lib" + File.separator + "rt.jar" + File.separator);
336+
log(f.getAbsolutePath() + " | rt.jar found?" + f.exists());
337337
}
338338
}
339339

@@ -3523,8 +3523,7 @@ protected boolean ignorableImport(String impName, String fullClassName) {
35233523
if (impName.startsWith("processing")) {
35243524
if (JavaMode.suggestionsMap.get(processingInclude).contains(impName)) {
35253525
return false;
3526-
} else if (JavaMode.suggestionsMap.get(processingExclude)
3527-
.contains(impName)) {
3526+
} else if (JavaMode.suggestionsMap.get(processingExclude).contains(impName)) {
35283527
return true;
35293528
}
35303529
} else if (impName.startsWith("java")) {

todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ X https://github.com/processing/processing/pull/3630
6363
X Set font correctly in Contribution Manager dialog
6464
X https://github.com/processing/processing/issues/3601
6565
X https://github.com/processing/processing/pull/3626
66+
X Add method to JavaMode for search path
67+
X https://github.com/processing/processing/pull/3648
6668

6769
earlier
6870
X closing the color selector makes things freeze (only Linux and Windows?)

0 commit comments

Comments
 (0)