1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

(Re-)implementing syntax highlighting support for library keywords.

This commit is contained in:
David A. Mellis
2009-07-12 00:40:02 +00:00
parent f0c3263b2f
commit 59a85bfe59
2 changed files with 63 additions and 47 deletions

View File

@ -75,7 +75,9 @@ public class Base {
static private File librariesFolder;
static private File toolsFolder;
static private File hardwareFolder;
static HashSet<File> libraries;
// maps imported packages to their library folder
static HashMap<String, File> importToLibraryTable;
@ -962,6 +964,9 @@ public class Base {
public void rebuildImportMenu(JMenu importMenu) {
//System.out.println("rebuilding import menu");
importMenu.removeAll();
// reset the set of libraries
libraries = new HashSet<File>();
// reset the table mapping imports to libraries
importToLibraryTable = new HashMap<String, File>();
@ -1148,6 +1153,7 @@ public class Base {
// // need to associate each import with a library folder
// String packages[] =
// Compiler.packageListFromClassPath(libraryClassPath);
libraries.add(subfolder);
String packages[] = Compiler.headerListFromIncludePath(subfolder.getAbsolutePath());
for (String pkg : packages) {
importToLibraryTable.put(pkg, subfolder);
@ -1393,6 +1399,11 @@ public class Base {
}
return null;
}
static public Set<File> getLibraries() {
return libraries;
}
static public String getExamplesPath() {