本文整理匯總了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()]);
}
}
示例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]);
}
示例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;
}
示例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()]);
}
}
示例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()]);
}
示例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()]);
}
}
示例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()]);
}
示例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;
}
示例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()]);
}
示例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()]);
}
示例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()]);
}
示例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()]);
}