@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"); 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()); processReferences(e, actionReference, 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('.', '-'); if (ref.path().startsWith("Shortcuts")) { KeyStroke[] stroke = Utilities.stringToKeys(name); if (stroke == null) { 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(); if (ref.separatorAfter() != Integer.MAX_VALUE) { if (ref.position() == Integer.MAX_VALUE || ref.position() >= ref.separatorAfter()) { throw new LayerGenerationException("separatorAfter() must be greater than position()", e, processingEnv, ref); File after = layer(e).file(ref.path() + "/" + name + "-separatorAfter.instance"); after.newvalue("instanceCreate", JSeparator.class.getName()); after.position(ref.separatorAfter()); after.write(); if (ref.separatorBefore() != Integer.MAX_VALUE) { if (ref.position() == Integer.MAX_VALUE || ref.position() <= ref.separatorBefore()) { throw new LayerGenerationException("separatorBefore() must be lower than position()", e, processingEnv, ref);
@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="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="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 ), @ActionReference( ), @ActionReference( separatorAfter = 800 ), @ActionReference( separatorAfter = 1000 ),
@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 ), @ActionReference( ), @ActionReference( separatorAfter = 800 ), @ActionReference( separatorAfter = 1000 ),
@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 ,@ActionReference( ,@ActionReference( ,@ActionReference( ,@ActionReference( ,@ActionReference( ,@ActionReference(
@ActionID(category = "Time", id = "com.github.kayak.ui.time.PlayAction") @ActionRegistration(iconBase = "com/github/kayak/ui/icons/media-playback-start.png", displayName = "com.github.kayak.ui.time.Bundle#CTL_PlayAction") @ActionReferences({ @ActionReference(path = "Toolbars/Time", position = 100), @ActionReference(path = "Menu/Time", position = 100) }) public final class PlayAction implements ActionListener { @Override public void actionPerformed(ActionEvent e) { TimeSourceManager.getGlobalTimeSource().play(); } }
@ActionID(id = "org.netbeans.modules.project.ant.VariablesCustomizerAction", category = "Tools") @ActionRegistration(iconInMenu = false, displayName = "#ACTION_NAME_Variables") @ActionReference(position = 475, name = "VariablesCustomizerAction", path = "Menu/Tools") public final class VariablesCustomizerAction implements ActionListener { public void actionPerformed(ActionEvent e) { VariablesPanel.showVariablesCustomizer(); } }
@Messages({ "LBL_Csv_LOADER=Files of Csv" }) displayName = "#LBL_Csv_LOADER", position = 300) @ActionReferences({ @ActionReference( path = "Loaders/text/csv/Actions", id = @ActionID(category = "System", id = "org.openide.actions.OpenAction"), position = 100, separatorAfter = 200), @ActionReference( path = "Loaders/text/csv/Actions", id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), position = 600), @ActionReference( path = "Loaders/text/csv/Actions", id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"), position = 700, separatorAfter = 800), @ActionReference( path = "Loaders/text/csv/Actions", id =
@ActionID(category = "Time", id = "com.github.kayak.ui.time.PauseAction") @ActionRegistration(iconBase = "com/github/kayak/ui/icons/media-playback-pause.png", displayName = "com.github.kayak.ui.time.Bundle#CTL_PauseAction") @ActionReferences({ @ActionReference(path = "Toolbars/Time", position = 200), @ActionReference(path = "Menu/Time", position = 200) }) public final class PauseAction implements ActionListener { @Override public void actionPerformed(ActionEvent e) { TimeSourceManager.getGlobalTimeSource().pause(); } }