video working, more work on libraries & import/export

This commit is contained in:
benfry
2004-09-21 19:18:18 +00:00
parent 6cdade27e3
commit 4f3cc80a43
5 changed files with 89 additions and 45 deletions

View File

@@ -72,7 +72,7 @@ public class PdeSketch {
String classPath;
String libraryPath;
boolean externalRuntime;
Vector importedLibraries; // vec of File objects
/**
* path is location of the main .pde file, because this is also
@@ -1138,6 +1138,19 @@ public class PdeSketch {
throw new PdeException(ex.toString());
}
// grab the imports from the code just preproc'd
importedLibraries = new Vector();
String imports[] = preprocessor.extraImports;
for (int i = 0; i < imports.length; i++) {
// remove things up to the last dot
String entry = imports[i].substring(0, imports[i].lastIndexOf('.'));
System.out.println("found package " + entry);
Object libFolder = PdeSketchbook.importToLibraryTable.get(entry);
System.out.println(" found lib folder " + libFolder);
importedLibraries.add(libFolder);
}
// 3. then loop over the code[] and save each .java file