1 package org.netbeans.modules.ruby.rubyproject; 2 3 import java.awt.event.ActionEvent ; 4 import javax.swing.AbstractAction ; 5 import javax.swing.ImageIcon ; 6 import org.openide.util.NbBundle; 7 import org.openide.util.Utilities; 8 import org.openide.windows.TopComponent; 9 10 13 public class IrbAction extends AbstractAction { 14 15 public IrbAction() { 16 super(NbBundle.getMessage(IrbAction.class, "CTL_IrbAction")); 17 putValue(SMALL_ICON, new ImageIcon (Utilities.loadImage(IrbTopComponent.ICON_PATH, true))); 18 } 19 20 public void actionPerformed(ActionEvent evt) { 21 TopComponent win = IrbTopComponent.findInstance(); 22 win.open(); 23 win.requestActive(); 24 } 25 26 } 27 | Popular Tags |