1 19 20 package org.netbeans.modules.versioning.system.cvss.ui.actions.status; 21 22 import org.netbeans.modules.versioning.system.cvss.ui.syncview.CvsSynchronizeTopComponent; 23 import org.openide.util.NbBundle; 24 import org.openide.util.HelpCtx; 25 26 import javax.swing.*; 27 import java.awt.event.ActionEvent ; 28 29 37 public class OpenVersioningAction extends StatusProjectsAction { 38 39 public OpenVersioningAction() { 40 putValue("noIconInMenu", Boolean.TRUE); setIcon(null); 42 } 43 44 public String getName() { 45 return NbBundle.getMessage(OpenVersioningAction.class, "BK0001"); 46 } 47 48 53 public boolean isEnabled() { 54 return true; 55 } 56 57 public HelpCtx getHelpCtx() { 58 return new HelpCtx(OpenVersioningAction.class); 59 } 60 61 public void actionPerformed(ActionEvent e) { 62 CvsSynchronizeTopComponent stc = CvsSynchronizeTopComponent.getInstance(); 63 if (stc.hasContext() == false) { 64 super.actionPerformed(e); 65 } else { 66 stc.open(); 67 stc.requestActive(); 68 } 69 } 70 71 protected boolean shouldPostRefresh() { 72 return false; 73 } 74 } 75 | Popular Tags |