This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 206093
Collapse All | Expand All

(-)a/ant.debugger/src/org/netbeans/modules/ant/debugger/RunTargetsAction.java (-1 / +1 lines)
Lines 86-92 Link Here
86
 * undocumented targets.
86
 * undocumented targets.
87
 */
87
 */
88
@ActionID(id = "org.netbeans.modules.ant.debugger.RunTargetsAction", category = "Build")
88
@ActionID(id = "org.netbeans.modules.ant.debugger.RunTargetsAction", category = "Build")
89
@ActionRegistration(displayName = "#LBL_run_targets_action")
89
@ActionRegistration(displayName = "#LBL_run_targets_action", lazy=false)
90
@ActionReference(path = "Loaders/text/x-ant+xml/Actions", position = 300)
90
@ActionReference(path = "Loaders/text/x-ant+xml/Actions", position = 300)
91
public final class RunTargetsAction extends SystemAction implements ContextAwareAction {
91
public final class RunTargetsAction extends SystemAction implements ContextAwareAction {
92
92
(-)a/ant.freeform/src/org/netbeans/modules/ant/freeform/Actions.java (-1 / +1 lines)
Lines 493-499 Link Here
493
    }
493
    }
494
494
495
    @ActionID(id = "org.netbeans.modules.ant.freeform.Actions$Custom", category = "Project")
495
    @ActionID(id = "org.netbeans.modules.ant.freeform.Actions$Custom", category = "Project")
496
    @ActionRegistration(displayName = "Custom Freeform Actions") // should not be displayed in UI anyway
496
    @ActionRegistration(displayName = "Custom Freeform Actions", lazy=false) // should not be displayed in UI anyway
497
    @ActionReference(position = 300, path = "Projects/org-netbeans-modules-ant-freeform/Actions")
497
    @ActionReference(position = 300, path = "Projects/org-netbeans-modules-ant-freeform/Actions")
498
    public static final class Custom extends AbstractAction implements ContextAwareAction {
498
    public static final class Custom extends AbstractAction implements ContextAwareAction {
499
        public Custom() {
499
        public Custom() {
(-)a/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/BuildInstallersAction.java (-1 / +1 lines)
Lines 88-94 Link Here
88
 * @author Dmitry Lipin <dlipin@netbeans.org>
88
 * @author Dmitry Lipin <dlipin@netbeans.org>
89
 */
89
 */
90
@ActionID(id = "org.netbeans.modules.apisupport.installer.maven.actions.BuildInstallersAction", category = "Project")
90
@ActionID(id = "org.netbeans.modules.apisupport.installer.maven.actions.BuildInstallersAction", category = "Project")
91
@ActionRegistration(displayName = "#CTL_BuildInstallers")
91
@ActionRegistration(displayName = "#CTL_BuildInstallers", lazy=false)
92
@ActionReference(position = 1290, path = "Projects/org-netbeans-modules-maven/Actions")
92
@ActionReference(position = 1290, path = "Projects/org-netbeans-modules-maven/Actions")
93
public final class BuildInstallersAction extends AbstractAction implements ContextAwareAction {
93
public final class BuildInstallersAction extends AbstractAction implements ContextAwareAction {
94
94
(-)a/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/BuildInstallersAction.java (-1 / +1 lines)
Lines 86-92 Link Here
86
import org.openide.util.Utilities;
86
import org.openide.util.Utilities;
87
87
88
@ActionID(id = "org.netbeans.modules.apisupport.installer.actions.BuildInstallersAction", category = "Project")
88
@ActionID(id = "org.netbeans.modules.apisupport.installer.actions.BuildInstallersAction", category = "Project")
89
@ActionRegistration(displayName = "#CTL_BuildInstallers")
89
@ActionRegistration(displayName = "#CTL_BuildInstallers", /* XXX might work to be context action on List<Project> */ lazy=false)
90
@ActionReference(position = 1, path = "Projects/org-netbeans-modules-apisupport-project-suite/Actions")
90
@ActionReference(position = 1, path = "Projects/org-netbeans-modules-apisupport-project-suite/Actions")
91
public final class BuildInstallersAction extends AbstractAction implements ContextAwareAction {
91
public final class BuildInstallersAction extends AbstractAction implements ContextAwareAction {
92
92
(-)a/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/ActionRegistrationHinter.java (-37 / +10 lines)
Lines 52-61 Link Here
52
import java.util.Map;
52
import java.util.Map;
53
import java.util.concurrent.Callable;
53
import java.util.concurrent.Callable;
54
import javax.lang.model.element.Element;
54
import javax.lang.model.element.Element;
55
import javax.lang.model.element.ElementKind;
56
import javax.lang.model.element.ExecutableElement;
57
import javax.lang.model.element.TypeElement;
55
import javax.lang.model.element.TypeElement;
58
import javax.lang.model.type.TypeMirror;
59
import org.netbeans.api.java.source.GeneratorUtilities;
56
import org.netbeans.api.java.source.GeneratorUtilities;
60
import org.netbeans.api.java.source.TreeMaker;
57
import org.netbeans.api.java.source.TreeMaker;
61
import org.netbeans.api.java.source.WorkingCopy;
58
import org.netbeans.api.java.source.WorkingCopy;
Lines 75-89 Link Here
75
@ServiceProvider(service=Hinter.class)
72
@ServiceProvider(service=Hinter.class)
76
public class ActionRegistrationHinter implements Hinter {
73
public class ActionRegistrationHinter implements Hinter {
77
74
78
    private static final String[] EAGER_INTERFACES = {
79
        "org.openide.util.actions.Presenter.Menu",
80
        "org.openide.util.actions.Presenter.Toolbar",
81
        "org.openide.util.actions.Presenter.Popup",
82
        "org.openide.util.ContextAwareAction",
83
        "org.openide.awt.DynamicMenuContent"
84
    };
85
86
    @Messages({"# {0} - class or method return type", "ActionRegistrationHinter.not_presenter=You cannot use @ActionRegistration on the eager action {0} unless it is assignable to ContextAwareAction, DynamicMenuContent, or some Presenter.* interface."})
87
     public @Override void process(final Context ctx) throws Exception {
75
     public @Override void process(final Context ctx) throws Exception {
88
        final FileObject file = ctx.file();
76
        final FileObject file = ctx.file();
89
        if (!file.isData() || !file.hasExt("instance")) {
77
        if (!file.isData() || !file.hasExt("instance")) {
Lines 96-102 Link Here
96
                    if (!annotationsAvailable(ctx)) {
84
                    if (!annotationsAvailable(ctx)) {
97
                        return null;
85
                        return null;
98
                    }
86
                    }
99
                    ctx.findAndModifyDeclaration(file.getAttribute("literal:delegate"), new RegisterAction(ctx));
87
                    ctx.findAndModifyDeclaration(file.getAttribute("literal:delegate"), new RegisterAction(ctx, false));
100
                    return null;
88
                    return null;
101
                }
89
                }
102
            });
90
            });
Lines 126-154 Link Here
126
                            action = "new:" + file.getName().replace('-', '.');
114
                            action = "new:" + file.getName().replace('-', '.');
127
                        }
115
                        }
128
                    }
116
                    }
129
                    ctx.findAndModifyDeclaration(action, new RegisterAction(ctx) {
117
                    ctx.findAndModifyDeclaration(action, new RegisterAction(ctx, true));
130
                        public @Override void run(WorkingCopy wc, Element declaration, ModifiersTree modifiers) throws Exception {
131
                            TypeMirror type;
132
                            if (declaration.getKind() == ElementKind.CLASS) {
133
                                type = ((TypeElement) declaration).asType();
134
                            } else {
135
                                type = ((ExecutableElement) declaration).getReturnType();
136
                            }
137
                            boolean ok = false;
138
                            for (String xface : EAGER_INTERFACES) {
139
                                TypeElement xfaceEl = wc.getElements().getTypeElement(xface);
140
                                if (xfaceEl != null && wc.getTypes().isAssignable(type, xfaceEl.asType())) {
141
                                    ok = true;
142
                                    break;
143
                                }
144
                            }
145
                            if (!ok) {
146
                                DialogDisplayer.getDefault().notify(new Message(ActionRegistrationHinter_not_presenter(type), NotifyDescriptor.WARNING_MESSAGE));
147
                                return;
148
                            }
149
                            super.run(wc, declaration, modifiers);
150
                        }
151
                    });
152
                    return null;
118
                    return null;
153
                }
119
                }
154
            });
