private List<String> loadAdditionalSourceRoots(String projectRoot) { if (projectRoot == null) { return null; } return (List<String>) sourcesProperties.getProperties("additional_source_roots"). getMap("project", Collections.emptyMap()). get(projectRoot); }
private Set<String> loadDisabledSourceRoots(String projectRoot) { if (projectRoot == null) { return null; } return (Set<String>) sourcesProperties.getProperties("source_roots"). getMap("project_disabled", Collections.emptyMap()). get(projectRoot); }
private List<String> loadAdditionalSourceRoots(String projectRoot) { if (projectRoot == null) { return null; } return (List<String>) sourcesProperties.getProperties("additional_source_roots"). getMap("project", Collections.emptyMap()). get(projectRoot); }
private Set<String> loadDisabledSourceRoots(String projectRoot) { if (projectRoot == null) { return null; } return (Set<String>) sourcesProperties.getProperties("source_roots"). getMap("project_disabled", Collections.emptyMap()). get(projectRoot); }
private Set<String> getDisabledSourceRoots(File baseDir) { try { String root = Utilities.toURI(baseDir).toURL().toExternalForm(); Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); return (Set<String>) sourcesProperties.getProperties("source_roots"). getMap("project_disabled", Collections.emptyMap()). get(root); } catch (MalformedURLException ex) { Exceptions.printStackTrace(ex); return null; } }
private synchronized void saveDisabledSourceRoots () { Map map = sourcesProperties.getProperties("source_roots"). getMap("project_disabled", new HashMap()); map.put(projectRoot, disabledSourceRoots); sourcesProperties.getProperties("source_roots"). setMap("project_disabled", map); }
private synchronized void saveAdditionalSourceRoots () { Map map = sourcesProperties.getProperties("additional_source_roots"). getMap("project", new HashMap()); map.put(projectRoot, additionalSourceRoots); sourcesProperties.getProperties("additional_source_roots"). setMap("project", map); }
private synchronized void saveDisabledSourceRoots () { Map map = sourcesProperties.getProperties("source_roots"). getMap("project_disabled", new HashMap()); map.put(projectRoot, disabledSourceRoots); sourcesProperties.getProperties("source_roots"). setMap("project_disabled", map); }
private synchronized void saveAdditionalSourceRoots () { Map map = sourcesProperties.getProperties("additional_source_roots"). getMap("project", new HashMap()); map.put(projectRoot, additionalSourceRoots); sourcesProperties.getProperties("additional_source_roots"). setMap("project", map); }
static Map<String, Integer> getSourceRootsOrder(String root) { Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); return (Map<String, Integer>) sourcesProperties.getProperties("source_roots"). getMap("project_order", Collections.emptyMap()). get(root); }
static Map<String, Integer> getRemoteSourceRootsOrder() { Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); return (Map<String, Integer>) sourcesProperties.getProperties("source_roots"). getMap("remote_order", Collections.emptyMap()); }
private ClassPath getAdditionalClassPath(File baseDir) { try { String root = Utilities.toURI(baseDir).toURL().toExternalForm(); Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); List<String> additionalSourceRoots = (List<String>) sourcesProperties. getProperties("additional_source_roots"). getMap("project", Collections.emptyMap()). get(root); if (additionalSourceRoots == null || additionalSourceRoots.isEmpty()) { return null; } List<FileObject> additionalSourcePath = new ArrayList<FileObject>(additionalSourceRoots.size()); for (String ar : additionalSourceRoots) { FileObject fo = getFileObject(ar); if (fo != null && fo.canRead()) { additionalSourcePath.add(fo); } } this.additionalSourceRoots = new LinkedHashSet<String>(additionalSourceRoots); return createClassPath( additionalSourcePath.toArray(new FileObject[0])); } catch (MalformedURLException ex) { Exceptions.printStackTrace(ex); return null; } }
private void storeDisabledSourceRoots(Set<String> disabledSourceRoots) { Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); if (baseDir != null) { String projectRoot; try { projectRoot = Utilities.toURI(baseDir).toURL().toExternalForm(); } catch (MalformedURLException ex) { Exceptions.printStackTrace(ex); return ; } Map map = sourcesProperties.getProperties("source_roots"). getMap("project_disabled", new HashMap()); map.put(projectRoot, disabledSourceRoots); sourcesProperties.getProperties("source_roots"). setMap("project_disabled", map); } else { sourcesProperties.getProperties("source_roots"). setCollection("remote_disabled", disabledSourceRoots); } }
private void storeAdditionalSourceRoots() { Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); if (baseDir != null) { String projectRoot; try { projectRoot = Utilities.toURI(baseDir).toURL().toExternalForm(); } catch (MalformedURLException ex) { Exceptions.printStackTrace(ex); return ; } Map map = sourcesProperties.getProperties("additional_source_roots"). getMap("project", new HashMap()); if (additionalSourceRoots != null) { map.put(projectRoot, new ArrayList<String>(additionalSourceRoots)); } else { map.remove(projectRoot); } sourcesProperties.getProperties("additional_source_roots"). setMap("project", map); } else { if (additionalSourceRoots != null) { sourcesProperties.getProperties("additional_source_roots"). setCollection("src_roots", new ArrayList<String>(additionalSourceRoots)); } else { sourcesProperties.getProperties("additional_source_roots"). setCollection("src_roots", null); } } }
private static void storeSourceRootsOrder(String projectRoot, Map<String, Integer> sourceOrder) { Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); if (projectRoot != null) { Map map = sourcesProperties.getProperties("source_roots"). getMap("project_order", new HashMap()); map.put(projectRoot, sourceOrder); sourcesProperties.getProperties("source_roots"). setMap("project_order", map); } else { sourcesProperties.getProperties("source_roots"). setMap("remote_order", sourceOrder); } }