public void actionPerformed(ActionEvent ae) { ProjectBrowser pb = ProjectBrowser.TheInstance; Project p = pb.getProject(); Object target = pb.getDetailsTarget(); if (!(target instanceof MClassifier)) return; MClassifier cls = (MClassifier) target; MAttribute attr = MMUtil.SINGLETON.buildAttribute(cls); super.actionPerformed(ae); }
public CopyAction(UMLDeploymentDiagram d) { super(MComponentInstanceImpl.class, d.getName()); diagram = d; ProjectBrowser pb = ProjectBrowser.TheInstance; Object target = pb.getDetailsTarget(); if (target instanceof MClass) { orig = (MClass) target; System.err.println("--------------------------------" + target.getClass()); } }
public boolean shouldBeEnabled() { ProjectBrowser pb = ProjectBrowser.TheInstance; Object target = pb.getDetailsTarget(); return super.shouldBeEnabled() && target instanceof MClassifier; }