01: package com.xoetrope.editor.netbeans.actions;
02:
03: import org.openide.util.HelpCtx;
04: import org.openide.util.NbBundle;
05: import org.openide.util.actions.CallableSystemAction;
06: import com.xoetrope.editor.netbeans.visualizer.VisualiserPalette;
07: import net.xoetrope.editor.project.XEditorProjectManager;
08:
09: /**
10: * Show the model visualizer
11: * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
12: * the GNU Public License (GPL), please see license.txt for more details. If
13: * you make commercial use of this software you must purchase a commercial
14: * license from Xoetrope.</p>
15: * <p> $Revision: 1.2 $</p>
16: */
17: public class ShowQuotationWizardAction extends CallableSystemAction {
18: public ShowQuotationWizardAction() {
19: super ();
20: }
21:
22: public void performAction() {
23: // VisualiserPalette palette = VisualiserPalette.getInstance();
24: // palette.open();
25: // palette.requestActive();
26: // palette.requestVisible();
27: }
28:
29: public String getName() {
30: return "Quotation Wizard";//NbBundle.getMessage( ShowServiceManagerAction.class, "LBL_ShowServiceManagerAction" );
31: }
32:
33: protected String iconResource() {
34: return "com/xoetrope/editor/netbeans/actions/ShowQuotationWizardActionIcon.gif";
35: }
36:
37: public HelpCtx getHelpCtx() {
38: return HelpCtx.DEFAULT_HELP;
39: // If you will provide context help then use:
40: // return new HelpCtx(ShowLanguageEditorAction.class);
41: }
42:
43: protected boolean asynchronous() {
44: // performAction() should run in event thread
45: return false;
46: }
47:
48: /** Perform extra initialization of this action's singleton.
49: * PLEASE do not use constructors for this purpose!
50: * protected void initialize() {
51: * super.initialize();
52: * putProperty(Action.SHORT_DESCRIPTION, NbBundle.getMessage(ShowLanguageEditorAction.class, "HINT_Action"));
53: * }
54: */
55: public boolean isEnabled() {
56: try {
57: Object obj = XEditorProjectManager.getCurrentProject();
58: return (XEditorProjectManager
59: .isUserRegistered("XUI Pro Catalogs") && (obj != null));
60: } catch (Exception ex) {
61: return false;
62: }
63: }
64: }
|