public void performAction() { LifecycleManager.getDefault().saveAll(); }
@Override protected void performAction(Node[] activatedNodes) { // Save everything first LifecycleManager.getDefault().saveAll(); for (int i = 0; i < activatedNodes.length; i++) { performAction(activatedNodes[i]); } }
@Override protected void performAction(Node[] activatedNodes) { // Save everything first LifecycleManager.getDefault().saveAll(); for (int i = 0; i < activatedNodes.length; i++) { performAction(activatedNodes[i]); } }
@Override protected void performAction(Node[] activatedNodes) { // Save everything first LifecycleManager.getDefault().saveAll(); for (int i = 0; i < activatedNodes.length; i++) { performAction(activatedNodes[i]); } }
public final void actionPerformed(ActionEvent e) { LifecycleManager.getDefault().saveAll(); doActionPerformed(e); }
/** * Refreshes statuses of all files in the view. It does * that by issuing the "hg status -marduiC" command, updating the cache * and refreshing file nodes. */ private void onRefreshAction() { LifecycleManager.getDefault().saveAll(); if(context == null || context.getRootFiles().size() == 0) { return; } refreshStatuses(); }
@Override public void run() { LifecycleManager.getDefault().saveAll(); docProvider.generateDocumentation(phpProject.getPhpModule()); } });
@Override protected void perform(final HistoryEntry entry, final Set<VCSFileProxy> files) { // XXX try to save files in invocation context only // list somehow modified file in the context and save // just them. // The same (global save) logic is in CVS, no complaint LifecycleManager.getDefault().saveAll(); super.perform(entry, files); }
/** * Performs the "cvs commit" command on all diplayed roots plus "cvs add" for files that are not yet added. // NOI18N */ private void onCommitAction() { //TODO: Status Commit Action if(context == null || context.getRootFiles().size() == 0) { return; } LifecycleManager.getDefault().saveAll(); CommitAction.commit(parentTopComponent.getContentTitle(), context); }
private static void close(final Project prj) { LifecycleManager.getDefault().saveAll(); OpenProjects.getDefault().close(new Project[] {prj}); }
/** * Synchronizes memory modificatios with disk and calls * {@link #performContextAction}. */ protected void performAction(final Node[] nodes) { // TODO try to save files in invocation context only // list somehow modified file in the context and save // just them. // The same (global save) logic is in CVS, no complaint LifecycleManager.getDefault().saveAll(); Utils.logVCSActionEvent("HG"); //NOI18N performContextAction(nodes); }
@Override public void run() { ProgressHandle handle = ProgressHandleFactory.createHandle(NbBundle.getMessage(CreateTestsAction.class, "LBL_CreatingTests")); handle.start(); try { LifecycleManager.getDefault().saveAll(); generateTests(activatedNodes, phpProject, testingProvider); } finally { handle.finish(); } } });
/** * Shows Diff panel for all files in the view. The initial type of diff depends on the sync mode: Local, Remote, All. * In Local mode, the diff shows CURRENT <-> BASE differences. In Remote mode, it shows BASE<->HEAD differences. */ private void onDiffAction() { if(context == null || context.getRootFiles().size() == 0) { return; } String title = parentTopComponent.getContentTitle(); if (displayStatuses == FileInformation.STATUS_LOCAL_CHANGE) { LifecycleManager.getDefault().saveAll(); DiffAction.diff(context, Setup.DIFFTYPE_LOCAL, title); } else if (displayStatuses == FileInformation.STATUS_REMOTE_CHANGE) { DiffAction.diff(context, Setup.DIFFTYPE_REMOTE, title); } else { LifecycleManager.getDefault().saveAll(); DiffAction.diff(context, Setup.DIFFTYPE_ALL, title); } }
private boolean onSaveStep() { // Save all files and projects if (MakeOptions.getInstance().getSave()) { LifecycleManager.getDefault().saveAll(); } if (!ProjectSupport.saveAllProjects(getString("NeedToSaveAllText"))) {// NOI18N return false; } return true; }
private void refreshStatuses() { commitButton.setEnabled(false); if ((context == null || context.getRootFiles().isEmpty())) { return; } if(executeStatusSupport!=null) { executeStatusSupport.cancel(); executeStatusSupport = null; } LifecycleManager.getDefault().saveAll(); RequestProcessor rp = Mercurial.getInstance().getRequestProcessor(); executeStatusSupport = new HgProgressSupport() { @Override public void perform() { if (context != null && revisionLeft == HgRevision.BASE && isLocal()) { StatusAction.executeStatus(context, this); } refreshSetups(); } }; File repositoryRoot = HgUtils.getRootFile(context); if (repositoryRoot == null) { LOG.log(Level.INFO, "getSelectedRevision: No repository for {0}", context.getRootFiles()); //NOI18N return; } executeStatusSupport.start(rp, repositoryRoot, NbBundle.getMessage(MultiDiffPanel.class, "MSG_Refresh_Progress")); }
private List<Future<Integer>> run(final RakeTask... tasks) { assert tasks.length > 0 : "must pass at least one task"; if (!RubyPlatform.hasValidRake(project, showWarnings)) { return null; } // Save all files first LifecycleManager.getDefault().saveAll(); // EMPTY CONTEXT?? if (fileLocator == null) { fileLocator = new RubyFileLocator(Lookup.EMPTY, project); } if (rakeFile == null) { rakeFile = RakeSupport.findRakeFile(project); } if (rakeFile == null) { pwd = FileUtil.toFile(project.getProjectDirectory()); } if (pwd == null) { pwd = FileUtil.toFile(rakeFile.getParent()); } List<RakeTask> tasksToRun = Arrays.asList(tasks); computeAndSetDisplayName(tasksToRun); final List<ExecutionService> services = getExecutionServices(tasksToRun); List<Future<Integer>> futures = new ArrayList<Future<Integer>>(services.size()); for (ExecutionService each : services) { futures.add(each.run()); } return futures; }
@Override public void actionPerformed(final PhpModule phpModule) { if (phpModule instanceof PhpModuleImpl) { PhpProject project = ((PhpModuleImpl) phpModule).getPhpProject(); // XXX more precise would be to collect all Run Command actions and if > 1 then show a dialog which framework should be run for (PhpFrameworkProvider frameworkProvider : project.getFrameworks()) { PhpModuleActionsExtender actionsExtender = frameworkProvider.getActionsExtender(phpModule); if (actionsExtender != null) { RunCommandAction runCommandAction = actionsExtender.getRunCommandAction(); if (runCommandAction != null) { // #202549 LifecycleManager.getDefault().saveAll(); runCommandAction.actionPerformed(phpModule); return; } } } } }
sc.save(); } else { LifecycleManager.getDefault().saveAll();
public void run() { if (!RubyPlatform.hasValidRake(project, true)) { return; } // Save all files first LifecycleManager.getDefault().saveAll(); // EMPTY CONTEXT?? RailsFileLocator fileLocator = new RailsFileLocator(Lookup.EMPTY, project); String displayName = NbBundle.getMessage(MigrateAction.class, "Migration"); File pwd = FileUtil.toFile(project.getProjectDirectory()); if (version == 0 && !confirmReset()) { return; } RakeRunner runner = new RakeRunner(project); runner.setPWD(pwd); runner.setDisplayName(displayName); runner.setFileLocator(fileLocator); runner.showWarnings(true); if (version != -1) { runner.setParameters("VERSION=" + Long.toString(version)); // NOI18N } runner.run("db:migrate"); }
@Override public void invokeAction(final String commandId, final Lookup lookup) { final Command command = getCommand(commandId); if (!command.getProject().getCopySupport().waitFinished()) { return; } if (command.saveRequired()) { LifecycleManager.getDefault().saveAll(); } if (!command.asyncCallRequired()) { command.invokeAction(lookup); } else { submitTask(new Runnable() { @Override public void run() { command.invokeAction(lookup); } }); } }