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); } }
private Set<String> getRemoteDisabledSourceRoots() { Properties sourcesProperties = Properties.getDefault ().getProperties ("debugger").getProperties ("sources"); return (Set<String>) sourcesProperties.getProperties("source_roots"). getCollection("remote_disabled", Collections.emptySet()); }
private static Object[] getSavedConditions() { return Properties.getDefault().getProperties("debugger.javascript"). getArray("BPConditions", new Object[0]); }
private synchronized void saveAdditionalSourceRoots () { sourcesProperties.getProperties("additional_source_roots"). setCollection("src_roots", additionalSourceRoots); }
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()); }
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; }
public void propertyChange (PropertyChangeEvent evt) { if (evt.getSource() instanceof Breakpoint) { Properties.getDefault ().getProperties ("debugger"). getProperties (DebuggerManager.PROP_BREAKPOINTS).setArray ( JSP_PROPERTY, getBreakpoints () ); } }
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); }
public Object read (String typeID, Properties properties) { JspLineBreakpoint b = null; if (typeID.equals (JspLineBreakpoint.class.getName ())) { String url = properties.getString(JspLineBreakpoint.PROP_URL, null); // #110349 - ignore loading of breakpoints which do not have URL if (url == null || url.trim().length() == 0) { return null; } b = JspLineBreakpoint.create ( url, properties.getInt(JspLineBreakpoint.PROP_LINE_NUMBER, 1) ); b.setCondition(properties.getString (JspLineBreakpoint.PROP_CONDITION, "")); b.setPrintText(properties.getString (JspLineBreakpoint.PROP_PRINT_TEXT, "")); b.setGroupName(properties.getString (Breakpoint.PROP_GROUP_NAME, "")); b.setSuspend(properties.getInt (JspLineBreakpoint.PROP_SUSPEND, JspLineBreakpoint.SUSPEND_ALL)); if (properties.getBoolean (JspLineBreakpoint.PROP_ENABLED, true)) { b.enable (); } else { b.disable (); } } return b; }
private int[] sourcePathPermutation; private Properties sourcesProperties = Properties. getDefault ().getProperties ("debugger").getProperties ("sources"); private GlobalPathRegistryListener globalRegistryListener;
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 void loadSourceRoots() { disabledSourceRoots = new HashSet<String> ( sourcesProperties.getProperties ("source_roots").getCollection ( "remote_disabled", Collections.EMPTY_SET ) ); additionalSourceRoots = new ArrayList<String>( sourcesProperties.getProperties("additional_source_roots").getCollection( "src_roots", Collections.EMPTY_LIST) ); }
@Override public boolean isVisible() { return properties.getBoolean (getID () + ".visible", defaultVisible); }
public void write (Object object, Properties properties) { if (object instanceof JspLineBreakpoint) { JspLineBreakpoint b = (JspLineBreakpoint) object; properties.setString (JspLineBreakpoint.PROP_PRINT_TEXT, b.getPrintText ()); properties.setString (JspLineBreakpoint.PROP_GROUP_NAME, b.getGroupName ()); properties.setInt (JspLineBreakpoint.PROP_SUSPEND, b.getSuspend ()); properties.setBoolean (JspLineBreakpoint.PROP_ENABLED, b.isEnabled ()); properties.setString (JspLineBreakpoint.PROP_URL, b.getURL ()); properties.setInt (JspLineBreakpoint.PROP_LINE_NUMBER, b.getLineNumber ()); properties.setString (JspLineBreakpoint.PROP_CONDITION, b.getCondition ()); } return; } }
@Override public int getColumnWidth() { int width = properties.getInt (getID () + ".columnWidth", 150); // NOI18N return width; } }
@Override public boolean load(Properties props) { Vector<Vector<String>> processes = psData.processes(Pattern.compile(props.getString(COMMAND_PROP, NO_EXISTING_PROCESS))); if (processes.isEmpty()) { return false; } EngineType et = EngineTypeManager.getEngineTypeByID(props.getString(ENGINE_PROP, "")); //NOI18N if (et == null) { return false; } String hostName = props.getString(HOST_NAME_PROP, ""); //NOI18N hostCombo.setSelectedItem(hostName); if (!hostCombo.getSelectedItem().equals(hostName)) { return false; } String selectedProject = props.getString(SELECTED_PROJECT_PROP, ""); //NOI18N if (!executableProjectPanel.containsProjectWithPath(getHostName(), selectedProject)) { return false; } executableProjectPanel.setSelectedProjectByPath(getHostName(), selectedProject); loadedPID = processes.get(0).get(psData.pidColumnIdx()); executableProjectPanel.setExecutablePath(getHostName(), props.getString(EXECUTABLE_PATH_PROP, "")); //NOI18N engine = new EngineDescriptor(et); return true; }
@Override public void setSortedDescending(boolean sortedDescending) { properties.setBoolean ( getID () + ".sortedDescending", // NOI18N sortedDescending ); }
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 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); }
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) {