• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ProjectLevelVcsManagerImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl的典型用法代码示例。如果您正苦于以下问题:Java ProjectLevelVcsManagerImpl类的具体用法?Java ProjectLevelVcsManagerImpl怎么用?Java ProjectLevelVcsManagerImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProjectLevelVcsManagerImpl类属于com.intellij.openapi.vcs.impl包,在下文中一共展示了ProjectLevelVcsManagerImpl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: extractBranchName

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
public static String extractBranchName(Project project) {
    String branch = "";
    ProjectLevelVcsManager instance = ProjectLevelVcsManagerImpl.getInstance(project);
    if (instance.checkVcsIsActive("Git")) {
        GitLocalBranch currentBranch = GitBranchUtil.getCurrentRepository(project).getCurrentBranch();

        if (currentBranch != null) {
            // Branch name  matches Ticket Name
            branch = currentBranch.getName().trim();
        }
    } else if (instance.checkVcsIsActive("Mercurial")) {
        branch = HgUtil.getCurrentRepository(project).getCurrentBranch().trim();
    }

    return branch;
}
 
开发者ID:JanGatting,项目名称:GitCommitMessage,代码行数:17,代码来源:CommitMessage.java


示例2: isEnabled

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
protected boolean isEnabled(VcsContext context) {
  VirtualFile[] selectedFiles = context.getSelectedFiles();
  if (selectedFiles == null) return false;
  if (selectedFiles.length == 0) return false;
  VirtualFile file = selectedFiles[0];
  Project project = context.getProject();
  if (project == null) return false;
  final ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(project);
  final BackgroundableActionEnabledHandler handler =
    vcsManager.getBackgroundableActionHandler(VcsBackgroundableActions.HISTORY_FOR_SELECTION);
  if (handler.isInProgress(VcsBackgroundableActions.keyFrom(file))) return false;
  AbstractVcs vcs = vcsManager.getVcsFor(file);
  if (vcs == null) return false;
  VcsHistoryProvider vcsHistoryProvider = vcs.getVcsBlockHistoryProvider();
  if (vcsHistoryProvider == null) return false;
  if (! AbstractVcs.fileInVcsByFileStatus(project, VcsUtil.getFilePath(file))) return false;

  VcsSelection selection = VcsSelectionUtil.getSelection(context);
  if (selection == null) {
    return false;
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:SelectedBlockHistoryAction.java


示例3: isEnabled

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
public boolean isEnabled(@NotNull AnActionEvent e) {
  if (e.getProject() == null) return false;

  VcsFileRevision fileRevision = getFileRevision(e);
  if (fileRevision == null) return false;

  VirtualFile file = getFile(e);
  if (file == null) return false;

  AbstractVcs vcs = getVcs(e);
  if (vcs == null) return false;

  AnnotationProvider provider = vcs.getCachingAnnotationProvider();
  if (provider == null || !provider.isAnnotationValid(fileRevision)) return false;

  final ProjectLevelVcsManagerImpl plVcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManager.getInstance(vcs.getProject());
  if (plVcsManager.getBackgroundableActionHandler(VcsBackgroundableActions.ANNOTATE).isInProgress(key(file))) return false;

  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:AnnotateRevisionActionBase.java


示例4: isEnabled

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
private static boolean isEnabled(final VcsContext context) {
  VirtualFile[] selectedFiles = context.getSelectedFiles();
  if (selectedFiles.length != 1) {
    return false;
  }
  VirtualFile file = selectedFiles[0];
  if (file.isDirectory()) return false;
  Project project = context.getProject();
  if (project == null || project.isDisposed()) return false;

  final ProjectLevelVcsManager plVcsManager = ProjectLevelVcsManager.getInstance(project);
  final BackgroundableActionEnabledHandler handler = ((ProjectLevelVcsManagerImpl)plVcsManager)
    .getBackgroundableActionHandler(VcsBackgroundableActions.ANNOTATE);
  if (handler.isInProgress(file.getPath())) return false;

  final AbstractVcs vcs = plVcsManager.getVcsFor(file);
  if (vcs == null) return false;
  final AnnotationProvider annotationProvider = vcs.getAnnotationProvider();
  if (annotationProvider == null) return false;
  final FileStatus fileStatus = FileStatusManager.getInstance(project).getStatus(file);
  if (fileStatus == FileStatus.UNKNOWN || fileStatus == FileStatus.ADDED || fileStatus == FileStatus.IGNORED) {
    return false;
  }
  return hasTextEditor(file);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:AnnotateToggleAction.java


示例5: initRepository

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
@NotNull
@Override
protected Repository initRepository(@NotNull String name) {
  String tempDirectory = FileUtil.getTempDirectory();
  String root = tempDirectory + "/" + name;
  assertTrue(new File(root).mkdirs());
  HgPlatformTest.initRepo(root);
  touch("a.txt");
  hg("add a.txt");
  hg("commit -m another");
  hg("up -r 0");
  ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManager.getInstance(myProject);
  vcsManager.setDirectoryMapping(root, HgVcs.VCS_NAME);
  VirtualFile file = LocalFileSystem.getInstance().findFileByIoFile(new File(root));
  HgRepository repository = HgUtil.getRepositoryManager(myProject).getRepositoryForRoot(file);
  assertNotNull("Couldn't find repository for root " + root, repository);
  return repository;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:HgTaskBranchesTest.java


示例6: SvnBranchConfigurationManager

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
public SvnBranchConfigurationManager(final Project project,
                                     final ProjectLevelVcsManager vcsManager,
                                     final SvnLoadedBranchesStorage storage) {
  myProject = project;
  myVcsManager = vcsManager;
  myStorage = storage;
  myBranchesLoader = new ProgressManagerQueue(myProject, "Subversion Branches Preloader");
  // TODO: Seems that ProgressManagerQueue is not suitable here at least for some branches loading tasks. For instance,
  // TODO: for DefaultConfigLoader it would be better to run modal cancellable task - so branches structure could be detected and
  // TODO: shown in dialog. Currently when "Configure Branches" is invoked for the first time - no branches are shown.
  // TODO: If "Cancel" is pressed and "Configure Branches" invoked once again - already detected (in background) branches are shown.
  ((ProjectLevelVcsManagerImpl) vcsManager).addInitializationRequest(VcsInitObject.BRANCHES, new Runnable() {
    @Override
    public void run() {
      ApplicationManager.getApplication().runReadAction(new Runnable() {
        @Override
        public void run() {
          if (myProject.isDisposed()) return;
          myBranchesLoader.start();
        }
      });
    }
  });
  myBunch = new NewRootBunch(project, myBranchesLoader);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:SvnBranchConfigurationManager.java


示例7: preloadBranches

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
private void preloadBranches(@NotNull final Collection<Pair<VirtualFile, SvnBranchConfigurationNew>> branchPoints) {
  ((ProjectLevelVcsManagerImpl) myVcsManager).addInitializationRequest(VcsInitObject.BRANCHES, new Runnable() {
    public void run() {
      ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
        public void run() {
          try {
            for (Pair<VirtualFile, SvnBranchConfigurationNew> pair : branchPoints) {
              myBunch.reloadBranches(pair.getFirst(), null, pair.getSecond());
            }
          }
          catch (ProcessCanceledException e) {
            //
          }
        }
      });
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:SvnBranchConfigurationManager.java


示例8: isEnabled

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
protected boolean isEnabled(VcsContext context) {
  VirtualFile[] selectedFiles = context.getSelectedFiles();
  if (selectedFiles == null) return false;
  if (selectedFiles.length == 0) return false;
  VirtualFile file = selectedFiles[0];
  Project project = context.getProject();
  if (project == null) return false;
  final ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(project);
  final BackgroundableActionEnabledHandler handler =
    vcsManager.getBackgroundableActionHandler(VcsBackgroundableActions.HISTORY_FOR_SELECTION);
  if (handler.isInProgress(VcsBackgroundableActions.keyFrom(file))) return false;
  AbstractVcs vcs = vcsManager.getVcsFor(file);
  if (vcs == null) return false;
  VcsHistoryProvider vcsHistoryProvider = vcs.getVcsBlockHistoryProvider();
  if (vcsHistoryProvider == null) return false;
  if (! AbstractVcs.fileInVcsByFileStatus(project, new FilePathImpl(file))) return false;

  VcsSelection selection = VcsSelectionUtil.getSelection(context);
  if (selection == null) {
    return false;
  }
  return true;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:SelectedBlockHistoryAction.java


示例9: isEnabled

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
private static boolean isEnabled(final VcsContext context) {
  VirtualFile[] selectedFiles = context.getSelectedFiles();
  if (selectedFiles == null) return false;
  if (selectedFiles.length != 1) return false;
  VirtualFile file = selectedFiles[0];
  if (file.isDirectory()) return false;
  Project project = context.getProject();
  if (project == null || project.isDisposed()) return false;

  final ProjectLevelVcsManager plVcsManager = ProjectLevelVcsManager.getInstance(project);
  final BackgroundableActionEnabledHandler handler = ((ProjectLevelVcsManagerImpl)plVcsManager)
    .getBackgroundableActionHandler(VcsBackgroundableActions.ANNOTATE);
  if (handler.isInProgress(file.getPath())) return false;

  final AbstractVcs vcs = plVcsManager.getVcsFor(file);
  if (vcs == null) return false;
  final AnnotationProvider annotationProvider = vcs.getAnnotationProvider();
  if (annotationProvider == null) return false;
  final FileStatus fileStatus = FileStatusManager.getInstance(project).getStatus(file);
  if (fileStatus == FileStatus.UNKNOWN || fileStatus == FileStatus.ADDED || fileStatus == FileStatus.IGNORED) {
    return false;
  }
  return hasTextEditor(file);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:AnnotateToggleAction.java


示例10: update

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
public void update(AnActionEvent e) {
  VirtualFile revVFile = e.getData( VcsDataKeys.VCS_VIRTUAL_FILE );
  VcsFileRevision revision = e.getData( VcsDataKeys.VCS_FILE_REVISION );
  final Boolean nonLocal = e.getData(VcsDataKeys.VCS_NON_LOCAL_HISTORY_SESSION);

  FileType fileType = revVFile == null ? null : revVFile.getFileType();
  boolean enabled = revision != null && revVFile != null && !fileType.isBinary() && ! Boolean.TRUE.equals(nonLocal);

  if (enabled) {
    final ProjectLevelVcsManager plVcsManager = ProjectLevelVcsManager.getInstance(myVcs.getProject());
    enabled = (! (((ProjectLevelVcsManagerImpl) plVcsManager).getBackgroundableActionHandler(
      VcsBackgroundableActions.ANNOTATE).isInProgress(key(revVFile))));
  }

  e.getPresentation()
    .setEnabled(enabled &&
                myHistorySession.isContentAvailable(revision) &&
                myAnnotationProvider != null && myAnnotationProvider.isAnnotationValid(revision));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:FileHistoryPanelImpl.java


示例11: setUp

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
@Override
  public void setUp() throws Exception {
    super.setUp();

    myBranchVcsRoot = new File(myTempDirFixture.getTempDirPath(), "branch");
    myBranchVcsRoot.mkdir();

    myProjectLevelVcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(myProject);
    myProjectLevelVcsManager.setDirectoryMapping(myBranchVcsRoot.getAbsolutePath(), SvnVcs.VCS_NAME);

    myWCInfo = new WCInfo(myBranchVcsRoot.getAbsolutePath(), SVNURL.parseURIEncoded(myRepoUrl + "/branch"), WorkingCopyFormat.ONE_DOT_SIX,
                                     myRepoUrl, true, null, SVNDepth.INFINITY);
    myOneShotMergeInfoHelper = new OneShotMergeInfoHelper(myProject, myWCInfo, myRepoUrl + "/trunk");

    SvnConfiguration.getInstance(myProject).CHECK_NESTED_FOR_QUICK_MERGE = true;
//    AbstractVcs vcsFound = myProjectLevelVcsManager.findVcsByName(SvnVcs.VCS_NAME);
//    Assert.assertEquals(1, myProjectLevelVcsManager.getRootsUnderVcs(vcsFound).length);
  }
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:SvnMergeInfoTest.java


示例12: isEnabled

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
protected boolean isEnabled(VcsContext context) {
  Project project = context.getProject();
  if (project == null) return false;

  VcsSelection selection = VcsSelectionUtil.getSelection(context);
  if (selection == null) return false;

  VirtualFile file = FileDocumentManager.getInstance().getFile(selection.getDocument());
  if (file == null) return false;

  final ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManager.getInstance(project);
  final BackgroundableActionEnabledHandler handler = vcsManager.getBackgroundableActionHandler(VcsBackgroundableActions.HISTORY_FOR_SELECTION);
  if (handler.isInProgress(VcsBackgroundableActions.keyFrom(file))) return false;

  AbstractVcs activeVcs = ProjectLevelVcsManager.getInstance(project).getVcsFor(file);
  if (activeVcs == null) return false;

  VcsHistoryProvider provider = activeVcs.getVcsBlockHistoryProvider();
  if (provider == null) return false;

  if (!AbstractVcs.fileInVcsByFileStatus(project, VcsUtil.getFilePath(file))) return false;
  return true;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:SelectedBlockHistoryAction.java


示例13: isEnabled

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
@Nullable
protected static AbstractVcs isEnabled(final VcsContext vcsContext, @Nullable final VcsBackgroundableActions actionKey) {
  if (!(isVisible(vcsContext))) return null;

  final Project project = vcsContext.getProject();
  if (project == null) return null;
  final ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(project);

  final VirtualFile[] selectedFilePaths = vcsContext.getSelectedFiles();
  if (selectedFilePaths.length != 1) return null;

  final VirtualFile selectedFile = selectedFilePaths[0];
  if (selectedFile.isDirectory()) return null;

  if (actionKey != null) {
    final BackgroundableActionEnabledHandler handler = ((ProjectLevelVcsManagerImpl)vcsManager).getBackgroundableActionHandler(actionKey);
    if (handler.isInProgress(VcsBackgroundableActions.keyFrom(selectedFile))) return null;
  }

  final AbstractVcs vcs = vcsManager.getVcsFor(selectedFile);
  if (vcs == null) return null;

  final DiffProvider diffProvider = vcs.getDiffProvider();

  if (diffProvider == null) return null;

  if (AbstractVcs.fileInVcsByFileStatus(project, VcsUtil.getFilePath(selectedFile))) {
    return vcs;
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:AbstractShowDiffAction.java


示例14: markRunningProgress

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
private static void markRunningProgress(@NotNull DiffViewerBase viewer, @NotNull Side side, boolean running) {
  final ProjectLevelVcsManagerImpl plVcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManager.getInstance(viewer.getProject());
  final BackgroundableActionEnabledHandler handler = plVcsManager.getBackgroundableActionHandler(VcsBackgroundableActions.ANNOTATE);
  if (running) {
    handler.register(key(viewer, side));
  }
  else {
    handler.completed(key(viewer, side));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AnnotateDiffViewerAction.java


示例15: DiffActionExecutor

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
protected DiffActionExecutor(final DiffProvider diffProvider, final VirtualFile selectedFile, final Project project,
                             final VcsBackgroundableActions actionKey) {
  final ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(project);
  myHandler = vcsManager.getBackgroundableActionHandler(actionKey);
  myDiffProvider = diffProvider;
  mySelectedFile = selectedFile;
  myProject = project;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:DiffActionExecutor.java


示例16: NewMappings

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
public NewMappings(final Project project, final MessageBus messageBus, final ProjectLevelVcsManagerImpl vcsManager,
                   FileStatusManager fileStatusManager) {
  myProject = project;
  myMessageBus = messageBus;
  myVcsManager = vcsManager;
  myFileStatusManager = fileStatusManager;
  myLock = new Object();
  myVcsToPaths = new HashMap<String, List<VcsDirectoryMapping>>();
  myFileWatchRequestsManager = new FileWatchRequestsManager(myProject, this, LocalFileSystem.getInstance());
  myDefaultVcsRootPolicy = DefaultVcsRootPolicy.getInstance(project);
  myActiveVcses = new AbstractVcs[0];

  if (!myProject.isDefault()) {
    final ArrayList<VcsDirectoryMapping> listStr = new ArrayList<VcsDirectoryMapping>();
    final VcsDirectoryMapping mapping = new VcsDirectoryMapping("", "");
    listStr.add(mapping);
    myVcsToPaths.put("", listStr);
    mySortedMappings = new VcsDirectoryMapping[]{mapping};
  }
  else {
    mySortedMappings = VcsDirectoryMapping.EMPTY_ARRAY;
  }
  myActivated = false;

  vcsManager.addInitializationRequest(VcsInitObject.MAPPINGS, new DumbAwareRunnable() {
    public void run() {
      if (!myProject.isDisposed()) {
        activateActiveVcses();
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:NewMappings.java


示例17: VcsDirtyScopeManagerImpl

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
public VcsDirtyScopeManagerImpl(Project project, ChangeListManager changeListManager, ProjectLevelVcsManager vcsManager) {
  myProject = project;
  myChangeListManager = changeListManager;
  myVcsManager = (ProjectLevelVcsManagerImpl)vcsManager;

  myGuess = new VcsGuess(myProject);
  myDirtBuilder = new DirtBuilder(myGuess);

  ((ChangeListManagerImpl) myChangeListManager).setDirtyScopeManager(this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:VcsDirtyScopeManagerImpl.java


示例18: executeAppendableSession

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
public void executeAppendableSession(final VcsKey vcsKey, final FilePath filePath, final VcsAppendableHistorySessionPartner partner,
                                     @Nullable VcsBackgroundableActions actionKey, boolean canUseCache, boolean canUseLastRevisionCheck) {
  if (myCachesHistory && canUseCache) {
    final VcsAbstractHistorySession session = getFullHistoryFromCache(vcsKey, filePath);
    if (session != null) {
      partner.reportCreatedEmptySession(session);
      partner.finished();
      partner.forceRefresh();
      return;
    }
  }

  final ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(myProject);
  final VcsBackgroundableActions resultingActionKey = actionKey == null ? VcsBackgroundableActions.CREATE_HISTORY_SESSION : actionKey;

  final BackgroundableActionEnabledHandler handler;
  handler = vcsManager.getBackgroundableActionHandler(resultingActionKey);
  // fo not start same action twice
  if (handler.isInProgress(resultingActionKey)) return;

  handler.register(resultingActionKey);

  final VcsAppendableHistorySessionPartner cachedPartner;
  if (myCachesHistory) {
    cachedPartner = new HistoryPartnerProxy(partner, new Consumer<VcsAbstractHistorySession>() {
      @Override
      public void consume(VcsAbstractHistorySession session) {
        if (session == null) return;
        final FilePath correctedPath =
          ((VcsCacheableHistorySessionFactory<Serializable, VcsAbstractHistorySession>)myDelegate).getUsedFilePath(session);
        myVcsHistoryCache.put(filePath, correctedPath, vcsKey, (VcsAbstractHistorySession)session.copy(),
                              (VcsCacheableHistorySessionFactory<Serializable,VcsAbstractHistorySession>) myDelegate, true);
      }
    });
  } else {
    cachedPartner = partner;
  }
  reportHistory(filePath, vcsKey, resultingActionKey, handler, cachedPartner, canUseLastRevisionCheck);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:40,代码来源:VcsHistoryProviderBackgroundableProxy.java


示例19: enabled

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
public boolean enabled() {
  if (myProject == null || myProject.isDefault() || myManager == null) {
    return false;
  }
  if (checkMappings()) {
    return false;
  }
  if (! ((ProjectLevelVcsManagerImpl) myManager).haveVcses()) {
    return false;
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:VcsDataWrapper.java


示例20: setUp

import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  UIUtil.invokeAndWaitIfNeeded(new Runnable() {
    @Override
    public void run() {
      try {
        final IdeaTestFixtureFactory fixtureFactory = IdeaTestFixtureFactory.getFixtureFactory();
        myTempDirTestFixture = fixtureFactory.createTempDirTestFixture();
        myTempDirTestFixture.setUp();

        myClientRoot = new File(myTempDirTestFixture.getTempDirPath(), "clientroot");
        myClientRoot.mkdir();

        initProject(myClientRoot, ExternalChangesDetectionVcsTest.this.getTestName());

        myVcs = new MockAbstractVcs(myProject);
        myVcs.setChangeProvider(new MyMockChangeProvider());
        myVcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManager.getInstance(myProject);
        myVcsManager.registerVcs(myVcs);
        myVcsManager.setDirectoryMapping("", myVcs.getName());

        myLFS = LocalFileSystem.getInstance();
        myChangeListManager = ChangeListManager.getInstance(myProject);
        myVcsDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
      }
      catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:ExternalChangesDetectionVcsTest.java



注:本文中的com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ProblemLocation类代码示例发布时间:2022-05-22
下一篇:
Java InfobrightNamedPipeLoader类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap