| 332 | */ |
| 333 | // public void addPackageList(HashMap<String,Library> importToLibraryTable) { |
| 334 | public void addPackageList(Map<String, List<Library>> importToLibraryTable) { |
| 335 | // PApplet.println(packages); |
| 336 | for (String pkg : packageList) { |
| 337 | // pw.println(pkg + "\t" + libraryFolder.getAbsolutePath()); |
| 338 | // PApplet.println(pkg + "\t" + getName()); |
| 339 | // Library library = importToLibraryTable.get(pkg); |
| 340 | List<Library> libraries = importToLibraryTable.get(pkg); |
| 341 | if (libraries == null) { |
| 342 | libraries = new ArrayList<>(); |
| 343 | importToLibraryTable.put(pkg, libraries); |
| 344 | } else { |
| 345 | if (Base.DEBUG) { |
| 346 | System.err.println("The library found in"); |
| 347 | System.err.println(getPath()); |
| 348 | System.err.println("conflicts with"); |
| 349 | for (Library library : libraries) { |
| 350 | System.err.println(library.getPath()); |
| 351 | } |
| 352 | System.err.println("which already define(s) the package " + pkg); |
| 353 | System.err.println("If you have a line in your sketch that reads"); |
| 354 | System.err.println("import " + pkg + ".*;"); |
| 355 | System.err.println("Then you'll need to first remove one of those libraries."); |
| 356 | System.err.println(); |
| 357 | } |
| 358 | } |
| 359 | libraries.add(this); |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | |
| 364 | public boolean hasExamples() { |