當前位置: 首頁>>代碼示例>>Java>>正文


Java ActionReferences類代碼示例

本文整理匯總了Java中org.openide.awt.ActionReferences的典型用法代碼示例。如果您正苦於以下問題:Java ActionReferences類的具體用法?Java ActionReferences怎麽用?Java ActionReferences使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ActionReferences類屬於org.openide.awt包,在下文中一共展示了ActionReferences類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: profileProjectPopup

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@Messages({
    "LBL_ProfileProject=Profile"
})
@ActionID(category="Profile", id="org.netbeans.modules.profiler.actions.ProfileProjectPopup")
@ActionRegistration(displayName="#LBL_ProfileProject", lazy=false, asynchronous=true)
@ActionReferences({
    @ActionReference(path="Projects/org-netbeans-modules-java-j2seproject/Actions", position=1000),
    @ActionReference(path="Projects/org-netbeans-modules-java-j2semodule/Actions", position=1000),
    @ActionReference(path="Projects/org-netbeans-modules-apisupport-project/Actions", position=900),
    @ActionReference(path="Projects/org-netbeans-modules-apisupport-project-suite/Actions", position=1000),
    @ActionReference(path="Projects/org-netbeans-modules-web-project/Actions", position=1000)
})
public static Action profileProjectPopup() {
    Action delegate = ProjectSensitiveActions.projectSensitiveAction(
            ProjectSensitivePerformer.profileProject(ActionProvider.COMMAND_PROFILE), 
            NbBundle.getMessage(AntActions.class, "LBL_ProfileProject"), // NOI18N
            null
    );
    
    return delegate;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:22,代碼來源:AntActions.java

示例2: profileSingle

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@Messages("LBL_ProfileFile=Profile &File")
@ActionID(category="Profile", id="org.netbeans.modules.profiler.actions.ProfileSingle")
@ActionRegistration(displayName="#LBL_ProfileFile", lazy=false)
@ActionReferences({
    @ActionReference(path="Loaders/text/x-java/Actions", position=1200),
    @ActionReference(path="Loaders/text/x-jsp/Actions", position=800),
    @ActionReference(path="Menu/Profile", position=110)
})
public static Action profileSingle() {
    Action delegate = FileSensitiveActions.fileSensitiveAction(
            new FileSensitivePerformer(ActionProvider.COMMAND_PROFILE_SINGLE),  
            Bundle.LBL_ProfileFile(),
            null);
    
    return delegate;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:17,代碼來源:AntActions.java

示例3: projects

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@Messages({
        "# {0} - # of selected projects (0 if disabled), or -1 if main project", 
        "# {1} - project name, if exactly one project", 
//        "LBL_ProfileMainProjectAction=&Profile {0,choice,-1#Main Project|0#Project|1#Project ({1})|1<{0} Projects}" // #231371
        "LBL_AttachMainProjectAction=&Attach to {0,choice,-1#Main Project|0#Project|1#Project ({1})|1<Project}"
    })
    @ActionID(category="Profile", id="org.netbeans.modules.profiler.actions.AttachMainProject")
    @ActionRegistration(displayName="#LBL_AttachMainProjectAction", lazy=false)
    @ActionReferences({
        @ActionReference(path="Menu/Profile", position=125)
    })
    public static Action attachMainProjectAction() {
        Action delegate = ProjectSensitiveActions.projectSensitiveAction(
                ProjectSensitivePerformer.attachProject(), 
                NbBundle.getMessage(AntActions.class, "LBL_AttachMainProjectAction"), // NOI18N
                Icons.getIcon(ProfilerIcons.ATTACH)
        );
        delegate.putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(AntActions.class, "LBL_AttachMainProjectAction")); // NOI18N
        delegate.putValue("iconBase", Icons.getResource(ProfilerIcons.ATTACH)); // NOI18N
        
        return delegate;
    }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:23,代碼來源:AntActions.java

示例4: customPopupActions

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(id = "org.netbeans.modules.maven.customPopup", category = "Project")
@ActionRegistration(displayName = "#LBL_Custom_Run", lazy=false)
@ActionReferences({
    @ActionReference(position = 1400, path = "Projects/org-netbeans-modules-maven/Actions"),
    @ActionReference(position = 250, path = "Loaders/text/x-maven-pom+xml/Actions"),
    @ActionReference(position = 1296, path = "Loaders/text/x-java/Actions"),
    @ActionReference(position = 1821, path = "Editors/text/x-java/Popup")
})
@Messages({"LBL_Custom_Run=Run Maven", "LBL_Custom_Run_File=Run Maven"})
public static ContextAwareAction customPopupActions() {
    return new ConditionallyShownAction() {
        
        protected @Override Action forProject(Project p, FileObject fo) {
            ActionProviderImpl ap = p.getLookup().lookup(ActionProviderImpl.class);
            return ap != null ? ap.new CustomPopupActions(triggeredOnFile, triggeredOnPom, fo) : null;
        }
    };
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:19,代碼來源:ActionProviderImpl.java

示例5: onPageLoad

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(
        category = "Games",
        id = "${package}.OpenPage"
    )
    @OpenHTMLRegistration(
        url="index.html",
        displayName = "Open Your Page",
        iconBase = "${package.replace('.','/')}/icon.png"
    )
    @ActionReferences({
        @ActionReference(path = "Menu/Window"),
        @ActionReference(path = "Toolbars/Games")
    })
#if ($example.equals("true"))
    public static void onPageLoad() throws Exception {
        Main.onPageLoad(new NbServices());
    }
 
開發者ID:dukescript,項目名稱:maven-archetypes,代碼行數:18,代碼來源:NbMain.java

示例6: onPageLoad

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(
    category = "Games",
    id = "${package}.OpenPage"
)
@OpenHTMLRegistration(
    url="index.html",
    displayName = "Open Your Page",
    iconBase = "${package.replace('.','/')}/icon.png"
)
@ActionReferences({
    @ActionReference(path = "Menu/Window"),
    @ActionReference(path = "Toolbars/Games")
})
public static void onPageLoad() throws Exception {
    Main.onPageLoad();
}
 
開發者ID:dukescript,項目名稱:maven-archetypes,代碼行數:17,代碼來源:NbMain.java

示例7: getInstance

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(id = "org.netbeans.modules.profiler.actions.InsertProfilingPointMenuAction", category = "Profile")
@ActionRegistration(displayName = "#LBL_InsertProfilingPointMenuAction")
@ActionReferences(value = {
    @ActionReference(path = "Menu/Profile", position = 1200)})
public static InsertProfilingPointMenuAction getInstance() {
    return Singleton.INSTANCE;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:InsertProfilingPointMenuAction.java

示例8: projectsPhysical

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(id = "org.netbeans.modules.project.ui.physical.tab.action", category = "Project")
@ActionRegistration(displayName = "#LBL_ProjectsPhysicalTabAction_Name", iconBase = "org/netbeans/modules/project/ui/resources/filesTab.png")
@ActionReferences(value = {
    @ActionReference(path = "Shortcuts", name = "D-2"),
    @ActionReference(path = "Menu/Window", position = 200)})
@Messages("LBL_ProjectsPhysicalTabAction_Name=&Files")
public static Action projectsPhysical() {
    return new ProjectTabAction(Bundle.LBL_ProjectsPhysicalTabAction_Name(), ICON2, 0);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:ProjectTabAction.java

示例9: projectsLogical

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(id = "org.netbeans.modules.project.ui.logical.tab.action", category = "Project")
@ActionRegistration(displayName = "#LBL_ProjectsLogicalTabAction_Name", iconBase = "org/netbeans/modules/project/ui/resources/projectTab.png")
@ActionReferences(value = {
    @ActionReference(path = "Shortcuts", name = "D-1"),
    @ActionReference(path = "Menu/Window", position = 100)})
@Messages("LBL_ProjectsLogicalTabAction_Name=Pro&jects")
public static Action projectsLogical() {
    return new ProjectTabAction(Bundle.LBL_ProjectsLogicalTabAction_Name(), ICON1, 1);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:ProjectTabAction.java

示例10: inProjects

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(id = "org.netbeans.modules.project.ui.SelectInProjects", category = "Window/SelectDocumentNode")
@ActionRegistration(displayName = "#LBL_SelectInProjectsAction_MainMenuName", lazy=false)
@ActionReferences({
    @ActionReference(path = "Shortcuts", name = "DS-1"),
    @ActionReference(path = "Menu/GoTo", position = 2600, separatorBefore = 2500),
    @ActionReference(path = "Editors/TabActions", position = 100)
})
@Messages("LBL_SelectInProjectsAction_MainMenuName=Select in Pro&jects")
public static SelectNodeAction inProjects() {
    return new SelectNodeAction(SELECT_IN_PROJECTS_ICON, LBL_SelectInProjectsAction_MainMenuName(), ProjectTab.ID_LOGICAL, null);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:12,代碼來源:SelectNodeAction.java

示例11: inFiles

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(id = "org.netbeans.modules.project.ui.SelectInFiles", category = "Window/SelectDocumentNode")
@ActionRegistration(displayName = "#LBL_SelectInFilesAction_MainMenuName", lazy=false)
@ActionReferences({
    @ActionReference(path = "Shortcuts", name = "DS-2"),
    @ActionReference(path = "Menu/GoTo", position = 2700)
})
@Messages("LBL_SelectInFilesAction_MainMenuName=Sele&ct in Files")
public static SelectNodeAction inFiles() {
    return new SelectNodeAction(SELECT_IN_FILES_ICON, LBL_SelectInFilesAction_MainMenuName(), ProjectTab.ID_PHYSICAL, null);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:11,代碼來源:SelectNodeAction.java

示例12: profileTest

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@Messages("LBL_ProfileTest=Prof&ile Test File")
@ActionID(category = "Profile", id = "org.netbeans.modules.profiler.actions.ProfileTest")
@ActionRegistration(displayName = "#LBL_ProfileTest", lazy=false)
@ActionReferences(value = {
    @ActionReference(path = "Loaders/text/x-java/Actions", position = 1280),
    @ActionReference(path = "Menu/Profile", position = 120)})
public static Action profileTest() {
    return FileSensitiveActions.fileSensitiveAction(
            new FileSensitivePerformer(ActionProvider.COMMAND_PROFILE_TEST_SINGLE), 
            Bundle.LBL_ProfileTest(),
            null);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:AntActions.java

示例13: getInstance

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(category="Profile", id="org.netbeans.modules.profiler.v2.ProfilerSessions.StopAction") // NOI18N
@ActionRegistration(displayName="#LBL_StopAction", lazy=false) // NOI18N
@ActionReferences({
    @ActionReference(path="Menu/Profile", position=300, separatorAfter=400), // NOI18N
    @ActionReference(path="Shortcuts", name="S-F2") // NOI18N
})
public static StopAction getInstance() { return Singleton.INSTANCE; }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:ProfilerSessions.java

示例14: getInstance

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(id = "org.netbeans.modules.profiler.actions.TakeThreadDumpAction", category = "Profile")
@ActionRegistration(displayName = "#LBL_TakeThreadDumpAction")
@ActionReferences(value = {
    //        @ActionReference(path = "Shortcuts", name = "C-F3"),
    @ActionReference(path = "Menu/Profile", position = 500)})
public static TakeThreadDumpAction getInstance() {
    return Singleton.INSTANCE;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:TakeThreadDumpAction.java

示例15: getInstance

import org.openide.awt.ActionReferences; //導入依賴的package包/類
@ActionID(id = "org.netbeans.modules.profiler.actions.TakeSnapshotAction", category = "Profile")
@ActionRegistration(displayName = "#LBL_TakeSnapshotAction")
@ActionReferences(value = {
    @ActionReference(path = "Shortcuts", name = "A-F2"),
    @ActionReference(path = "Menu/Profile", position = 900)})
public static TakeSnapshotAction getInstance() {
    return Singleton.INSTANCE;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:TakeSnapshotAction.java


注:本文中的org.openide.awt.ActionReferences類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。