1 26 package org.coach.actor.browser; 27 28 29 import org.objectweb.util.browser.api.MenuItem; 30 import org.objectweb.util.browser.api.MenuItemTreeView; 31 import org.objectweb.util.browser.api.TreeView; 32 import javax.swing.JFileChooser ; 33 import java.io.FileWriter ; 34 import org.coach.util.IorPrinter; 35 36 43 public class DisplayActor 44 implements MenuItem 45 { 46 47 53 59 protected String getId(org.omg.CORBA.ORB orb, org.omg.CORBA.Object object){ 60 IorPrinter iorPrinter = new IorPrinter(orb.object_to_string(object)); 61 return iorPrinter.getTypeId(); 62 } 63 64 70 73 public int getStatus(TreeView treeView) { 74 return MenuItem.ENABLED_STATUS; 75 } 76 77 80 public void actionPerformed(MenuItemTreeView e) throws Exception { 81 try { 82 org.omg.CORBA.Object object = (org.omg.CORBA.Object )e.getSelectedObject(); 83 String name = e.getSelectedEntry().getName().toString(); 84 org.omg.CORBA.ORB orb = org.objectweb.openccm.corba.TheORB.getORB(); 85 org.coach.idltree.IdlNode.setOrb(orb); 86 new org.coach.actor.componentBrowser.MethodFrame((java.awt.Component )e.getActionEvent().getSource(), getId(orb,object), name, object, orb); 87 } catch (Throwable ex) { 89 ex.printStackTrace(); 90 } 91 } 92 93 } 94 | Popular Tags |