public synchronized void setWorkspaces(Workspace[] ws) { if (ws.length == 0) throw new IllegalArgumentException(); workspaces.clear(); for (int i = 0; i < ws.length; i++) { workspaces.put(ws[i].getName(), ws[i]); } if (pcs != null) { pcs.firePropertyChange(PROP_WORKSPACES, null, null); pcs.firePropertyChange(PROP_CURRENT_WORKSPACE, null, null); } }
public synchronized void setWorkspaces(Workspace[] ws) { if (ws.length == 0) throw new IllegalArgumentException(); workspaces.clear(); for (int i = 0; i < ws.length; i++) { workspaces.put(ws[i].getName(), ws[i]); } if (pcs != null) { pcs.firePropertyChange(PROP_WORKSPACES, null, null); pcs.firePropertyChange(PROP_CURRENT_WORKSPACE, null, null); } }
synchronized void delete(Workspace w) { workspaces.remove(w.getName()); if (workspaces.isEmpty()) { createWorkspace("default", null); // NOI18N } if (pcs != null) { pcs.firePropertyChange(PROP_WORKSPACES, null, null); pcs.firePropertyChange(PROP_CURRENT_WORKSPACE, null, null); } }
synchronized void delete(Workspace w) { workspaces.remove(w.getName()); if (workspaces.isEmpty()) { createWorkspace("default", null); // NOI18N } if (pcs != null) { pcs.firePropertyChange(PROP_WORKSPACES, null, null); pcs.firePropertyChange(PROP_CURRENT_WORKSPACE, null, null); } }