public LibraryStorageArea createArea() { for (ArealLibraryProvider alp : Lookup.getDefault().lookupAll(ArealLibraryProvider.class)) { LibraryStorageArea area = alp.createArea(); if (area != null) { createdAreas.add(area.getLocation()); area2Storage.put(area, alp); propertyChange(null); // recompute libraries & fire change return area; } } return null; }
@NonNull private LibraryStorageArea findLibraryStorageArea(@NonNull final URL u) { for (ArealLibraryProvider<?,?> alp : Lookup.getDefault().lookupAll(ArealLibraryProvider.class)) { for (LibraryStorageArea area : alp.getOpenAreas()) { if (u.toString().equals(area.getLocation().toString())) { return area; } } } return LibraryStorageArea.GLOBAL; }
public Collection<? extends LibraryStorageArea> getAreas() { Set<LibraryStorageArea> areas = new HashSet<LibraryStorageArea>(); for (ArealLibraryProvider<?,?> alp : Lookup.getDefault().lookupAll(ArealLibraryProvider.class)) { for (LibraryStorageArea area : alp.getOpenAreas()) { area2Storage.put(area, alp); areas.add(area); } } for (ArealLibraryProvider alp : Lookup.getDefault().lookupAll(ArealLibraryProvider.class)) { for (URL location : createdAreas) { LibraryStorageArea area = alp.loadArea(location); if (area != null) { assert area.getLocation().equals(location) : "Bad location " + area.getLocation() + " does not match " + location + " from " + alp.getClass().getName(); area2Storage.put(area, alp); areas.add(area); } } } return areas; }
if (area != null) { realFile = FileUtil.normalizeFile(new File( new File(URI.create(area.getLocation().toExternalForm())).getParentFile(), f.getPath()));
if (area != null) { realFile = FileUtil.normalizeFile(new File( new File(URI.create(area.getLocation().toExternalForm())).getParentFile(), f.getPath()));
if (area != null) { realFile = FileUtil.normalizeFile(new File( new File(URI.create(area.getLocation().toExternalForm())).getParentFile(), f.getPath()));
if (area != null) { realFile = FileUtil.normalizeFile(new File( new File(URI.create(area.getLocation().toExternalForm())).getParentFile(), f.getPath()));
ServerVolumeContentModel model = (ServerVolumeContentModel)list.getModel(); LibraryStorageArea area = model.getArea(); FileObject fo = LibrariesSupport.resolveLibraryEntryFileObject(area != null ? area.getLocation() : null, uri); if (fo == null) { broken = true;
VolumeContentModel model = (VolumeContentModel)list.getModel(); LibraryStorageArea area = model.getArea(); FileObject fo = LibrariesSupport.resolveLibraryEntryFileObject(area != null ? area.getLocation() : null, uri); if (fo == null) { broken = true;
VolumeContentModel model = (VolumeContentModel)list.getModel(); LibraryStorageArea area = model.getArea(); FileObject fo = LibrariesSupport.resolveLibraryEntryFileObject(area != null ? area.getLocation() : null, uri); if (fo == null) { broken = true;
VolumeContentModel model = (VolumeContentModel)list.getModel(); LibraryStorageArea area = model.getArea(); FileObject fo = LibrariesSupport.resolveLibraryEntryFileObject(area != null ? area.getLocation() : null, uri); if (fo == null) { broken = true;
if (area != LibraryStorageArea.GLOBAL) { customizerContext = new LibraryCustomizerContextWrapper(impl, area); File f = Utilities.toFile(URI.create(area.getLocation().toExternalForm())); this.libraryLocation.setText(f.getPath()); } else {
private void addResource(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addResource File baseFolder = null; if (allowRelativePaths) { baseFolder = new File(URI.create(area.getLocation().toExternalForm())).getParentFile(); try { lastFolder = chooser.getCurrentDirectory(); addFiles (chooser.getSelectedPaths(), area != null ? area.getLocation() : null); } catch (MalformedURLException mue) { ErrorManager.getDefault().notify(mue);
private void addResource(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addResource File baseFolder = null; if (allowRelativePaths != null && allowRelativePaths.booleanValue()) { baseFolder = new File(URI.create(area.getLocation().toExternalForm())).getParentFile(); try { lastFolder = chooser.getCurrentDirectory(); addFiles (chooser.getSelectedPaths(), area != null ? area.getLocation() : null); } catch (MalformedURLException mue) { ErrorManager.getDefault().notify(mue);
private void addResource(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addResource File baseFolder = null; if (allowRelativePaths != null && allowRelativePaths.booleanValue()) { baseFolder = new File(URI.create(area.getLocation().toExternalForm())).getParentFile(); try { lastFolder = chooser.getCurrentDirectory(); addFiles (chooser.getSelectedPaths(), area != null ? area.getLocation() : null); } catch (MalformedURLException mue) { ErrorManager.getDefault().notify(mue);
File libFolder = null; if (allowRelativePaths != null && allowRelativePaths.booleanValue()) { baseFolder = new File(URI.create(area.getLocation().toExternalForm())).getParentFile(); libFolder = new File(baseFolder, impl.getName()); try { lastFolder = chooser.getCurrentDirectory(); addFiles (chooser.getSelectedPaths(), area != null ? area.getLocation() : null); } catch (MalformedURLException mue) { ErrorManager.getDefault().notify(mue);