1 19 20 package org.netbeans.modules.java.navigation.actions; 21 22 import java.awt.event.ActionEvent ; 23 import javax.swing.AbstractAction ; 24 import javax.swing.ImageIcon ; 25 import org.netbeans.modules.java.navigation.DeclarationTopComponent; 26 import org.openide.util.NbBundle; 27 import org.openide.util.Utilities; 28 import org.openide.windows.TopComponent; 29 30 31 36 public class DeclarationAction extends AbstractAction { 37 38 public DeclarationAction() { 39 super(NbBundle.getMessage(DeclarationAction.class, "CTL_DeclarationAction")); 40 putValue(SMALL_ICON, new ImageIcon (Utilities.loadImage(DeclarationTopComponent.ICON_PATH, true))); 41 } 42 43 public void actionPerformed(ActionEvent evt) { 44 TopComponent win = DeclarationTopComponent.findInstance(); 45 win.open(); 46 win.requestActive(); 47 } 48 49 } 50 | Popular Tags |