@ActionID(id = "org.netbeans.modules.profiler.actions.TakeSnapshotAction", category = "Profile") @ActionRegistration(displayName = "#LBL_TakeSnapshotAction") @ActionReferences(value = { @ActionReference(path = "Shortcuts", name = "C-F2"), @ActionReference(path = "Menu/Profile", position = 1200)}) public static TakeSnapshotAction getInstance() { return Singleton.INSTANCE; }
throw new LayerGenerationException("@ActionRegistration can only be used together with @ActionID annotation", e, processingEnv, ar); if (aid.id() == null) { continue; if (aid.category().startsWith("Actions/")) { throw new LayerGenerationException("@ActionID category() should not start with Actions/", e, processingEnv, aid, "category"); if (!FQN.matcher(aid.id()).matches()) { throw new LayerGenerationException("@ActionID id() must be valid fully qualified name", e, processingEnv, aid, "id"); String id = aid.id().replace('.', '-'); LayerBuilder builder = layer(e); File f = builder.file("Actions/" + aid.category() + "/" + id + ".instance"); f.bundlevalue("displayName", ar.displayName(), ar, "displayName"); for (ActionReference actionReference : refs.value()) { processReferences(e, actionReference, aid); for (ActionReference actionReference : refs.value()) { if (!actionReference.id().id().isEmpty() || !actionReference.id().category().isEmpty()) { throw new LayerGenerationException("Don't specify additional id=@ActionID(...) when using @ActionID on the element", e, processingEnv, actionReference.id()); for (ActionReference actionReference : refs.value()) { if (actionReference.id().id().isEmpty() || actionReference.id().category().isEmpty()) { throw new LayerGenerationException("Specify real id=@ActionID(...)", e, processingEnv, actionReference.id());
private void processReferences(Element e, ActionReference ref, ActionID aid) throws LayerGenerationException { if (!ref.id().category().isEmpty() && !ref.id().id().isEmpty()) { if (!aid.id().equals(ref.id().id()) || !aid.category().equals(ref.id().category())) { throw new LayerGenerationException("Can't specify id() attribute when @ActionID provided on the element", e, processingEnv, aid); String name = ref.name(); if (name.isEmpty()) { name = aid.id().replace('.', '-'); File f = layer(e).file(ref.path() + "/" + name + ".shadow"); f.stringvalue("originalFile", "Actions/" + aid.category() + "/" + aid.id().replace('.', '-') + ".instance"); f.position(ref.position()); f.write();
@ActionID(id = "org.netbeans.modules.profiler.actions.RunGCAction", category = "Profile") @ActionRegistration(displayName = "#LBL_RunGCAction", lazy=false) @ActionReference(path = "Menu/Profile", position = 1000, separatorAfter=1100) public static RunGCAction getInstance() { return Singleton.INSTANCE; }
@ActionReferences({ @ActionReference( id=@ActionID(id="org.netbeans.modules.gsf.testrunner.TestMethodRunnerAction", category="CommonTestRunner"), position=860, path="Editors/text/x-php5/Popup") }) @ServiceProvider(service = TestMethodRunnerProvider.class, position = 100) public class PhpTestMethodRunnerProvider extends TestMethodRunnerProvider { @Override public boolean isTestClass(Node activatedNode) { return TestSingleMethodSupport.isTestClass(activatedNode); } @Override public boolean canHandle(Node activatedNode) { return TestSingleMethodSupport.canHandle(activatedNode); } @Override public SingleMethod getTestMethod(Document doc, int caret) { return TestSingleMethodSupport.getTestMethod(doc, caret); } }
@ActionID(category = "CommonTestRunner", id = "org.netbeans.modules.gsf.testrunner.ui.ResultWindow.Rerun") @ActionRegistration(displayName = "#CTL_Rerun") @NbBundle.Messages("CTL_Rerun=Rerun All Tests") public static final class Rerun extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { StatisticsPanel statisticsPanel = getStatisticsPanel(); if(statisticsPanel != null) { statisticsPanel.rerun(false); } } }
@ActionID(category="Profile", id="org.netbeans.modules.profiler.actions.ModifyProfilingAction") @ActionRegistration(displayName="#LBL_ModifyProfilingAction", iconBase="org/netbeans/modules/profiler/impl/icons/modifyProfiling.png", lazy=false) @ActionReference(path="Menu/Profile", position=600) public static ModifyProfilingAction getInstance() { return Singleton.INSTANCE; }
@ActionReferences({ @ActionReference( id=@ActionID(id="org.netbeans.modules.gsf.testrunner.TestMethodDebuggerAction", category="CommonTestRunner"), position=870, path="Editors/text/x-php5/Popup") }) @ServiceProvider(service = TestMethodDebuggerProvider.class, position = 100) public class PhpTestMethodDebuggerProvider extends TestMethodDebuggerProvider { @Override public boolean isTestClass(Node activatedNode) { return TestSingleMethodSupport.isTestClass(activatedNode); } @Override public boolean canHandle(Node activatedNode) { return TestSingleMethodSupport.canHandle(activatedNode); } @Override public SingleMethod getTestMethod(Document doc, int caret) { return TestSingleMethodSupport.getTestMethod(doc, caret); } }
@ActionID(category = "CommonTestRunner", id = "org.netbeans.modules.gsf.testrunner.ui.ResultWindow.RerunFailed") @ActionRegistration(displayName = "#CTL_RerunFailed") @NbBundle.Messages("CTL_RerunFailed=Rerun Failed Tests") public static final class RerunFailed extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { StatisticsPanel statisticsPanel = getStatisticsPanel(); if(statisticsPanel != null) { statisticsPanel.rerun(true); } } }
@ActionID(category="Profile", id="org.netbeans.modules.profiler.actions.StopAction") @ActionRegistration(displayName="#LBL_StopAction") @ActionReferences({ @ActionReference(path="Menu/Profile", position=700, separatorAfter=800), @ActionReference(path="Shortcuts", name="S-F2") }) public static StopAction getInstance() { return Singleton.INSTANCE; }
@ActionID(id = "org.netbeans.modules.java.platform.ui.PlatformsCustomizerAction", category = "Tools") @ActionRegistration(iconInMenu = false, displayName = "#CTL_PlatformManager") @ActionReference(position = 300, name = "JavaPlatformsCustomizerAction", path = "Menu/Tools") public final class PlatformsCustomizerAction implements ActionListener { public void actionPerformed(ActionEvent e) { org.netbeans.api.java.platform.PlatformsCustomizer.showCustomizer(null); } }
@ActionReferences({ @ActionReference( path = "Loaders/text/x-beans+xml/Actions", id = @ActionID(category = "System", id = "org.openide.actions.OpenAction"), position = 100, separatorAfter = 200 ), @ActionReference( path = "Loaders/text/x-beans+xml/Actions", id = @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), position = 300 ), @ActionReference( path = "Loaders/text/x-beans+xml/Actions", id = @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), position = 400, separatorAfter = 500 id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), position = 600 id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"), position = 700, separatorAfter = 800 id = @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), position = 900, separatorAfter = 1000
@ActionID( category = "SonarQube", id = "qubexplorer.ui.SonarDialogAction") @ActionRegistration( displayName = "#CTL_SonarDialogAction") @Messages("CTL_SonarDialogAction=Get Issues from Server") public final class ServerIssuesAction implements ActionListener { private final Project context; public ServerIssuesAction(Project context) { this.context = context; } @Override public void actionPerformed(ActionEvent ev) { SonarQubeProjectConfiguration configuration = ConfigurationFactory.createDefaultConfiguration(context); if (configuration != null) { final ProjectContext projectContext = new ProjectContext(context, configuration); final SonarQube sonarQube = SonarQubeFactory.createForDefaultServerUrl(); TaskExecutor.execute(new SummaryTask(sonarQube, projectContext, new SummaryOptions<>(Severity.getType(), Collections.emptyList()))); } } }
@ActionID(category="Profile", id="org.netbeans.modules.profiler.actions.ResetResultsAction") @ActionRegistration(displayName="#LBL_ResetResultsAction", lazy=false) @ActionReferences({ @ActionReference(path="Menu/Profile", position=900), @ActionReference(path = "Shortcuts", name = "AS-F2") }) public static ResetResultsAction getInstance() { return Singleton.INSTANCE; }
@ActionID(id = "org.netbeans.modules.profiler.actions.HeapDumpAction", category = "Profile") @ActionRegistration(displayName = "#HeapDumpAction_ActionName", lazy=false) @ActionReference(path = "Menu/Profile", position = 1300) public static HeapDumpAction getInstance() { return Singleton.INSTANCE; }
@ActionReferences({ @ActionReference( path = "Loaders/text/x-ts/Actions", id = @ActionID(category = "System", id = "org.openide.actions.OpenAction"), position = 100, separatorAfter = 200 ), @ActionReference( path = "Loaders/text/x-ts/Actions", id = @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), position = 300 ), @ActionReference( path = "Loaders/text/x-ts/Actions", id = @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), position = 400, separatorAfter = 500 id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), position = 600 id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"), position = 700, separatorAfter = 800 id = @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), position = 900, separatorAfter = 1000
@Messages("LBL_TestProject_Action=Test") @ActionID(id = "org.netbeans.modules.groovy.support.GroovyProjectModule.test.project", category = "Groovy") @ActionRegistration(lazy = false, displayName = "#LBL_TestProject_Action") public static Action testProject() { return ProjectSensitiveActions.projectCommandAction( ActionProvider.COMMAND_TEST, LBL_TestProject_Action(), null); }
@ActionID(category = "Time", id = "com.github.kayak.ui.time.StopAction") @ActionRegistration(iconBase = "com/github/kayak/ui/icons/media-playback-stop.png", displayName = "com.github.kayak.ui.time.Bundle#CTL_StopAction") @ActionReferences({ @ActionReference(path = "Toolbars/Time", position = 300), @ActionReference(path = "Menu/Time", position = 300) }) public final class StopAction implements ActionListener { @Override public void actionPerformed(ActionEvent e) { TimeSourceManager.getGlobalTimeSource().stop(); } }
@ActionID(category="Profile", id="org.netbeans.modules.profiler.actions.TelemetryOverviewAction") @ActionRegistration(displayName="#LBL_TelemetryOverviewAction", iconBase="org/netbeans/modules/profiler/impl/icons/telemetryOverviewWindow.png") @ActionReference(path="Menu/Window/Profile", position=500) public static TelemetryOverviewAction getInstance() { return Singleton.INSTANCE; }
@ActionReferences({ @ActionReference( path = "Loaders/text/application+properties/Actions", id = @ActionID(category = "System", id = "org.openide.actions.OpenAction"), position = 100, separatorAfter = 200 ,@ActionReference( path = "Loaders/text/application+properties/Actions", id = @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), position = 300 ,@ActionReference( path = "Loaders/text/application+properties/Actions", id = @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), position = 400, separatorAfter = 500 id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), position = 600 id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"), position = 700, separatorAfter = 800 id = @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), position = 900, separatorAfter = 1000