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


Java Utilities.actionsForPath方法代碼示例

本文整理匯總了Java中org.openide.util.Utilities.actionsForPath方法的典型用法代碼示例。如果您正苦於以下問題:Java Utilities.actionsForPath方法的具體用法?Java Utilities.actionsForPath怎麽用?Java Utilities.actionsForPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.openide.util.Utilities的用法示例。


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

示例1: getActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public Action[] getActions(boolean context) {
    if (context) {
        return globalActions;
    } else {
        final List<? extends Action> additionalActions = Utilities.actionsForPath(ACTION_FOLDER);
        final int additionalActionSize = additionalActions.isEmpty() ? 0 : additionalActions.size() + 1;
        final List<Action> actions  = new ArrayList<Action>(4 + globalActions.length + additionalActionSize);
        actions.add(getOpenAction());
        actions.add(FileUtil.getConfigObject(INSPECT_HIERARCHY_ACTION, Action.class));
        actions.add(RefactoringActionsFactory.whereUsedAction());
        actions.add(null);
        if (additionalActionSize > 0) {
            actions.addAll(additionalActions);
            actions.add(null);
        }
        actions.addAll(Arrays.asList(globalActions));
        return actions.toArray(new Action[actions.size()]);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:21,代碼來源:Nodes.java

示例2: listAvailableProviders

import org.openide.util.Utilities; //導入方法依賴的package包/類
static JRadioButton[] listAvailableProviders(String path) {
    List<JRadioButton> res = new ArrayList<JRadioButton>();

    for (Action a : Utilities.actionsForPath(path+"/Actions")) { // NOI18N
        if (a == null) {
            continue;
        }
        Object msg = a.getValue("wizardMessage"); // NOI18N
        if (msg instanceof String) {
            JRadioButton button = new JRadioButton((String)msg);
            button.putClientProperty("action", a); // NOI18N
            res.add(button);
        }
    }

    return res.toArray(new JRadioButton[0]);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:18,代碼來源:AddServerInstanceWizard.java

示例3: getToolbarActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
private synchronized static Action[] getToolbarActions() {
    if (actions == null) {
        List<? extends Action> termActions = Utilities.actionsForPath(TerminalAction.TERMINAL_ACTIONS_PATH);// NOI18N
        actions = termActions.toArray(new Action[termActions.size()]);
    }
    return actions;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:TerminalContainerTopComponent.java

示例4: getActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public Action[] getActions( boolean context ) {
    if (context) { // XXX why?
        return new Action[0];
    } else {
        List<? extends Action> actions = Utilities.actionsForPath(type == PHYSICAL_VIEW ? ACTIONS_FOLDER_PHYSICAL : ACTIONS_FOLDER);
        return actions.toArray(new Action[actions.size()]);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:ProjectsRootNode.java

示例5: getInitActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
Action[] getInitActions(org.netbeans.modules.versioning.core.spi.VCSContext ctx) {
    String category = (String) map.get("actionsCategory");              // NOI18N
    List<? extends Action> l = Utilities.actionsForPath("Versioning/" + category + "/Actions/Unversioned"); // NOI18N
    List<Action> ret = new ArrayList<Action>(l.size());
    for (Action action : l) {
        if(action instanceof ContextAwareAction) {
            ret.add(((ContextAwareAction)action).createContextAwareInstance(Lookups.singleton(ctx)));
        } else {
            ret.add(action);
        }
    }
    return ret.toArray(new Action[ret.size()]);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:14,代碼來源:DelegatingVCS.java

示例6: getActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public Action[] getActions( boolean context ) {
    if ( context || description.name == null ) {
        return description.ui.getActions();
    } else {
        final Action panelActions[] = description.ui.getActions();
        final List<? extends Action> standardActions;
        final List<? extends Action> additionalActions;
        if (description.kind == ElementKind.OTHER) {
            standardActions = Collections.singletonList(getOpenAction());
            additionalActions = Collections.<Action>emptyList();
        } else {
            standardActions = Arrays.asList(new Action[] {
                getOpenAction(),
                RefactoringActionsFactory.whereUsedAction(),
                RefactoringActionsFactory.popupSubmenuAction()
            });
            additionalActions = Utilities.actionsForPath(ACTION_FOLDER);
        }
        final int standardActionsSize = standardActions.isEmpty() ? 0 : standardActions.size() + 1;
        final int additionalActionSize = additionalActions.isEmpty() ? 0 : additionalActions.size() + 1;
        final List<Action> actions = new ArrayList<>(standardActionsSize + additionalActionSize + panelActions.length);
        if (standardActionsSize > 0) {
            actions.addAll(standardActions);
            actions.add(null);
        }
        if (additionalActionSize > 0) {
            actions.addAll(additionalActions);
            actions.add(null);
        }
        actions.addAll(Arrays.asList(panelActions));
        return actions.toArray(new Action[actions.size()]);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:35,代碼來源:ElementNode.java

示例7: getInitActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
Action[] getInitActions(VCSContext ctx) {
    String category = (String) map.get("actionsCategory");              // NOI18N
    List<? extends Action> l = Utilities.actionsForPath("Versioning/" + category + "/Actions/Unversioned"); // NOI18N
    List<Action> ret = new ArrayList<Action>(l.size());
    for (Action action : l) {
        if(action instanceof ContextAwareAction) {
            ret.add(((ContextAwareAction)action).createContextAwareInstance(Lookups.singleton(ctx)));
        } else {
            ret.add(action);
        }
    }
    return ret.toArray(new Action[ret.size()]);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:14,代碼來源:DelegatingVCS.java

示例8: getPopupPresenter

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public JMenuItem getPopupPresenter() {
    JMenu main = new JMenu(Bundle.CTL_PopupAction());
    List<? extends Action> actionsForPath;
    actionsForPath = Utilities.actionsForPath("Actions/MageBeans/SubActions");
    actionsForPath.forEach((action) -> {
        main.add(action);
    });
    return main;
}
 
開發者ID:AdFabConnect,項目名稱:MageBeans,代碼行數:11,代碼來源:PopupAction.java

示例9: getActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public Action[] getActions(boolean context) {
    List<? extends Action> actions = Utilities.actionsForPath("UI/AndroidDevices/AndroidDeviceClients/Actions");
    return actions.toArray(new Action[actions.size()]);
}
 
開發者ID:NBANDROIDTEAM,項目名稱:NBANDROID-V2,代碼行數:6,代碼來源:ClientNode.java

示例10: getActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public Action[] getActions(boolean context) {
    List<? extends Action> actionsForPath = Utilities.actionsForPath("Android/ADB/MobileDevice");
    return actionsForPath.toArray(new Action[actionsForPath.size()]);
}
 
開發者ID:NBANDROIDTEAM,項目名稱:NBANDROID-V2,代碼行數:6,代碼來源:MobileDeviceNode.java

示例11: getActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public Action[] getActions(boolean context) {
    List<? extends Action> actionsForPath = Utilities.actionsForPath("Android/ADB/EmulatorDevice");
    return actionsForPath.toArray(new Action[actionsForPath.size()]);
}
 
開發者ID:NBANDROIDTEAM,項目名稱:NBANDROID-V2,代碼行數:6,代碼來源:EmulatorDeviceNode.java

示例12: getActions

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public Action[] getActions(boolean context) {
    List<? extends Action> actionsForPath = Utilities.actionsForPath("Actions/NbAndroid/Dependency");
    return actionsForPath.toArray(new Action[actionsForPath.size()]);
}
 
開發者ID:NBANDROIDTEAM,項目名稱:NBANDROID-V2,代碼行數:6,代碼來源:DependencyNode.java


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