本文整理了Java中org.openide.nodes.FilterNode.getActions()
方法的一些代码示例,展示了FilterNode.getActions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FilterNode.getActions()
方法的具体详情如下:
包路径:org.openide.nodes.FilterNode
类名称:FilterNode
方法名:getActions
暂无
代码示例来源:origin: eu.agrosense.client/grid-api
@Override
public Action[] getActions(boolean context) {
return super.getActions(context);
// List<Action> actions = new ArrayList(Arrays.asList(super.getActions(context)));
// actions.add(new NewActivityFieldAction(field));
// return actions.toArray(new Action[actions.size()]);
}
代码示例来源:origin: nl.cloudfarming.client/stock-project
@Override
public Action[] getActions(boolean context) {
return super.getActions(context);
}
}
代码示例来源:origin: nl.cloudfarming.client/isobus-tree
@Override
public Action[] getActions(boolean context) {
return super.getActions(context);
}
代码示例来源:origin: dcaoyuan/nbscala
public Action[] getActions(boolean context) {
if (!context) {
if (actions == null) {
Action superActions[] = super.getActions(context);
actions = new Action[superActions.length + 2];
System.arraycopy(superActions, 0, actions, 0, superActions.length);
actions[superActions.length] = null;
actions[superActions.length + 1] = new PreselectPropertiesAction(project, nodeName);
}
return actions;
} else {
return super.getActions(context);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
public @Override Action[] getActions(boolean context) {
if (!context) {
if (actions == null) {
Action superActions[] = super.getActions(context);
actions = new Action[superActions.length + 2];
System.arraycopy(superActions, 0, actions, 0, superActions.length);
actions[superActions.length] = null;
actions[superActions.length + 1] = new PreselectPropertiesAction(project, nodeName);
}
return actions;
} else {
return super.getActions(context);
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-io-javame
@Override
public Action[] getActions (boolean context) {
Action[] actions = super.getActions (context);
if (actions == null || actions.length <= 0)
return actions;
Action[] newActions = new Action[actions.length + 1];
newActions[0] = actions[0];
newActions[1] = SystemAction.get (EditAction.class);
System.arraycopy (actions, 1, newActions, 2, actions.length - 1);
return newActions;
}
代码示例来源:origin: nl.cloudfarming.client/isobus-project
@Override
public Action[] getActions(boolean context) {
Action[] superActions = super.getActions(context);
Action[] actions = { new ExportAction() };
Action[] merged = Arrays.copyOf(superActions, superActions.length + actions.length);
System.arraycopy(actions, 0, merged, superActions.length, actions.length);
return merged;
}
代码示例来源:origin: nl.cloudfarming.client/isobus-type
@Override
public Action[] getActions(boolean context) {
Action[] superActions = super.getActions(context);
Action[] actions = { new ExportAction() };
Action[] merged = Arrays.copyOf(superActions, superActions.length + actions.length);
System.arraycopy(actions, 0, merged, superActions.length, actions.length);
return merged;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-project-jsf
public Action[] getActions( boolean context ) {
if ( context ) {
return super.getActions( true );
}
else {
Action[] folderActions = super.getActions( false );
Action[] projectActions;
if ( isProjectDir ) {
// If this is project dir then the properties action
// has to be replaced to invoke project customizer
projectActions = new Action[ folderActions.length ];
for ( int i = 0; i < folderActions.length; i++ ) {
if ( folderActions[i] instanceof org.openide.actions.PropertiesAction ) {
projectActions[i] = CommonProjectActions.customizeProjectAction();
}
else {
projectActions[i] = folderActions[i];
}
}
}
else {
projectActions = folderActions;
}
return projectActions;
}
}
代码示例来源:origin: nl.cloudfarming.client/task-field
@Override
public Action[] getActions(boolean context) {
List<Action> actions = (List<Action>) Utilities.actionsForPath(EXPORTABLE_TASK_ACTION_PATH);
actions.addAll(Arrays.asList(super.getActions(context)));
return actions.toArray(new Action[0]);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui
@Override
public Action[] getActions( boolean context ) {
if ( !context ) {
if ( actions == null ) {
// Copy actions and leave out the PropertiesAction and FileSystemAction.
Action superActions[] = super.getActions( context );
List<Action> actionList = new ArrayList<Action>(superActions.length);
for( int i = 0; i < superActions.length; i++ ) {
if ( superActions[i] instanceof FileSystemAction ) {
actionList.add (null); // insert separator and new action
actionList.add (testPackageAction);
actionList.addAll((List<Action>) org.openide.util.Utilities.actionsForPath("Projects/package/Actions"));
}
actionList.add( superActions[i] );
}
actions = new Action[ actionList.size() ];
actionList.toArray( actions );
}
return actions;
}
else {
return super.getActions( context );
}
}
代码示例来源:origin: it.tidalwave.netbeans/it-tidalwave-netbeans-nodes
/*******************************************************************************************************************
*
* {@inheritDoc}
*
******************************************************************************************************************/
@Override @CheckForNull
public Action[] getActions (final boolean context)
{
final Node delegate = getOriginal();
//
// If the delegate is not a NodePresentationModel, it is not using an ActionProvider, thus it is directly
// providing its own actions. It could even have an ActionProvider in its Lookup as it could be a FilterNode; for
// this reason there's this explicit check.
//
if (!(delegate instanceof NodePresentationModel) && !(delegate instanceof GenericFilterNode))
{
return super.getActions();
}
final ActionProvider actionProvider = getLookup().lookup(ActionProvider);
return (actionProvider != null) ? actionProvider.getActions().toArray(new Action[0]) : super.getActions();
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui
if ( actions == null ) {
Action superActions[] = super.getActions( context );
List<Action> actionList = new ArrayList<Action>(superActions.length);
return super.getActions( context );
代码示例来源:origin: org.codehaus.mevenide/nb-project
@Override
public Action[] getActions(boolean context) {
DataObject dobj = getOriginal().getLookup().lookup(DataObject.class);
List<Action> result = new ArrayList<Action>();
Action[] superActions = super.getActions(false);
boolean hasOpen = false;
for (int i = 0; i < superActions.length; i++) {
if (superActions[i] instanceof OpenAction || superActions[i] instanceof EditAction) {
result.add(superActions[i]);
hasOpen = true;
}
if (dobj != null && dobj.getPrimaryFile().isFolder() && superActions[i] instanceof FindAction) {
result.add(superActions[i]);
}
}
result.add(new OpenSrcAction(true));
if (!hasOpen) { //necessary? maybe just keep around for all..
result.add(new OpenSrcAction(false));
}
return result.toArray(new Action[result.size()]);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
private Action[] initActions (boolean context) {
if (actionCache == null) {
Action[] existing = super.getActions(context);
Action[] additional;
if (generator == Generator.NONE) {
additional = new Action[] { CommonProjectActions.newFileAction(), null }; // null: separator
} else {
additional = new Action[] { SystemAction.get(GenerateAction.class), null,
CommonProjectActions.newFileAction(), null }; // null: separator
}
if (existing != null && existing.length > 0) {
actionCache = new Action[existing.length+additional.length];
System.arraycopy(additional, 0, actionCache, 0, additional.length);
System.arraycopy(existing, 0, actionCache, additional.length, existing.length);
} else {
actionCache = additional;
}
}
return actionCache;
}
代码示例来源:origin: org.codehaus.mevenide/nb-project
public javax.swing.Action[] getActions(boolean param) {
if (isTopLevelNode) {
ActionProviderImpl impl = project.getLookup().lookup(ActionProviderImpl.class);
Action[] toReturn = new Action[4];
toReturn[0] = CommonProjectActions.newFileAction();
toReturn[1] = null;
NetbeansActionMapping mapp = new NetbeansActionMapping();
mapp.addGoal("site"); //NOI18N
toReturn[2] = impl.createCustomMavenAction(org.openide.util.NbBundle.getMessage(SiteDocsNode.class, "BTN_Generate_Site"), mapp);
mapp = new NetbeansActionMapping();
mapp.addGoal("site:deploy"); //NOI18N
toReturn[3] = impl.createCustomMavenAction(org.openide.util.NbBundle.getMessage(SiteDocsNode.class, "BTN_Deploy_Site"), mapp, false);
return toReturn;
} else {
return super.getActions(param);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject
Action[] oldActions = super.getActions(false);
List<Action> newActions = new ArrayList<>();
if (getItem().getFolder() == null) {
内容来源于网络,如有侵权,请联系作者删除!