@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()]); }
@Override public Action[] getActions(boolean context) { return super.getActions(context); } }
@Override public Action[] getActions(boolean context) { return super.getActions(context); }
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); } }
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); } }
@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; }
@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; }
@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; }
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; } }
@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]); }
@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 ); } }
/******************************************************************************************************************* * * {@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(); }
if ( actions == null ) { Action superActions[] = super.getActions( context ); List<Action> actionList = new ArrayList<Action>(superActions.length); return super.getActions( context );
@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()]); }
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; }
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); } }
Action[] oldActions = super.getActions(false); List<Action> newActions = new ArrayList<>(); if (getItem().getFolder() == null) {