120
            });
Lines 168-176 Link Here
168
    private static class RegisterAction implements Context.ModifyDeclarationTask {
134
    private static class RegisterAction implements Context.ModifyDeclarationTask {
169
135
170
        private final Context ctx;
136
        private final Context ctx;
137
        private final boolean eager;
171
138
172
        RegisterAction(Context ctx) {
139
        RegisterAction(Context ctx, boolean eager) {
173
            this.ctx = ctx;
140
            this.ctx = ctx;
141
            this.eager = eager;
174
        }
142
        }
175
143
176
        public @Override void run(WorkingCopy wc, Element declaration, ModifiersTree modifiers) throws Exception {
144
        public @Override void run(WorkingCopy wc, Element declaration, ModifiersTree modifiers) throws Exception {
Lines 192-197 Link Here
192
                params.put("iconInMenu", !((Boolean) noIconInMenu));
160
                params.put("iconInMenu", !((Boolean) noIconInMenu));
193
            }
161
            }
194
            params.put("asynchronous", file.getAttribute("asynchronous"));
162
            params.put("asynchronous", file.getAttribute("asynchronous"));
163
            if (eager) {
164
                params.put("lazy", false);
165
            } else {
166
                // XXX specify lazy=true if implements one of the 5 specials even though using Actions.* factory (but probably rare)
167
            }
195
            nue = ctx.addAnnotation(wc, nue, "org.openide.awt.ActionRegistration", null, params);
168
            nue = ctx.addAnnotation(wc, nue, "org.openide.awt.ActionRegistration", null, params);
196
            ctx.delete(file);
169
            ctx.delete(file);
197
            TreeMaker make = wc.getTreeMaker();
170
            TreeMaker make = wc.getTreeMaker();
(-)a/core.ui/src/org/netbeans/core/ui/options/filetypes/OpenAsAction.java (-1 / +1 lines)
Lines 67-73 Link Here
67
 * @author Jiri Skrivanek
67
 * @author Jiri Skrivanek
68
 */
68
 */
69
@ActionID(id = "org.netbeans.core.ui.options.filetypes.OpenAsAction", category = "Edit")
69
@ActionID(id = "org.netbeans.core.ui.options.filetypes.OpenAsAction", category = "Edit")
70
@ActionRegistration(displayName = "#OpenAsAction.name")
70
@ActionRegistration(displayName = "#OpenAsAction.name", /* XXX might work to be context action on DataObject */ lazy=false)
71
@ActionReference(path = "Loaders/content/unknown/Actions", position = 150)
71
@ActionReference(path = "Loaders/content/unknown/Actions", position = 150)
72
public final class OpenAsAction extends NodeAction {
72
public final class OpenAsAction extends NodeAction {
73
    
73
    
(-)a/core.ui/src/org/netbeans/core/ui/sysopen/SystemOpenAction.java (-1 / +1 lines)
Lines 71-77 Link Here
71
 * @author Jesse Glick
71
 * @author Jesse Glick
72
 */
72
 */
73
@ActionID(id = "org.netbeans.core.ui.sysopen.SystemOpenAction", category = "Edit")
73
@ActionID(id = "org.netbeans.core.ui.sysopen.SystemOpenAction", category = "Edit")
74
@ActionRegistration(displayName = "#CTL_SystemOpenAction")
74
@ActionRegistration(displayName = "#CTL_SystemOpenAction", lazy=false)
75
@ActionReference(path = "Loaders/content/unknown/Actions", position = 200)
75
@ActionReference(path = "Loaders/content/unknown/Actions", position = 200)
76
public final class SystemOpenAction extends AbstractAction implements ContextAwareAction {
76
public final class SystemOpenAction extends AbstractAction implements ContextAwareAction {
77
    
77
    
(-)a/favorites/src/org/netbeans/modules/favorites/Actions.java (-2 / +2 lines)
Lines 93-99 Link Here
93
    }
93
    }
94
    
94
    
95
    @ActionID(id = "org.netbeans.modules.favorites.Add", category = "Window")
95
    @ActionID(id = "org.netbeans.modules.favorites.Add", category = "Window")
96
    @ActionRegistration(displayName = "#ACT_Add")
96
    @ActionRegistration(displayName = "#ACT_Add", lazy=false)
97
    @ActionReference(position = 300, path = "UI/ToolActions/Files")
97
    @ActionReference(position = 300, path = "UI/ToolActions/Files")
98
    public static ContextAwareAction add() { return Add.getDefault(); }
98
    public static ContextAwareAction add() { return Add.getDefault(); }
99
99
Lines 104-110 Link Here
104
    public static Action remove () { return Remove.getDefault(); }
104
    public static Action remove () { return Remove.getDefault(); }
105
105
106
    @ActionID(id = "org.netbeans.modules.favorites.Select", category = "Window/SelectDocumentNode")
106
    @ActionID(id = "org.netbeans.modules.favorites.Select", category = "Window/SelectDocumentNode")
107
    @ActionRegistration(displayName = "#ACT_Select_Main_Menu")
107
    @ActionRegistration(displayName = "#ACT_Select_Main_Menu", lazy=false)
108
    @ActionReference(position = 2800, name = "org-netbeans-modules-favorites-SelectInFavorites", path = "Menu/GoTo")
108
    @ActionReference(position = 2800, name = "org-netbeans-modules-favorites-SelectInFavorites", path = "Menu/GoTo")
109
    public static ContextAwareAction select () { return Select.getDefault(); }
109
    public static ContextAwareAction select () { return Select.getDefault(); }
110
    
110
    
(-)a/hudson/src/org/netbeans/modules/hudson/ui/actions/PersistInstanceAction.java (-1 / +1 lines)
Lines 60-66 Link Here
60
import static org.netbeans.modules.hudson.ui.actions.Bundle.*;
60
import static org.netbeans.modules.hudson.ui.actions.Bundle.*;
61
61
62
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.PersistInstanceAction")
62
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.PersistInstanceAction")
63
@ActionRegistration(displayName="#LBL_Persist_Instance", iconInMenu=false)
63
@ActionRegistration(displayName="#LBL_Persist_Instance", iconInMenu=false, lazy=false)
64
@ActionReference(path=HudsonInstance.ACTION_PATH, position=700)
64
@ActionReference(path=HudsonInstance.ACTION_PATH, position=700)
65
@Messages("LBL_Persist_Instance=&Persist")
65
@Messages("LBL_Persist_Instance=&Persist")
66
// XXX cannot just use List<HudsonInstanceImpl> ctor: must be disabled when context menu created, so must be eager
66
// XXX cannot just use List<HudsonInstanceImpl> ctor: must be disabled when context menu created, so must be eager
(-)a/hudson/src/org/netbeans/modules/hudson/ui/actions/SynchronizeAction.java (-1 / +1 lines)
Lines 61-67 Link Here
61
import org.openide.util.NbBundle.Messages;
61
import org.openide.util.NbBundle.Messages;
62
62
63
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.SynchronizeAction")
63
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.SynchronizeAction")
64
@ActionRegistration(displayName="#LBL_SynchronizeAction", iconInMenu=false)
64
@ActionRegistration(displayName="#LBL_SynchronizeAction", iconInMenu=false, lazy=false)
65
@ActionReference(path=HudsonInstance.ACTION_PATH, position=500)
65
@ActionReference(path=HudsonInstance.ACTION_PATH, position=500)
66
@Messages("LBL_SynchronizeAction=&Synchronize")
66
@Messages("LBL_SynchronizeAction=&Synchronize")
67
public class SynchronizeAction extends AbstractAction implements ContextAwareAction {
67
public class SynchronizeAction extends AbstractAction implements ContextAwareAction {
(-)a/hudson/src/org/netbeans/modules/hudson/ui/actions/ViewSwitcher.java (-1 / +1 lines)
Lines 65-71 Link Here
65
import org.openide.util.actions.Presenter;
65
import org.openide.util.actions.Presenter;
66
66
67
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.ViewSwitcher")
67
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.ViewSwitcher")
68
@ActionRegistration(displayName="#ViewSwitcher.label")
68
@ActionRegistration(displayName="#ViewSwitcher.label", lazy=false)
69
@ActionReference(path=HudsonInstance.ACTION_PATH, position=100)
69
@ActionReference(path=HudsonInstance.ACTION_PATH, position=100)
70
@Messages("ViewSwitcher.label=View")
70
@Messages("ViewSwitcher.label=View")
71
public class ViewSwitcher extends AbstractAction implements ContextAwareAction, Presenter.Popup {
71
public class ViewSwitcher extends AbstractAction implements ContextAwareAction, Presenter.Popup {
(-)a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SELogicalViewProvider.java (-1 / +1 lines)
Lines 466-472 Link Here
466
    }
466
    }
467
467
468
    @ActionID(id = "org.netbeans.modules.java.j2seproject.ui.J2SELogicalViewProvider$BrokenLinksActionFactory", category = "Project")
468
    @ActionID(id = "org.netbeans.modules.java.j2seproject.ui.J2SELogicalViewProvider$BrokenLinksActionFactory", category = "Project")
469
    @ActionRegistration(displayName = "#LBL_Fix_Broken_Links_Action")
469
    @ActionRegistration(displayName = "#LBL_Fix_Broken_Links_Action", lazy=false)
470
    @ActionReference(position = 2600, path = "Projects/org-netbeans-modules-java-j2seproject/Actions")
470
    @ActionReference(position = 2600, path = "Projects/org-netbeans-modules-java-j2seproject/Actions")
471
    public static final class BrokenLinksActionFactory extends AbstractAction implements ContextAwareAction {
471
    public static final class BrokenLinksActionFactory extends AbstractAction implements ContextAwareAction {
472
472
(-)a/javahelp/src/org/netbeans/modules/javahelp/HelpAction.java (-11 / +3 lines)
Lines 55-61 Link Here
55
import java.awt.event.WindowEvent;
55
import java.awt.event.WindowEvent;
56
import java.util.logging.Level;
56
import java.util.logging.Level;
57
import javax.swing.AbstractAction;
57
import javax.swing.AbstractAction;
58
import javax.swing.Action;
59
import javax.swing.MenuElement;
58
import javax.swing.MenuElement;
60
import javax.swing.MenuSelectionManager;
59
import javax.swing.MenuSelectionManager;
61
import javax.swing.SwingUtilities;
60
import javax.swing.SwingUtilities;
Lines 64-70 Link Here
64
import org.openide.awt.ActionReference;
63
import org.openide.awt.ActionReference;
65
import org.openide.awt.ActionRegistration;
64
import org.openide.awt.ActionRegistration;
66
import org.openide.awt.StatusDisplayer;
65
import org.openide.awt.StatusDisplayer;
67
import org.openide.util.ContextAwareAction;
68
import org.openide.util.HelpCtx;
66
import org.openide.util.HelpCtx;
69
import org.openide.util.Lookup;
67
import org.openide.util.Lookup;
70
import org.openide.util.NbBundle;
68
import org.openide.util.NbBundle;
Lines 75-83 Link Here
75
 * @author Jesse Glick
73
 * @author Jesse Glick
76
 */
74
 */
77
@ActionID(category="Help", id="org.netbeans.modules.javahelp.HelpAction")
75
@ActionID(category="Help", id="org.netbeans.modules.javahelp.HelpAction")
78
@ActionRegistration(displayName="#LBL_HelpAction", iconBase="org/netbeans/modules/javahelp/resources/show-help.gif")
76
@ActionRegistration(displayName="#LBL_HelpAction", iconBase="org/netbeans/modules/javahelp/resources/show-help.gif",
77
        /* OpenIDE-Transmodal-Action must be present from the start (#206089) */ lazy=false)
79
@ActionReference(path="Shortcuts", name="F1")
78
@ActionReference(path="Shortcuts", name="F1")
80
public class HelpAction extends AbstractAction implements ContextAwareAction {
79
public class HelpAction extends AbstractAction {
81
80
82
    public HelpAction() {
81
    public HelpAction() {
83
        Installer.log.fine("HelpAction.initialize");
82
        Installer.log.fine("HelpAction.initialize");
Lines 85-97 Link Here
85
        putValue("OpenIDE-Transmodal-Action", true); // NOI18N
84
        putValue("OpenIDE-Transmodal-Action", true); // NOI18N
86
    }
85
    }
87
86
88
    /**
89
     * #206093 workaround. OpenIDE-Transmodal-Action must be present from the start (#206089).
90
     */
91
    @Override public Action createContextAwareInstance(Lookup actionContext) {
92
        return this;
93
    }
94
95
    static class WindowActivatedDetector implements AWTEventListener {
87
    static class WindowActivatedDetector implements AWTEventListener {
96
        private static java.lang.ref.WeakReference<Window> currentWindowRef;
88
        private static java.lang.ref.WeakReference<Window> currentWindowRef;
97
        private static WindowActivatedDetector detector = null;
89
        private static WindowActivatedDetector detector = null;
(-)a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NbmActionGoalProvider.java (-2 / +2 lines)
Lines 107-113 Link Here
107
    
107
    
108
    
108
    
109
    @ActionID(id = "org.netbeans.modules.maven.apisupport.NBMReload", category = "Project")
109
    @ActionID(id = "org.netbeans.modules.maven.apisupport.NBMReload", category = "Project")
110
    @ActionRegistration(displayName = "#ACT_NBM_Reload")
110
    @ActionRegistration(displayName = "#ACT_NBM_Reload", lazy=false)
111
    @ActionReference(position = 1250, path = "Projects/org-netbeans-modules-maven/Actions")
111
    @ActionReference(position = 1250, path = "Projects/org-netbeans-modules-maven/Actions")
112
    @Messages("ACT_NBM_Reload=Install/Reload in Development IDE")
112
    @Messages("ACT_NBM_Reload=Install/Reload in Development IDE")
113
    public static ContextAwareAction createReloadAction() {
113
    public static ContextAwareAction createReloadAction() {
Lines 117-123 Link Here
117
    }
117
    }
118
118
119
    @ActionID(id = "org.netbeans.modules.maven.apisupport.NBMReloadTarget", category = "Project")
119
    @ActionID(id = "org.netbeans.modules.maven.apisupport.NBMReloadTarget", category = "Project")
120
    @ActionRegistration(displayName = "#ACT_NBM_Reload_Target")
120
    @ActionRegistration(displayName = "#ACT_NBM_Reload_Target", lazy=false)
121
    @ActionReference(position = 1225, path = "Projects/org-netbeans-modules-maven/Actions")
121
    @ActionReference(position = 1225, path = "Projects/org-netbeans-modules-maven/Actions")
122
    @Messages("ACT_NBM_Reload_Target=Reload in Target Platform")
122
    @Messages("ACT_NBM_Reload_Target=Reload in Target Platform")
123
    public static ContextAwareAction createReloadTargetAction() {
123
    public static ContextAwareAction createReloadTargetAction() {
(-)a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/OpenBrandingEditorAction.java (-1 / +1 lines)
Lines 83-89 Link Here
83
 * @author S. Aubrecht
83
 * @author S. Aubrecht
84
 */
84
 */
85
@ActionID(id = "org.netbeans.modules.maven.apisupport.OpenBrandingEditorAction", category = "Project")
85
@ActionID(id = "org.netbeans.modules.maven.apisupport.OpenBrandingEditorAction", category = "Project")
86
@ActionRegistration(displayName = "#LBL_OpenBrandingEditor")
86
@ActionRegistration(displayName = "#LBL_OpenBrandingEditor", lazy=false)
87
@ActionReference(position = 3150, path = "Projects/org-netbeans-modules-maven/Actions")
87
@ActionReference(position = 3150, path = "Projects/org-netbeans-modules-maven/Actions")
88
@Messages("LBL_OpenBrandingEditor=Branding...")
88
@Messages("LBL_OpenBrandingEditor=Branding...")
89
public class OpenBrandingEditorAction extends AbstractAction implements ContextAwareAction {
89
public class OpenBrandingEditorAction extends AbstractAction implements ContextAwareAction {
(-)a/maven.coverage/src/org/netbeans/modules/maven/coverage/CoveragePopup.java (-1 / +1 lines)
Lines 56-62 Link Here
56
import org.openide.util.Lookup;
56
import org.openide.util.Lookup;
57
57
58
@ActionID(category="Project", id="org.netbeans.modules.maven.coverage.CoveragePopup")
58
@ActionID(category="Project", id="org.netbeans.modules.maven.coverage.CoveragePopup")
59
@ActionRegistration(displayName="Maven Coverage") // NOI18N
59
@ActionRegistration(displayName="Maven Coverage", lazy=false) // NOI18N
60
@ActionReference(path="Projects/org-netbeans-modules-maven/Actions", position=1205)
60
@ActionReference(path="Projects/org-netbeans-modules-maven/Actions", position=1205)
61
public class CoveragePopup extends AbstractAction implements ContextAwareAction {
61
public class CoveragePopup extends AbstractAction implements ContextAwareAction {
62
62
(-)a/maven.graph/src/org/netbeans/modules/maven/graph/ShowGraphAction.java (-1 / +1 lines)
Lines 62-68 Link Here
62
 * @author mkleint
62
 * @author mkleint
63
 */
63
 */
64
@ActionID(id = "org.netbeans.modules.maven.graph.ShowGraphAction", category = "Project")
64
@ActionID(id = "org.netbeans.modules.maven.graph.ShowGraphAction", category = "Project")
65
@ActionRegistration(displayName = "#ACT_Show_Graph")
65
@ActionRegistration(displayName = "#ACT_Show_Graph", lazy=false)
66
@ActionReferences({
66
@ActionReferences({
67
    @ActionReference(position = 1650, path = "Projects/org-netbeans-modules-maven/Actions", separatorAfter=1655),
67
    @ActionReference(position = 1650, path = "Projects/org-netbeans-modules-maven/Actions", separatorAfter=1655),
68
    @ActionReference(position = 113, path = "Editors/text/x-maven-pom+xml/Popup", separatorAfter=213)
68
    @ActionReference(position = 113, path = "Editors/text/x-maven-pom+xml/Popup", separatorAfter=213)
(-)a/maven.j2ee/src/org/netbeans/modules/maven/j2ee/J2eeActions.java (-1 / +1 lines)
Lines 74-80 Link Here
74
public class J2eeActions {
74
public class J2eeActions {
75
75
76
    @ActionID(id = "org.netbeans.modules.maven.j2ee.verify", category = "Project")
76
    @ActionID(id = "org.netbeans.modules.maven.j2ee.verify", category = "Project")
77
    @ActionRegistration(displayName = "#ACT_Verify")
77
    @ActionRegistration(displayName = "#ACT_Verify", lazy=false)
78
    @ActionReference(position = 651, path = "Projects/org-netbeans-modules-maven/Actions")
78
    @ActionReference(position = 651, path = "Projects/org-netbeans-modules-maven/Actions")
79
    @Messages("ACT_Verify=Verify")
79
    @Messages("ACT_Verify=Verify")
80
    public static ContextAwareAction verifyAction() {
80
    public static ContextAwareAction verifyAction() {
(-)a/maven/src/org/netbeans/modules/maven/ActionProviderImpl.java (-4 / +4 lines)
Lines 407-413 Link Here
407
    }
407
    }
408
408
409
    @ActionID(id = "org.netbeans.modules.maven.customPopup", category = "Project")
409
    @ActionID(id = "org.netbeans.modules.maven.customPopup", category = "Project")
410
    @ActionRegistration(displayName = "#LBL_Custom_Run")
410
    @ActionRegistration(displayName = "#LBL_Custom_Run", lazy=false)
411
    @ActionReference(position = 1400, path = "Projects/org-netbeans-modules-maven/Actions")
411
    @ActionReference(position = 1400, path = "Projects/org-netbeans-modules-maven/Actions")
412
    @Messages("LBL_Custom_Run=Custom")
412
    @Messages("LBL_Custom_Run=Custom")
413
    public static ContextAwareAction customPopupActions() {
413
    public static ContextAwareAction customPopupActions() {
Lines 472-478 Link Here
472
    }
472
    }
473
473
474
    @ActionID(id = "org.netbeans.modules.maven.closeSubprojects", category = "Project")
474
    @ActionID(id = "org.netbeans.modules.maven.closeSubprojects", category = "Project")
475
    @ActionRegistration(displayName = "#ACT_CloseRequired")
475
    @ActionRegistration(displayName = "#ACT_CloseRequired", lazy=false)
476
    @ActionReference(position = 2000, path = "Projects/org-netbeans-modules-maven/Actions")
476
    @ActionReference(position = 2000, path = "Projects/org-netbeans-modules-maven/Actions")
477
    @Messages("ACT_CloseRequired=Close Required Projects")
477
    @Messages("ACT_CloseRequired=Close Required Projects")
478
    public static ContextAwareAction closeSubprojectsAction() {
478
    public static ContextAwareAction closeSubprojectsAction() {
Lines 502-508 Link Here
502
    }
502
    }
503
503
504
    @ActionID(id = "org.netbeans.modules.maven.showProblems", category = "Project")
504
    @ActionID(id = "org.netbeans.modules.maven.showProblems", category = "Project")
505
    @ActionRegistration(displayName = "#ACT_ShowProblems")
505
    @ActionRegistration(displayName = "#ACT_ShowProblems", lazy=false)
506
    @ActionReference(position = 3100, path = "Projects/org-netbeans-modules-maven/Actions")
506
    @ActionReference(position = 3100, path = "Projects/org-netbeans-modules-maven/Actions")
507
    @Messages("ACT_ShowProblems=Show and Resolve Problems...")
507
    @Messages("ACT_ShowProblems=Show and Resolve Problems...")
508
    public static ContextAwareAction showProblemsAction() {
508
    public static ContextAwareAction showProblemsAction() {
Lines 539-545 Link Here
539
    }
539
    }
540
540
541
    @ActionID(id = "org.netbeans.modules.maven.buildWithDependencies", category = "Project")
541
    @ActionID(id = "org.netbeans.modules.maven.buildWithDependencies", category = "Project")
542
    @ActionRegistration(displayName = "#ACT_Build_Deps")
542
    @ActionRegistration(displayName = "#ACT_Build_Deps", lazy=false)
543
    @ActionReference(position = 500, path = "Projects/org-netbeans-modules-maven/Actions")
543
    @ActionReference(position = 500, path = "Projects/org-netbeans-modules-maven/Actions")
544
    @Messages("ACT_Build_Deps=Build with Dependencies")
544
    @Messages("ACT_Build_Deps=Build with Dependencies")
545
    public static ContextAwareAction buildWithDependenciesAction() {
545
    public static ContextAwareAction buildWithDependenciesAction() {
(-)a/maven/src/org/netbeans/modules/maven/actions/RefreshAction.java (-1 / +1 lines)
Lines 59-65 Link Here
59
59
60
@SuppressWarnings(value = "serial")
60
@SuppressWarnings(value = "serial")
61
@ActionID(id = "org.netbeans.modules.maven.refresh", category = "Project")
61
@ActionID(id = "org.netbeans.modules.maven.refresh", category = "Project")
62
@ActionRegistration(displayName = "#ACT_Reload_Project")
62
@ActionRegistration(displayName = "#ACT_Reload_Project", lazy=false)
63
@ActionReference(position = 1700, path = "Projects/org-netbeans-modules-maven/Actions")
63
@ActionReference(position = 1700, path = "Projects/org-netbeans-modules-maven/Actions")
64
@Messages("ACT_Reload_Project=Reload POM")
64
@Messages("ACT_Reload_Project=Reload POM")
65
public class RefreshAction extends AbstractAction implements ContextAwareAction {
65
public class RefreshAction extends AbstractAction implements ContextAwareAction {
(-)a/o.apache.tools.ant.module/src/org/apache/tools/ant/module/run/RunTargetsAction.java (-1 / +1 lines)
Lines 81-87 Link Here
81
 * undocumented targets.
81
 * undocumented targets.
82
 */
82
 */
83
@ActionID(id = "org.apache.tools.ant.module.nodes.RunTargetsAction", category = "Build")
83
@ActionID(id = "org.apache.tools.ant.module.nodes.RunTargetsAction", category = "Build")
84
@ActionRegistration(displayName = "#LBL_run_targets_action")
84
@ActionRegistration(displayName = "#LBL_run_targets_action", lazy=false)
85
@ActionReferences(value = {
85
@ActionReferences(value = {
86
    @ActionReference(position = 900, path = "Editors/text/x-ant+xml/Popup"),
86
    @ActionReference(position = 900, path = "Editors/text/x-ant+xml/Popup"),
87
    @ActionReference(position = 200, path = "Loaders/text/x-ant+xml/Actions")})
87
    @ActionReference(position = 200, path = "Loaders/text/x-ant+xml/Actions")})
(-)a/openide.awt/manifest.mf (-1 / +1 lines)
Lines 2-6 Link Here
2
OpenIDE-Module: org.openide.awt
2
OpenIDE-Module: org.openide.awt
3
OpenIDE-Module-Localizing-Bundle: org/openide/awt/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/openide/awt/Bundle.properties
4
AutoUpdate-Essential-Module: true
4
AutoUpdate-Essential-Module: true
5
OpenIDE-Module-Specification-Version: 7.40
5
OpenIDE-Module-Specification-Version: 7.41
6
6
(-)a/openide.awt/src/org/netbeans/modules/openide/awt/ActionProcessor.java (-7 / +26 lines)
Lines 42-47 Link Here
42
import java.awt.event.ActionListener;
42
import java.awt.event.ActionListener;
43
import java.util.Collections;
43
import java.util.Collections;
44
import java.util.HashSet;
44
import java.util.HashSet;
45
import java.util.Map;
45
import java.util.Set;
46
import java.util.Set;
46
import java.util.regex.Pattern;
47
import java.util.regex.Pattern;
47
import javax.annotation.processing.Completion;
48
import javax.annotation.processing.Completion;
Lines 51-56 Link Here
51
import javax.annotation.processing.SupportedSourceVersion;
52
import javax.annotation.processing.SupportedSourceVersion;
52
import javax.lang.model.SourceVersion;
53
import javax.lang.model.SourceVersion;
53
import javax.lang.model.element.AnnotationMirror;
54
import javax.lang.model.element.AnnotationMirror;
55
import javax.lang.model.element.AnnotationValue;
54
import javax.lang.model.element.Element;
56
import javax.lang.model.element.Element;
55
import javax.lang.model.element.ElementKind;
57
import javax.lang.model.element.ElementKind;
56
import javax.lang.model.element.ExecutableElement;
58
import javax.lang.model.element.ExecutableElement;
Lines 63-68 Link Here
63
import javax.swing.Action;
65
import javax.swing.Action;
64
import javax.swing.JSeparator;
66
import javax.swing.JSeparator;
65
import javax.swing.KeyStroke;
67
import javax.swing.KeyStroke;
68
import javax.tools.Diagnostic;
66
import org.openide.awt.ActionID;
69
import org.openide.awt.ActionID;
67
import org.openide.awt.ActionReference;
70
import org.openide.awt.ActionReference;
68
import org.openide.awt.ActionReferences;
71
import org.openide.awt.ActionReferences;
Lines 238-254 Link Here
238
                key = ar.key();
241
                key = ar.key();
239
            }
242
            }
240
243
241
            boolean direct;
244
            Boolean direct = null;
242
            if (e.getKind() == ElementKind.FIELD) {
245
            for (AnnotationMirror m : e.getAnnotationMirrors()) {
243
                direct = false;
246
                if (m.getAnnotationType().toString().equals(ActionRegistration.class.getCanonicalName())) {
244
            } else {
247
                    for (Map.Entry<? extends ExecutableElement,? extends AnnotationValue> entry : m.getElementValues().entrySet()) {
245
                TypeMirror type = e.getKind() == ElementKind.CLASS ? e.asType() : ((ExecutableElement) e).getReturnType();
248
                        if (entry.getKey().getSimpleName().contentEquals("lazy")) {
246
                direct = isAssignable(type, p1) || isAssignable(type, p2) || isAssignable(type, p3) || isAssignable(type, caa) || isAssignable(type, dmc);
249
                            direct = ! (Boolean) entry.getValue().getValue();
250
                            assert direct == !ar.lazy();
251
                            break;
252
                        }
253
                    }
254
                }
255
            }
256
            if (direct == null) {
257
                if (e.getKind() == ElementKind.FIELD) {
258
                    direct = false;
259
                } else {
260
                    TypeMirror type = e.getKind() == ElementKind.CLASS ? e.asType() : ((ExecutableElement) e).getReturnType();
261
                    direct = isAssignable(type, p1) || isAssignable(type, p2) || isAssignable(type, p3) || isAssignable(type, caa) || isAssignable(type, dmc);
262
                    if (direct) {
263
                        processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "Should explicitly specify lazy attribute", e);
264
                    }
265
                }
247
            }
266
            }
248
            
267
            
249
            if (direct) {
268
            if (direct) {
250
                if (key.length() != 0) {
269
                if (key.length() != 0) {
251
                    throw new LayerGenerationException("Cannot specify key and implement Presenter interface", e, processingEnv, ar, "key");
270
                    throw new LayerGenerationException("Cannot specify key and use eager registration", e, processingEnv, ar, "key");
252
                }
271
                }
253
                f.instanceAttribute("instanceCreate", Action.class);
272
                f.instanceAttribute("instanceCreate", Action.class);
254
            } else {
273
            } else {
(-)a/openide.awt/src/org/openide/awt/ActionRegistration.java (+39 lines)
Lines 39-49 Link Here
39
39
40
package org.openide.awt;
40
package org.openide.awt;
41
41
42
import java.awt.event.ActionListener;
42
import java.lang.annotation.ElementType;
43
import java.lang.annotation.ElementType;
43
import java.lang.annotation.Retention;
44
import java.lang.annotation.Retention;
44
import java.lang.annotation.RetentionPolicy;
45
import java.lang.annotation.RetentionPolicy;
45
import java.lang.annotation.Target;
46
import java.lang.annotation.Target;
47
import javax.swing.Action;
46
import javax.swing.ActionMap;
48
import javax.swing.ActionMap;
49
import org.openide.util.ContextAwareAction;
47
50
48
/** Registers an action under associated identifier specified by separate
51
/** Registers an action under associated identifier specified by separate
49
 * {@link ActionID} annotation on the same element. Here is few usage examples:
52
 * {@link ActionID} annotation on the same element. Here is few usage examples:
Lines 108-111 Link Here
108
    /** Shall the action work on last selection when it was enabled?
111
    /** Shall the action work on last selection when it was enabled?
109
     */
112
     */
110
    boolean surviveFocusChange() default false;
113
    boolean surviveFocusChange() default false;
114
115
    /**
116
     * Whether a lazy factory registration from {@link Actions} should be used.
117
     * <p>Most actions can be registered using a lazy factory (see class Javadoc for list),
118
     * which permits the application to avoid loading the action class unless and until it
119
     * is actually run. Before then, queries on the name, icon, etc. are serviced using
120
     * static metadata, which minimizes startup overhead.
121
     * <p>In limited cases, using this sort of lazy delegate is impossible or undesirable:
122
     * the action needs to export some special key from {@link Action#getValue};
123
     * it presents multiple menu items according to dynamic conditions; or for UI reasons
124
     * it is preferred to visually disable the action under certain conditions (rather than
125
     * leaving it enabled and showing a message if selected under those conditions).
126
     * <p>For these special cases,
127
     * you may specify {@code lazy=false} to force the action registration to use the
128
     * traditional direct registration of an instance of the action, without any lazy factory.
129
     * That allows the action to supply arbitrary customized behavior even before it is ever run,
130
     * at the expense of overhead when the registration is first encountered (such as when the
131
     * main menu bar is populated, or a context menu of a certain kind is first shown).
132
     * <p>It is an error to specify {@code lazy=false} on an element which is not assignable
133
     * to {@link Action} (e.g. an {@link ActionListener}, or a {@code String} field);
134
     * or which requires a context parameter in its constructor (or factory method).
135
     * <p>For compatibility, registrations which do not <em>explicitly</em> specify this
136
     * attribute but which are on elements assignable to any of the following types
137
     * will be registered as if {@code lazy=false}, despite the default value of the attribute
138
     * (but a warning will be issued and the attribute should be made explicit):
139
     * <ul>
140
     * <li>{@link org.openide.util.actions.Presenter.Menu}
141
     * <li>{@link org.openide.util.actions.Presenter.Toolbar}
142
     * <li>{@link org.openide.util.actions.Presenter.Popup}
143
     * <li>{@link ContextAwareAction}
144
     * <li>{@link DynamicMenuContent}
145
     * </ul>
146
     * @since 7.41
147
     */
148
    boolean lazy() default true;
149
111
}
150
}
(-)a/openide.awt/test/unit/src/org/netbeans/modules/openide/awt/ActionProcessorTest.java (+27 lines)
Lines 625-630 Link Here
625
            return null;
625
            return null;
626
        }
626
        }
627
    }
627
    }
628
    @ActionID(category="eager", id="direct.seven")
629
    @ActionRegistration(displayName="Direct Action", lazy=false)
630
    public static class Direct7 extends AbstractAction {
631
        @Override public void actionPerformed(ActionEvent e) {}
632
    }
633
    @ActionID(category="eager", id="direct.eight")
634
    @ActionRegistration(displayName="Direct Action", lazy=true)
635
    public static class Direct8 extends AbstractAction implements ContextAwareAction {
636
        @Override public void actionPerformed(ActionEvent e) {}
637
        @Override public Action createContextAwareInstance(Lookup actionContext) {
638
            return this;
639
        }
640
    }
628
    
641
    
629
    @ActionID(category="menutext", id="namedaction")
642
    @ActionID(category="menutext", id="namedaction")
630
    @ActionRegistration(displayName="This is an Action", menuText="This is a Menu Action", popupText="This is a Popup Action")
643
    @ActionRegistration(displayName="This is an Action", menuText="This is a Menu Action", popupText="This is a Popup Action")
Lines 692-697 Link Here
692
        assertNotNull("Action created", obj);
705
        assertNotNull("Action created", obj);
693
        assertEquals("Direct class is created", Direct6.class, obj.getClass());
706
        assertEquals("Direct class is created", Direct6.class, obj.getClass());
694
    }
707
    }
708
    public void testDirectInstanceIfRequested() throws Exception {
709
        FileObject fo = FileUtil.getConfigFile("Actions/eager/direct-seven.instance");
710
        assertNotNull("Instance found", fo);
711
        Object obj = fo.getAttribute("instanceCreate");
712
        assertNotNull("Action created", obj);
713
        assertEquals("Direct class is created", Direct7.class, obj.getClass());
714
    }
715
    public void testIndirectInstanceIfRequested() throws Exception {
716
        FileObject fo = FileUtil.getConfigFile("Actions/eager/direct-eight.instance");
717
        assertNotNull("Instance found", fo);
718
        Object obj = fo.getAttribute("instanceCreate");
719
        assertNotNull("Action created", obj);
720
        assertNotSame("Direct class is not created", Direct8.class, obj.getClass());
721
    }
695
    
722
    
696
    public void testNoKeyForDirects() throws IOException {
723
    public void testNoKeyForDirects() throws IOException {
697
        clearWorkDir();
724
        clearWorkDir();
(-)a/progress.ui/src/org/netbeans/modules/progress/ui/ProgressListAction.java (-13 / +2 lines)
Lines 44-50 Link Here
44
44
45
package org.netbeans.modules.progress.ui;
45
package org.netbeans.modules.progress.ui;
46
46
47
import javax.swing.JMenuItem;
48
import org.netbeans.modules.progress.spi.Controller;
47
import org.netbeans.modules.progress.spi.Controller;
49
import javax.swing.AbstractAction;
48
import javax.swing.AbstractAction;
50
import javax.swing.SwingUtilities;
49
import javax.swing.SwingUtilities;
Lines 53-70 Link Here
53
import org.openide.awt.ActionID;
52
import org.openide.awt.ActionID;
54
import org.openide.awt.ActionReference;
53
import org.openide.awt.ActionReference;
55
import org.openide.awt.ActionRegistration;
54
import org.openide.awt.ActionRegistration;
56
import org.openide.awt.Actions;
57
import org.openide.util.NbBundle;
55
import org.openide.util.NbBundle;
58
import org.openide.util.actions.Presenter;
59
56
60
/**
57
/**
61
 *
58
 *
62
 * @author mkleint
59
 * @author mkleint
63
 */
60
 */
64
@ActionID(id = "org.netbeans.modules.progress.ui.ProgressListAction", category = "Window")
61
@ActionID(id = "org.netbeans.modules.progress.ui.ProgressListAction", category = "Window")
65
@ActionRegistration(displayName = "#CTL_ProcessListAction")
62
@ActionRegistration(displayName = "#CTL_ProcessListAction", lazy=false)
66
@ActionReference(position = 1900, name = "ProgressListAction", path = "Menu/Window")
63
@ActionReference(position = 1900, name = "ProgressListAction", path = "Menu/Window")
67
public class ProgressListAction extends AbstractAction implements ListDataListener, Runnable, Presenter.Menu {
64
public class ProgressListAction extends AbstractAction implements ListDataListener, Runnable {
68
65
69
    /** Creates a new instance of ProcessListAction */
66
    /** Creates a new instance of ProcessListAction */
70
    public ProgressListAction() {
67
    public ProgressListAction() {
Lines 104-115 Link Here
104
        updateEnabled();
101
        updateEnabled();
105
    }
102
    }
106
103
107
    // XXX could remove impl of this interface; then it would be "always enabled" (until first selected, then enablement would update)
108
    public @Override JMenuItem getMenuPresenter() {
109
        JMenuItem presenter = new JMenuItem();
110
        Actions.connect(presenter, this, false);
111
        return presenter;
112
    }
113
    
114
    
115
}
104
}
(-)a/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/UpdateProjectAction.java (-1 / +1 lines)
Lines 57-63 Link Here
57
import org.openide.util.NbBundle;
57
import org.openide.util.NbBundle;
58
58
59
@ActionID(id = "org.netbeans.modules.projectimport.eclipse.core.UpdateProjectAction", category = "Project")
59
@ActionID(id = "org.netbeans.modules.projectimport.eclipse.core.UpdateProjectAction", category = "Project")
60
@ActionRegistration(displayName = "#UpdateProjectAction.Name")
60
@ActionRegistration(displayName = "#UpdateProjectAction.Name", lazy=false)
61
@ActionReference(position = 234, path = "Projects/Actions")
61
@ActionReference(position = 234, path = "Projects/Actions")
62
public final class UpdateProjectAction extends AbstractAction implements ContextAwareAction {
62
public final class UpdateProjectAction extends AbstractAction implements ContextAwareAction {
63
    
63
    
(-)a/projectui/src/org/netbeans/modules/project/ui/SyncEditorWithViewsAction.java (-1 / +1 lines)
Lines 63-69 Link Here
63
 * @author Milan Kubec
63
 * @author Milan Kubec
64
 */
64
 */
65
@ActionID(id = "org.netbeans.modules.project.ui.SyncEditorWithViewsAction", category = "Project")
65
@ActionID(id = "org.netbeans.modules.project.ui.SyncEditorWithViewsAction", category = "Project")
66
@ActionRegistration(displayName = "#CTL_SYNC_EDITOR_WITH_VIEWS")
66
@ActionRegistration(displayName = "#CTL_SYNC_EDITOR_WITH_VIEWS", lazy=false)
67
@ActionReference(path = "Menu/View", position = 1050)
67
@ActionReference(path = "Menu/View", position = 1050)
68
public class SyncEditorWithViewsAction extends SystemAction implements DynamicMenuContent {
68
public class SyncEditorWithViewsAction extends SystemAction implements DynamicMenuContent {
69
69
(-)a/projectui/src/org/netbeans/modules/project/ui/actions/ActiveConfigAction.java (-1 / +1 lines)
Lines 110-116 Link Here
110
 * @author Greg Crawley, Adam Sotona, Jesse Glick
110
 * @author Greg Crawley, Adam Sotona, Jesse Glick
111
 */
111
 */
112
@ActionID(id="org.netbeans.modules.project.ui.actions.ActiveConfigAction", category="Project")
112
@ActionID(id="org.netbeans.modules.project.ui.actions.ActiveConfigAction", category="Project")
113
@ActionRegistration(displayName="#ActiveConfigAction.label")
113
@ActionRegistration(displayName="#ActiveConfigAction.label", lazy=false)
114
@ActionReferences({
114
@ActionReferences({
115
    @ActionReference(path="Menu/BuildProject", position=300),
115
    @ActionReference(path="Menu/BuildProject", position=300),
116
    @ActionReference(path="Toolbars/Build", position=80)
116
    @ActionReference(path="Toolbars/Build", position=80)
(-)a/projectui/src/org/netbeans/modules/project/ui/actions/OpenProjectFolderAction.java (-1 / +1 lines)
Lines 74-80 Link Here
74
 * @author Jesse Glick
74
 * @author Jesse Glick
75
 */
75
 */
76
@ActionID(id = "org.netbeans.modules.project.ui.actions.OpenProjectFolderAction", category = "Project")
76
@ActionID(id = "org.netbeans.modules.project.ui.actions.OpenProjectFolderAction", category = "Project")
77
@ActionRegistration(displayName = "#OpenProjectFolderAction.LBL_action")
77
@ActionRegistration(displayName = "#OpenProjectFolderAction.LBL_action", lazy=false)
78
@ActionReference(path = "Loaders/folder/any/Actions", position = 100)
78
@ActionReference(path = "Loaders/folder/any/Actions", position = 100)
79
@Messages("OpenProjectFolderAction.LBL_action=Open Project of Folder")
79
@Messages("OpenProjectFolderAction.LBL_action=Open Project of Folder")
80
public final class OpenProjectFolderAction extends AbstractAction implements ContextAwareAction {
80
public final class OpenProjectFolderAction extends AbstractAction implements ContextAwareAction {
(-)a/projectui/src/org/netbeans/modules/project/ui/actions/RunLastBuildAction.java (-1 / +1 lines)
Lines 70-76 Link Here
70
 * @see "#47925"
70
 * @see "#47925"
71
 */
71
 */
72
@ActionID(id = "org.netbeans.modules.project.ui.Rerun", category = "Project")
72
@ActionID(id = "org.netbeans.modules.project.ui.Rerun", category = "Project")
73
@ActionRegistration(displayName = "#LBL_RunLastBuildAction_general")
73
@ActionRegistration(displayName = "#LBL_RunLastBuildAction_general", lazy=false)
74
@ActionReference(path = "Menu/BuildProject", position = 1000)
74
@ActionReference(path = "Menu/BuildProject", position = 1000)
75
public final class RunLastBuildAction extends AbstractAction implements ChangeListener, Presenter.Menu, Presenter.Toolbar {
75
public final class RunLastBuildAction extends AbstractAction implements ChangeListener, Presenter.Menu, Presenter.Toolbar {
76
    
76
    
(-)a/projectui/src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java (-2 / +2 lines)
Lines 69-75 Link Here
69
    private final String findIn;
69
    private final String findIn;
70
    
70
    
71
    @ActionID(id = "org.netbeans.modules.project.ui.SelectInProjects", category = "Window/SelectDocumentNode")
71
    @ActionID(id = "org.netbeans.modules.project.ui.SelectInProjects", category = "Window/SelectDocumentNode")
72
    @ActionRegistration(displayName = "#LBL_SelectInProjectsAction_MainMenuName")
72
    @ActionRegistration(displayName = "#LBL_SelectInProjectsAction_MainMenuName", lazy=false)
73
    @ActionReferences({
73
    @ActionReferences({
74
        @ActionReference(path = "Shortcuts", name = "DS-1"),
74
        @ActionReference(path = "Shortcuts", name = "DS-1"),
75
        @ActionReference(path = "Menu/GoTo", position = 2600, separatorBefore = 2500),
75
        @ActionReference(path = "Menu/GoTo", position = 2600, separatorBefore = 2500),
Lines 80-86 Link Here
80
    }
80
    }
81
    
81
    
82
    @ActionID(id = "org.netbeans.modules.project.ui.SelectInFiles", category = "Window/SelectDocumentNode")
82
    @ActionID(id = "org.netbeans.modules.project.ui.SelectInFiles", category = "Window/SelectDocumentNode")
83
    @ActionRegistration(displayName = "#LBL_SelectInFilesAction_MainMenuName")
83
    @ActionRegistration(displayName = "#LBL_SelectInFilesAction_MainMenuName", lazy=false)
84
    @ActionReferences({
84
    @ActionReferences({
85
        @ActionReference(path = "Shortcuts", name = "DS-2"),
85
        @ActionReference(path = "Shortcuts", name = "DS-2"),
86
        @ActionReference(path = "Menu/GoTo", position = 2700)
86
        @ActionReference(path = "Menu/GoTo", position = 2700)
(-)a/projectui/src/org/netbeans/modules/project/ui/actions/StopBuildingAction.java (-1 / +1 lines)
Lines 69-75 Link Here
69
 * @see "issue #43143"
69
 * @see "issue #43143"
70
 */
70
 */
71
@ActionID(id = "org.netbeans.modules.project.ui.actions.StopBuildingAction", category = "Project")
71
@ActionID(id = "org.netbeans.modules.project.ui.actions.StopBuildingAction", category = "Project")
72
@ActionRegistration(displayName = "#LBL_stop_building")
72
@ActionRegistration(displayName = "#LBL_stop_building", lazy=false)
73
@ActionReference(path = "Menu/BuildProject", position = 1100)
73
@ActionReference(path = "Menu/BuildProject", position = 1100)
74
public final class StopBuildingAction extends CallableSystemAction implements ChangeListener {
74
public final class StopBuildingAction extends CallableSystemAction implements ChangeListener {
75
    
75
    
(-)a/projectui/src/org/netbeans/modules/project/ui/groups/GroupsMenu.java (-1 / +1 lines)
Lines 75-81 Link Here
75
 * @author Jesse Glick
75
 * @author Jesse Glick
76
 */
76
 */
77
@ActionID(id = "org.netbeans.modules.project.ui.groups.GroupsMenu", category = "Project")
77
@ActionID(id = "org.netbeans.modules.project.ui.groups.GroupsMenu", category = "Project")
78
@ActionRegistration(displayName = "#GroupsMenu.label")
78
@ActionRegistration(displayName = "#GroupsMenu.label", lazy=false)
79
@ActionReferences({
79
@ActionReferences({
80
    @ActionReference(path = "Menu/File", position = 1100),
80
    @ActionReference(path = "Menu/File", position = 1100),
81
    @ActionReference(path = ProjectsRootNode.ACTIONS_FOLDER, position = 600, separatorAfter = 700)
81
    @ActionReference(path = ProjectsRootNode.ACTIONS_FOLDER, position = 600, separatorAfter = 700)
(-)a/spi.quicksearch/src/org/netbeans/modules/quicksearch/QuickSearchAction.java (-1 / +1 lines)
Lines 56-62 Link Here
56
 * @author  Jan Becicka
56
 * @author  Jan Becicka
57
 */
57
 */
58
@ActionID(id = "org.netbeans.modules.quicksearch.QuickSearchAction", category = "Edit")
58
@ActionID(id = "org.netbeans.modules.quicksearch.QuickSearchAction", category = "Edit")
59
@ActionRegistration(displayName = "#CTL_QuickSearchAction")
59
@ActionRegistration(displayName = "#CTL_QuickSearchAction", lazy=false)
60
@ActionReference(name = "D-I", path = "Shortcuts")
60
@ActionReference(name = "D-I", path = "Shortcuts")
61
public final class QuickSearchAction extends CallableSystemAction {
61
public final class QuickSearchAction extends CallableSystemAction {
62
62
(-)a/utilities/src/org/netbeans/modules/openfile/RecentFileAction.java (-1 / +1 lines)
Lines 85-91 Link Here
85
 *
85
 *
86
 * @author Dafe Simonek
86
 * @author Dafe Simonek
87
 */
87
 */
88
@ActionRegistration(
88
@ActionRegistration(lazy=false,
89
    displayName="#LBL_RecentFileAction_Name"
89
    displayName="#LBL_RecentFileAction_Name"
90
)
90
)
91
@ActionID(category="System", id="org.netbeans.modules.openfile.RecentFileAction")
91
@ActionID(category="System", id="org.netbeans.modules.openfile.RecentFileAction")

Return to bug 206093