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:
@ -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() {
|
||||
|
Reference in New Issue
Block a user