示例#1
0
  private void onRefreshButton() {
    if (context == null || context.getRootFiles().size() == 0) {
      return;
    }

    if (executeStatusSupport != null) {
      executeStatusSupport.cancel();
      executeStatusSupport = null;
    }

    LifecycleManager.getDefault().saveAll();
    RequestProcessor rp = Git.getInstance().getRequestProcessor();
    executeStatusSupport =
        new GitProgressSupport() {

          public void perform() {
            StatusAction.executeStatus(context, this);
            SwingUtilities.invokeLater(
                new Runnable() {

                  public void run() {
                    refreshSetups();
                  }
                });
          }
        };
    String repository = GitUtils.getRootPath(context);
    executeStatusSupport.start(
        rp, repository, NbBundle.getMessage(MultiDiffPanel.class, "MSG_Refresh_Progress"));
  }
    @Override
    protected void perform(final HistoryEntry entry, final Set<File> 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);
    }
示例#3
0
 /** Saves all unsaved files. */
 public void saveAllFiles() {
   LifecycleManager.getDefault().saveAll();
 }
示例#4
0
 private void onCommitButton() {
   LifecycleManager.getDefault().saveAll();
   CommitAction.commit(contextName, context);
 }