use of org.netbeans.api.debugger.Properties in project enclojure by EricThorsen.
the class PersistenceManager method initBreakpoints.
public Breakpoint[] initBreakpoints() {
try {
Properties p = Properties.getDefault().getProperties("debugger").getProperties(DebuggerManager.PROP_BREAKPOINTS);
Breakpoint[] breakpoints = (Breakpoint[]) p.getArray(CLOJURE_PROPERTY, new Breakpoint[0]);
for (int i = 0; i < breakpoints.length; i++) {
breakpoints[i].addPropertyChangeListener(this);
}
return breakpoints;
} catch (Exception exc) {
LOG.log(Level.SEVERE, exc.getMessage());
exc.printStackTrace();
}
return new Breakpoint[] {};
}
use of org.netbeans.api.debugger.Properties in project enclojure by EricThorsen.
the class PersistenceManager method breakpointRemoved.
public void breakpointRemoved(Breakpoint breakpoint) {
if (breakpoint instanceof ClojureLineBreakpoint) {
Properties p = Properties.getDefault().getProperties("debugger").getProperties(DebuggerManager.PROP_BREAKPOINTS);
p.setArray(CLOJURE_PROPERTY, getBreakpoints());
breakpoint.removePropertyChangeListener(this);
}
}
use of org.netbeans.api.debugger.Properties in project enclojure by EricThorsen.
the class CljSourcePath method initSourcePaths.
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));
}
use of org.netbeans.api.debugger.Properties in project enclojure by EricThorsen.
the class PersistenceManager method breakpointAdded.
public void breakpointAdded(Breakpoint breakpoint) {
if (breakpoint instanceof ClojureLineBreakpoint) {
Properties p = Properties.getDefault().getProperties("debugger").getProperties(DebuggerManager.PROP_BREAKPOINTS);
p.setArray(CLOJURE_PROPERTY, getBreakpoints());
breakpoint.addPropertyChangeListener(this);
}
}
Aggregations