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 static Object[] getSavedConditions() { return Properties.getDefault().getProperties("debugger.javascript"). getArray("BPConditions", new Object[0]); }
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); }
Properties.getDefault().getProperties("debugger.javascript"). setArray("BPConditions", conditions);
private void initSourcePaths () { Properties properties = Properties.getDefault (). getProperties ("debugger").getProperties ("sources"); Set originalSourceRoots = new HashSet (Arrays.asList ( sourcePathProvider.getOriginalSourceRoots () )); Set sourceRoots = new HashSet (Arrays.asList ( sourcePathProvider.getSourceRoots () )); Iterator enabledSourceRoots = properties.getProperties ("source_roots"). getCollection ("enabled", Collections.EMPTY_SET).iterator (); while (enabledSourceRoots.hasNext ()) { String root = (String) enabledSourceRoots.next (); if (originalSourceRoots.contains (root)) sourceRoots.add (root); } Iterator disabledSourceRoots = properties.getProperties ("source_roots"). getCollection ("disabled", Collections.EMPTY_SET).iterator (); while (disabledSourceRoots.hasNext ()) { String root = (String) disabledSourceRoots.next (); sourceRoots.remove (root); } String[] ss = new String [sourceRoots.size ()]; sourcePathProvider.setSourceRoots ((String[]) sourceRoots.toArray (ss)); }
private Set<String> getRemoteDisabledSourceRoots() { Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); return (Set<String>) sourcesProperties.getProperties("source_roots"). getCollection("remote_disabled", Collections.emptySet()); }
public void propertyChange (PropertyChangeEvent evt) { if (evt.getSource() instanceof Breakpoint) { Properties.getDefault ().getProperties ("debugger"). getProperties (DebuggerManager.PROP_BREAKPOINTS).setArray ( JSP_PROPERTY, getBreakpoints () ); } }
private List<FileObject> getAdditionalRemoteClassPath() { Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); List<String> additionalSourceRoots = (List<String>) sourcesProperties. getProperties("additional_source_roots"). getCollection("src_roots", Collections.emptyList()); 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 additionalSourcePath; //return ClassPathSupport.createClassPath( // additionalSourcePath.toArray(new FileObject[0])); }
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); } }
public Breakpoint[] initBreakpoints () { Properties p = Properties.getDefault ().getProperties ("debugger"). getProperties (DebuggerManager.PROP_BREAKPOINTS); Breakpoint[] breakpoints = (Breakpoint[]) p.getArray (
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); } }
public void breakpointRemoved (Breakpoint breakpoint) { if (breakpoint instanceof JspLineBreakpoint) { Properties p = Properties.getDefault ().getProperties ("debugger"). getProperties (DebuggerManager.PROP_BREAKPOINTS); p.setArray ( JSP_PROPERTY, getBreakpoints () ); breakpoint.removePropertyChangeListener(this); } } public void watchAdded (Watch watch) {
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); } } }
public void breakpointAdded (Breakpoint breakpoint) { if (breakpoint instanceof JspLineBreakpoint) { Properties p = Properties.getDefault ().getProperties ("debugger"). getProperties (DebuggerManager.PROP_BREAKPOINTS); p.setArray ( JSP_PROPERTY, getBreakpoints () ); breakpoint.addPropertyChangeListener(this); } }
boolean canFixClasses = Properties.getDefault().getProperties("debugger.options.JPDA"). getBoolean("ApplyCodeChangesOnSave", CAN_FIX_CLASSES_AUTOMATICALLY); if (logger.isLoggable(Level.FINE)) {
private int[] sourcePathPermutation; private Properties sourcesProperties = Properties. getDefault ().getProperties ("debugger").getProperties ("sources"); private GlobalPathRegistryListener globalRegistryListener;
static Line showSourceLine (String url, int lineNumber, Object timeStamp) { Line l = LineTranslations.getTranslations().getLine (url, lineNumber, timeStamp); // false = use original ln if (l == null) { ErrorManager.getDefault().log(ErrorManager.WARNING, "Show Source: Have no line for URL = "+url+", line number = "+lineNumber); return null; } Properties p = Properties.getDefault().getProperties("debugger.options.JPDA"); boolean reuseEditorTabs = p.getBoolean("ReuseEditorTabs", true); if ("true".equalsIgnoreCase(fronting)) { if (reuseEditorTabs) { l.show (ShowOpenType.REUSE, ShowVisibilityType.FOCUS); } else { l.show (ShowOpenType.OPEN, ShowVisibilityType.FOCUS); } l.show (ShowOpenType.OPEN, ShowVisibilityType.FRONT); //FIX 47825 } else { if (reuseEditorTabs) { l.show (ShowOpenType.REUSE, ShowVisibilityType.FOCUS); } else { l.show (ShowOpenType.OPEN, ShowVisibilityType.FOCUS); } } return l; }
static Line showSourceLine (String url, int lineNumber, Object timeStamp) { Line l = LineTranslations.getTranslations().getLine (url, lineNumber, timeStamp); // false = use original ln if (l == null) { ErrorManager.getDefault().log(ErrorManager.WARNING, "Show Source: Have no line for URL = "+url+", line number = "+lineNumber); return null; } Properties p = Properties.getDefault().getProperties("debugger.options.JPDA"); boolean reuseEditorTabs = p.getBoolean("ReuseEditorTabs", true); if ("true".equalsIgnoreCase(fronting)) { if (reuseEditorTabs) { l.show (ShowOpenType.REUSE, ShowVisibilityType.FOCUS); } else { l.show (ShowOpenType.OPEN, ShowVisibilityType.FOCUS); } l.show (ShowOpenType.OPEN, ShowVisibilityType.FRONT); //FIX 47825 } else { if (reuseEditorTabs) { l.show (ShowOpenType.REUSE, ShowVisibilityType.FOCUS); } else { l.show (ShowOpenType.OPEN, ShowVisibilityType.FOCUS); } } return l; }