@Messages("LABEL_Global_Libraries=Global Libraries") private void initModel() { List<String> items = new ArrayList<String>(); items.add(LABEL_Global_Libraries()); for (LibraryManager man : LibraryManager.getOpenManagers()) { if (man.getLocation() == null) { continue; } items.add(LibrariesSupport.convertURIToFilePath(URI.create(man.getLocation().toExternalForm()))); } libraryManagerComboBox.setModel(new DefaultComboBoxModel(items.toArray(new String[items.size()]))); }
final Map<URL,LibraryManager> managerByLocation = new HashMap<URL, LibraryManager>(); for (LibraryManager manager : managers) { final URL url = manager.getLocation(); if (url != null) { managerByLocation.put(url, manager);
final Map<URL,LibraryManager> managerByLocation = new HashMap<URL, LibraryManager>(); for (LibraryManager manager : managers) { final URL url = manager.getLocation(); if (url != null) { managerByLocation.put(url, manager);
importButton.setVisible(manager.getLocation() != null && importHandler != null); JPanel inset = new JPanel(new BorderLayout()); inset.setBorder(new EmptyBorder(12,12,0,12));
/** * Create chooser for given AntProjectHelper. Standard file chooser is shown * if project is not sharable. * * @param helper ant project helper; cannot be null * @param copyAllowed is file copying allowed */ public FileChooser(AntProjectHelper helper, boolean copyAllowed) { super(); FileObject projectFolder = helper.getProjectDirectory(); Project p = projectFolder != null ? FileOwnerQuery.getOwner(projectFolder): null; LibraryManager lm = p != null ? ReferenceHelper.getProjectLibraryManager(p) : null; if (lm != null) { URL u = lm.getLocation(); if (u != null) { File libBase = Utilities.toFile(URI.create(u.toExternalForm())).getParentFile(); accessory = new FileChooserAccessory(this, FileUtil.toFile(helper.getProjectDirectory()), libBase, copyAllowed); setAccessory(accessory); } } }
uri2 = uri; FileObject fo = LibrariesSupport.resolveLibraryEntryFileObject(lib.getManager().getLocation(), uri2); if (null == fo && !canResolveEvaluatedUri(helper.getStandardPropertyEvaluator(), lib.getManager().getLocation(), uri2)) { set.add( ProjectProblemsProvider.ProjectProblem.createError(