當前位置: 首頁>>代碼示例>>Java>>正文


Java ProjectLevelVcsManagerEx類代碼示例

本文整理匯總了Java中com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx的典型用法代碼示例。如果您正苦於以下問題:Java ProjectLevelVcsManagerEx類的具體用法?Java ProjectLevelVcsManagerEx怎麽用?Java ProjectLevelVcsManagerEx使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ProjectLevelVcsManagerEx類屬於com.intellij.openapi.vcs.ex包,在下文中一共展示了ProjectLevelVcsManagerEx類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: projectOpened

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
@Override
public void projectOpened() {
  StartupManager.getInstance(myProject).registerPostStartupActivity(new DumbAwareRunnable() {
    @Override
    public void run() {
      if (myUpdateInfo != null && !myUpdateInfo.isEmpty() && ProjectReloadState.getInstance(myProject).isAfterAutomaticReload()) {
        ActionInfo actionInfo = myUpdateInfo.getActionInfo();
        if (actionInfo != null) {
          ProjectLevelVcsManagerEx.getInstanceEx(myProject).showUpdateProjectInfo(myUpdateInfo.getFileInformation(),
                                                                                  VcsBundle.message("action.display.name.update"), actionInfo,
                                                                                  false);
          CommittedChangesCache.getInstance(myProject).refreshIncomingChangesAsync();
        }
      }
      myUpdateInfo = null;
    }
  });
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:RestoreUpdateTree.java

示例2: Updater

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public Updater(final Project project, final FilePath[] roots, final Map<AbstractVcs, Collection<FilePath>> vcsToVirtualFiles) {
  super(project, getTemplatePresentation().getText(), true, VcsConfiguration.getInstance(project).getUpdateOption());
  myProject = project;
  myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(project);
  myDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
  myChangeListManager = (ChangeListManagerEx)ChangeListManager.getInstance(myProject);
  myRoots = roots;
  myVcsToVirtualFiles = vcsToVirtualFiles;

  myUpdatedFiles = UpdatedFiles.create();
  myGroupedExceptions = new HashMap<HotfixData, List<VcsException>>();
  myUpdateSessions = new ArrayList<UpdateSession>();

  // create from outside without any context; context is created by vcses
  myContextInfo = new HashMap<AbstractVcs, SequentialUpdatesContext>();
  myUpdateNumber = 1;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:AbstractCommonUpdateAction.java

示例3: updateAvailableOptions

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public void updateAvailableOptions(final Collection<AbstractVcs> activeVcses) {
  for (VcsShowOptionsSettingImpl setting : myPromptOptions.keySet()) {
    final JCheckBox checkBox = myPromptOptions.get(setting);
    checkBox.setEnabled(setting.isApplicableTo(activeVcses) || myProject.isDefault());
    if (!myProject.isDefault()) {
      checkBox.setToolTipText(VcsBundle.message("tooltip.text.action.applicable.to.vcses", composeText(setting.getApplicableVcses())));
    }
  }

  if (!myProject.isDefault()) {
    final ProjectLevelVcsManagerEx vcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
    final VcsShowConfirmationOptionImpl addConfirmation = vcsManager.getConfirmation(VcsConfiguration.StandardConfirmation.ADD);
    UIUtil.setEnabled(myAddConfirmationPanel, addConfirmation.isApplicableTo(activeVcses), true);
    myAddConfirmationPanel.setToolTipText(
      VcsBundle.message("tooltip.text.action.applicable.to.vcses", composeText(addConfirmation.getApplicableVcses())));

    final VcsShowConfirmationOptionImpl removeConfirmation = vcsManager.getConfirmation(VcsConfiguration.StandardConfirmation.REMOVE);
    UIUtil.setEnabled(myRemoveConfirmationPanel, removeConfirmation.isApplicableTo(activeVcses), true);
    myRemoveConfirmationPanel.setToolTipText(
      VcsBundle.message("tooltip.text.action.applicable.to.vcses", composeText(removeConfirmation.getApplicableVcses())));
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:23,代碼來源:VcsGeneralConfigurationPanel.java

示例4: showSkipped

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
/**
 * Show skipped commits
 *
 * @param project        the context project
 * @param skippedCommits the skipped commits
 */
public static void showSkipped(final Project project, final SortedMap<VirtualFile, List<GitRebaseUtils.CommitInfo>> skippedCommits) {
  UIUtil.invokeLaterIfNeeded(new Runnable() {
    @Override
    public void run() {
      ContentManager contentManager = ProjectLevelVcsManagerEx.getInstanceEx(project).getContentManager();
      if (contentManager == null) {
        return;
      }
      GitSkippedCommits skipped = new GitSkippedCommits(contentManager, project, skippedCommits);
      Content content = ContentFactory.SERVICE.getInstance().createContent(skipped, "Skipped Commits", true);
      ContentsUtil.addContent(contentManager, content, true);
      ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.VCS).activate(null);
    }
  });
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:22,代碼來源:GitSkippedCommits.java

示例5: SvnIntegrateChangesTask

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public SvnIntegrateChangesTask(final SvnVcs vcs, @NotNull WorkingCopyInfo info, final MergerFactory mergerFactory,
                               final SVNURL currentBranchUrl, final String title, final boolean dryRun, String branchName) {
  super(vcs.getProject(), title, true, VcsConfiguration.getInstance(vcs.getProject()).getUpdateOption());
  myDryRun = dryRun;
  myTitle = title;

  myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
  myVcs = vcs;

  myInfo = info;

  myAccumulatedFiles = new UpdatedFilesReverseSide(UpdatedFiles.create());
  myExceptions = new ArrayList<VcsException>();
  myHandler = new IntegrateEventHandler(myVcs, ProgressManager.getInstance().getProgressIndicator());
  myMerger = mergerFactory.createMerger(myVcs, new File(myInfo.getLocalPath()), myHandler, currentBranchUrl, branchName);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:SvnIntegrateChangesTask.java

示例6: imitUpdate

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
protected static void imitUpdate(final Project project) {
  ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(false);
  final CommonUpdateProjectAction action = new CommonUpdateProjectAction();
  action.getTemplatePresentation().setText("1");
  action.actionPerformed(new AnActionEvent(null,
                                           new DataContext() {
                                             @Nullable
                                             @Override
                                             public Object getData(@NonNls String dataId) {
                                               if (CommonDataKeys.PROJECT.is(dataId)) {
                                                 return project;
                                               }
                                               return null;
                                             }
                                           }, "test", new Presentation(), ActionManager.getInstance(), 0));

  final ChangeListManager clManager = ChangeListManager.getInstance(project);
  clManager.ensureUpToDate(false);
  clManager.ensureUpToDate(false);  // wait for after-events like annotations recalculation
  sleep(100); // zipper updater
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:22,代碼來源:SvnTestCase.java

示例7: projectOpened

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public void projectOpened() {
  StartupManager.getInstance(myProject).registerPostStartupActivity(new DumbAwareRunnable() {
    public void run() {
      if (myUpdateInfo != null && !myUpdateInfo.isEmpty() && ProjectReloadState.getInstance(myProject).isAfterAutomaticReload()) {
        ActionInfo actionInfo = myUpdateInfo.getActionInfo();
        if (actionInfo != null) {
          ProjectLevelVcsManagerEx.getInstanceEx(myProject).showUpdateProjectInfo(myUpdateInfo.getFileInformation(),
                                                                                  VcsBundle.message("action.display.name.update"), actionInfo,
                                                                                  false);
          CommittedChangesCache.getInstance(myProject).refreshIncomingChangesAsync();
        }
        myUpdateInfo = null;
      }
      else {
        myUpdateInfo = null;
      }
    }
  });
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:20,代碼來源:RestoreUpdateTree.java

示例8: Updater

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public Updater(final Project project, final FilePath[] roots, final Map<AbstractVcs, Collection<FilePath>> vcsToVirtualFiles) {
  super(project, getTemplatePresentation().getText(), true, VcsConfiguration.getInstance(project).getUpdateOption());
  myProject = project;
  myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(project);
  myDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
  myRoots = roots;
  myVcsToVirtualFiles = vcsToVirtualFiles;

  myUpdatedFiles = UpdatedFiles.create();
  myGroupedExceptions = new HashMap<HotfixData, List<VcsException>>();
  myUpdateSessions = new ArrayList<UpdateSession>();

  // create from outside without any context; context is created by vcses
  myContextInfo = new HashMap<AbstractVcs, SequentialUpdatesContext>();
  myUpdateNumber = 1;
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:17,代碼來源:AbstractCommonUpdateAction.java

示例9: createOptionsDialog

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public UpdateOrStatusOptionsDialog createOptionsDialog(final Project project,
                                                       LinkedHashMap<Configurable, AbstractVcs> envToConfMap,
                                                       final String scopeName) {
  return new UpdateOrStatusOptionsDialog(project, envToConfMap) {
    protected String getRealTitle() {
      return VcsBundle.message("action.display.name.update.scope", scopeName);
    }

    @Override
    protected String getActionNameForDimensions() {
      return "update";
    }

    protected boolean isToBeShown() {
      return ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).getValue();
    }

    protected void setToBeShown(boolean value, boolean onOk) {
      if (onOk) {
        ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(value);
      }
    }
  };
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:25,代碼來源:ActionInfo.java

示例10: readExternal

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
@Override
public void readExternal(Element element) throws InvalidDataException {
  DefaultJDOMExternalizer.readExternal(this, element);
  final ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManagerEx.getInstanceEx(myModule.getProject());
  if (!USE_PROJECT_VCS) {
    final VirtualFile[] roots = ModuleRootManager.getInstance(myModule).getContentRoots();

    StartupManager.getInstance(myModule.getProject()).runWhenProjectIsInitialized(new Runnable() {
      @Override
      public void run() {
        for(VirtualFile file: roots) {
          vcsManager.setDirectoryMapping(file.getPath(), ACTIVE_VCS_NAME);
        }
        vcsManager.cleanupMappings();
      }
    });
  }
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:19,代碼來源:VcsManagerPerModuleConfiguration.java

示例11: imitInternalUpdate

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
private void imitInternalUpdate() {
  final ProjectLevelVcsManagerEx ex = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
  ex.setDirectoryMappings(Collections.singletonList(
    new VcsDirectoryMapping(FileUtil.toSystemIndependentName(myWorkingCopyDir.getPath()), GitVcs.NAME)));
  ex.getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(false);
  final CommonUpdateProjectAction action = new CommonUpdateProjectAction();
  action.getTemplatePresentation().setText("1");
  action.actionPerformed(new AnActionEvent(null,
                                           new DataContext() {
                                             @Nullable
                                             @Override
                                             public Object getData(@NonNls String dataId) {
                                               if (PlatformDataKeys.PROJECT.is(dataId)) {
                                                 return myProject;
                                               }
                                               return null;
                                             }
                                           }, "test", new Presentation(), null, 0));

  myChangeListManager.ensureUpToDate(false);
  myChangeListManager.ensureUpToDate(false);  // wait for after-events like annotations recalculation
  sleep(100); // zipper updater
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:24,代碼來源:GitAnnotationsClosedTest.java

示例12: SvnIntegrateChangesTask

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public SvnIntegrateChangesTask(final SvnVcs vcs, final WorkingCopyInfo info, final MergerFactory mergerFactory,
                               final SVNURL currentBranchUrl, final String title, final boolean dryRun, String branchName) {
  super(vcs.getProject(), title, true, VcsConfiguration.getInstance(vcs.getProject()).getUpdateOption());
  myMergerFactory = mergerFactory;
  myCurrentBranchUrl = currentBranchUrl;
  myDryRun = dryRun;
  myTitle = title;
  myBranchName = branchName;

  myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
  myVcs = vcs;

  myInfo = info;

  myAccomulatedFiles = new UpdatedFilesReverseSide(UpdatedFiles.create());
  myExceptions = new ArrayList<VcsException>();
  myHandler = new IntegrateEventHandler(myVcs, ProgressManager.getInstance().getProgressIndicator());
  myMerger = myMergerFactory.createMerger(myVcs, new File(myInfo.getLocalPath()), myHandler, myCurrentBranchUrl, myBranchName);
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:20,代碼來源:SvnIntegrateChangesTask.java

示例13: imitUpdate

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
protected static void imitUpdate(final Project project) {
  ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(false);
  final CommonUpdateProjectAction action = new CommonUpdateProjectAction();
  action.getTemplatePresentation().setText("1");
  action.actionPerformed(new AnActionEvent(null,
                                           new DataContext() {
                                             @Nullable
                                             @Override
                                             public Object getData(@NonNls String dataId) {
                                               if (PlatformDataKeys.PROJECT.is(dataId)) {
                                                 return project;
                                               }
                                               return null;
                                             }
                                           }, "test", new Presentation(), null, 0));

  final ChangeListManager clManager = ChangeListManager.getInstance(project);
  clManager.ensureUpToDate(false);
  clManager.ensureUpToDate(false);  // wait for after-events like annotations recalculation
  sleep(100); // zipper updater
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:22,代碼來源:SvnTestCase.java

示例14: projectOpened

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
@Override
public void projectOpened() {
  StartupManager.getInstance(myProject).registerPostStartupActivity(new DumbAwareRunnable() {
    @Override
    public void run() {
      if (myUpdateInfo != null && !myUpdateInfo.isEmpty() && ProjectReloadState.getInstance(myProject).isAfterAutomaticReload()) {
        ActionInfo actionInfo = myUpdateInfo.getActionInfo();
        if (actionInfo != null) {
          ProjectLevelVcsManagerEx.getInstanceEx(myProject).showUpdateProjectInfo(myUpdateInfo.getFileInformation(),
                                                                                  VcsBundle.message("action.display.name.update"), actionInfo,
                                                                                  false);
          CommittedChangesCache.getInstance(myProject).refreshIncomingChangesAsync();
        }
        myUpdateInfo = null;
      }
      else {
        myUpdateInfo = null;
      }
    }
  });
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:22,代碼來源:RestoreUpdateTree.java

示例15: Updater

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public Updater(final Project project, final FilePath[] roots, final Map<AbstractVcs, Collection<FilePath>> vcsToVirtualFiles) {
  super(project, getTemplatePresentation().getText(), true, VcsConfiguration.getInstance(project).getUpdateOption());
  myProject = project;
  myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(project);
  myDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
  myRoots = roots;
  myVcsToVirtualFiles = vcsToVirtualFiles;

  myUpdatedFiles = UpdatedFiles.create();
  myGroupedExceptions = new HashMap<>();
  myUpdateSessions = new ArrayList<>();

  // create from outside without any context; context is created by vcses
  myContextInfo = new HashMap<>();
  myUpdateNumber = 1;
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:17,代碼來源:AbstractCommonUpdateAction.java


注:本文中的com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。