/** * Get the id used for lookup. */ public Object getId() { // return ((ComponentTreeNode)getParent()).getDescription().getName().getName()+toString(); return getParent().getId()+NAME; }
public Action getDefaultAction(ISwingTreeNode node) { Action a = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { a = STOP_DEBUGGER; } else { a = START_DEBUGGER; } } return a; } });
public Action getDefaultAction(ISwingTreeNode node) { Action a = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { a = STOP_DEBUGGER; } else { a = START_DEBUGGER; } } return a; } });
/** * Build the node id. */ protected static String getId(ISwingTreeNode parent, ProvidedServiceInfo service) { IComponentIdentifier provider = (IComponentIdentifier)parent.getParent().getId(); return ""+provider+":service:"+service.getName(); } }
/** * Test if two nodes are equal. */ @Override public boolean equals(Object obj) { return obj instanceof ISwingTreeNode && SUtil.equals(getId(), ((ISwingTreeNode)obj).getId()); }
/** * Get the id used for lookup. */ public Object getId() { return getId(getParent().getId(), name); // return getParent().getId()+NAME+(name==null? "": name); }
public Action getDefaultAction(ISwingTreeNode node) { Action a = null; if(cards.getComponent(node.getId())!=null) { a = STOP_VIEWER; } else if(isNodeViewable(node)) { a = START_VIEWER; } return a; } });
public Icon getSwingOverlay(ISwingTreeNode node) { Icon ret = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { ret = DebuggerPlugin.icons.getIcon("component_debugged"); } } // if(ret!=null) // System.out.println("ov: "+ret); return ret; }
public Icon getSwingOverlay(ISwingTreeNode node) { Icon ret = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { ret = DebuggerPlugin.icons.getIcon("component_debugged"); } } // if(ret!=null) // System.out.println("ov: "+ret); return ret; }
/** * Get the id used for lookup. */ public Object getId() { // return sid; return getId(getParent().getId(), propmi.getName()); }
public Icon getSwingOverlay(ISwingTreeNode node) { Icon ret = null; if(cards.getComponent(node.getId())!=null) { ret = icons.getIcon("overlay_viewed"); } else if(isNodeViewable(node)) { ret = icons.getIcon("overlay_viewable"); } return ret; }
public void actionPerformed(ActionEvent e) { TreePath[] paths = comptree.getTree().getSelectionPaths(); for(int i=0; paths!=null && i<paths.length; i++) { if(isNodeViewable((ISwingTreeNode)paths[i].getLastPathComponent())) { storeCurrentPanelSettings(); final ISwingTreeNode node = (ISwingTreeNode)paths[i].getLastPathComponent(); Object nodeid = node.getId(); detail.remove(cards.getComponent(nodeid)); IAbstractViewerPanel panel = panels.remove(nodeid); panel.shutdown().addResultListener(new SwingDefaultResultListener<Void>(comptree) { public void customResultAvailable(Void result) { comptree.getModel().fireNodeChanged(node); } }); } } } };
public void valueChanged(TreeSelectionEvent e) { JTree tree = comptree.getTree(); if(tree.getSelectionPath()!=null) { ISwingTreeNode node = (ISwingTreeNode)tree.getSelectionPath().getLastPathComponent(); Object nodeid = node.getId(); if(nodeid!=null) { if(cards.getComponent(nodeid)!=null) { storeCurrentPanelSettings(); IAbstractViewerPanel panel = panels.get(nodeid); panel.setProperties(props!=null ? props.getSubproperty(panel.getId()) : null); cards.show(nodeid); } } } } });