1 19 20 package org.netbeans.modules.xml.xam.ui.actions; 21 22 import org.netbeans.modules.xml.xam.Component; 23 import org.netbeans.modules.xml.xam.ui.cookies.GetSuperCookie; 24 import org.netbeans.modules.xml.xam.ui.cookies.ViewComponentCookie; 25 import org.openide.nodes.Node; 26 import org.openide.util.HelpCtx; 27 import org.openide.util.NbBundle; 28 29 35 public class SuperGotoType extends GotoType { 36 37 @Override 38 protected Component getComponent(Node node) { 39 GetSuperCookie cookie = (GetSuperCookie) node.getCookie( 40 GetSuperCookie.class); 41 try { 42 if (cookie != null) { 43 return cookie.getSuper(); 44 } 45 } catch (IllegalStateException ise) { 46 } 49 return null; 50 } 51 52 public HelpCtx getHelpCtx() { 53 return new HelpCtx(getClass()); 54 } 55 56 public String getName() { 57 return NbBundle.getMessage(SuperGotoType.class, 58 "LBL_ShowSuperAction_Name"); 59 } 60 61 protected ViewComponentCookie.View getView() { 62 return ViewComponentCookie.View.SUPER; 63 } 64 } 65 | Popular Tags |