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


Java ProjectLevelVcsManagerEx.getInstanceEx方法代碼示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例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<>();
  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

示例9: hyperlinkUpdate

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入方法依賴的package包/類
@Override
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
  if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
    if (event.getDescription().equals("UpdatedFiles")) {
      ProjectLevelVcsManagerEx vcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
      UpdateInfoTree tree = vcsManager.showUpdateProjectInfo(myUpdatedFiles, "Update", ActionInfo.UPDATE, false);
      tree.setBefore(myBeforeUpdateLabel);
      tree.setAfter(myAfterUpdateLabel);
    }
    else {
      BrowserUtil.browse(event.getDescription());
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:GitPushResultNotification.java

示例10: notifyRootManagerIfUnderProject

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入方法依賴的package包/類
private static void notifyRootManagerIfUnderProject(final Project project, final File directory) {
  if (project.isDefault()) return;
  final ProjectLevelVcsManagerEx plVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(project);
  final SvnVcs vcs = (SvnVcs) plVcsManager.findVcsByName(SvnVcs.VCS_NAME);

  final VirtualFile[] files = vcs.getSvnFileUrlMapping().getNotFilteredRoots();
  for (VirtualFile file : files) {
    if (FileUtil.isAncestor(new File(file.getPath()), directory, false)) {
      // todo: should be done like auto detection
      plVcsManager.fireDirectoryMappingsChanged();
      return;
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:SvnCheckoutProvider.java

示例11: hyperlinkUpdate

import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入方法依賴的package包/類
@Override
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
  if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
    if (event.getDescription().equals("UpdatedFiles")) {
      ProjectLevelVcsManagerEx vcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
      UpdateInfoTree tree = vcsManager.showUpdateProjectInfo(myUpdatedFiles, "Update", ActionInfo.UPDATE, false);
      tree.setBefore(myBeforeUpdateLabel);
      tree.setAfter(LocalHistory.getInstance().putSystemLabel(myProject, "After push"));
    }
    else {
      BrowserUtil.launchBrowser(event.getDescription());
    }
  }
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:15,代碼來源:GitPushResult.java


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