Prim objPrim = ((Prim)node); try { objPrim.sfParentageChanged(); } catch (RemoteException ex1) {
if (node instanceof Prim){ try { ((Prim)node).sfParentageChanged(); } catch (RemoteException ex1) {  } } else if (node instanceof ComponentDescription){ ((ComponentDescriptionImpl)node).sfParentageChanged();
    public void actionPerformed(ActionEvent e) {        String path;        Object source = e.getSource();        TreePath tpath = ((JTree) tempComp).getPathForLocation(tempX, tempY);        Object node = getNode();        path = treePath2Path(tpath);        //System.out.println("Tree PopUp(source): "+e.getSource()+", Path:        //"+path);        // Launch it       if (source == menuItemAddAttribute) {           addAttrib();       } else if (source == menuItemTerminateNormal) {           terminate(node, TerminationRecord.NORMAL , "Console Management Action");       } else if (source == menuItemTerminateAbnormal) {           terminate(node, TerminationRecord.ABNORMAL, "Console Management Action");            // Entry selected in the tree        } else if (source == menuItemDTerminate) {            dTerminate(node, TerminationRecord.NORMAL , "Console Management Action");            // Entry selected in the tree        } else if (source == menuItemDetach) {            detach(node);            // Entry selected in the tree        } else if (source == menuItemParentageChanged) {            Prim objPrim = ((Prim)node);            try {              objPrim.sfParentageChanged();            } catch (RemoteException ex1) {              //ex1.printStackTrace();            }            // Entry selected in the tree        } else if (source == menuItemDumpContext) {            StringBuffer message=new StringBuffer();            String name = "error";            if (node instanceof Prim) {                try {                    Prim objPrim = ((Prim)node);                    message.append(objPrim.sfDiagnosticsReport());                    name = ((Prim)objPrim).sfCompleteName().toString();                } catch (Exception ex) {                    message.append("\n Error: "+ex.toString());                }            } else {                try {                    ComponentDescription objCD = ((ComponentDescription)node);                    message.append(((ComponentDescriptionImpl)objCD).sfDiagnosticsReport());                    name = ((ComponentDescription)objCD).sfCompleteName().toString();                } catch (Exception ex) {                    message.append("\n Error: "+ex.toString());                }            }            modalDialog("Context info for "+ name ,  message.toString(), "", source);        }    }