1 19 20 package org.netbeans.core.actions; 21 22 import java.awt.event.ActionEvent ; 23 import javax.swing.AbstractAction ; 24 25 import org.openide.util.HelpCtx; 26 import org.openide.util.NbBundle; 27 import org.openide.windows.TopComponent; 28 29 import org.netbeans.core.NbMainExplorer; 30 31 36 public class ViewRuntimeTabAction extends AbstractAction 37 implements HelpCtx.Provider { 38 39 40 public ViewRuntimeTabAction() { 41 putValue(NAME, NbBundle.getMessage(ViewRuntimeTabAction.class, 42 "CTL_ViewRuntimeTabAction")); 43 putValue ("iconBase", "org/netbeans/core/resources/environment.gif"); } 45 46 47 public void actionPerformed(ActionEvent evt) { 48 final TopComponent runtimeTab = NbMainExplorer.MainTab.findEnvironmentTab(); 49 runtimeTab.open(); 50 runtimeTab.requestActive(); 51 } 52 53 public HelpCtx getHelpCtx() { 54 return new HelpCtx(ViewRuntimeTabAction.class); 55 } 56 57 } 58 | Popular Tags |