コード例 #1
0
 protected void readProjects(VirtualFile... files) {
   List<MavenProject> projects = new ArrayList<MavenProject>();
   for (VirtualFile each : files) {
     projects.add(myProjectsManager.findProject(each));
   }
   myProjectsManager.forceUpdateProjects(projects);
   waitForReadingCompletion();
 }
コード例 #2
0
 protected void resolveFoldersAndImport() {
   myProjectsManager.scheduleFoldersResolveForAllProjects();
   myProjectsManager.waitForFoldersResolvingCompletion();
   UIUtil.invokeAndWaitIfNeeded(
       new Runnable() {
         @Override
         public void run() {
           myProjectsManager.performScheduledImportInTests();
         }
       });
 }
コード例 #3
0
 @Override
 protected void tearDown() throws Exception {
   Messages.setTestDialog(TestDialog.DEFAULT);
   myProjectsManager.projectClosed();
   removeFromLocalRepository("test");
   if (useJps()) {
     CompilerTestUtil.disableExternalCompiler(myProject);
     FileUtil.delete(BuildManager.getInstance().getBuildSystemDirectory());
   }
   super.tearDown();
 }
コード例 #4
0
 @Override
 protected void setUpInWriteAction() throws Exception {
   super.setUpInWriteAction();
   myProjectsManager = MavenProjectsManager.getInstance(myProject);
   removeFromLocalRepository("test");
   if (useJps()) {
     CompilerTestUtil.enableExternalCompiler(myProject);
   } else {
     CompilerTestUtil.disableExternalCompiler(myProject);
   }
 }
コード例 #5
0
  protected MavenArtifactDownloader.DownloadResult downloadArtifacts(
      Collection<MavenProject> projects, List<MavenArtifact> artifacts) {
    final MavenArtifactDownloader.DownloadResult[] unresolved =
        new MavenArtifactDownloader.DownloadResult[1];

    AsyncResult<MavenArtifactDownloader.DownloadResult> result =
        new AsyncResult<MavenArtifactDownloader.DownloadResult>();
    result.doWhenDone(
        new Consumer<MavenArtifactDownloader.DownloadResult>() {
          @Override
          public void consume(MavenArtifactDownloader.DownloadResult unresolvedArtifacts) {
            unresolved[0] = unresolvedArtifacts;
          }
        });

    myProjectsManager.scheduleArtifactsDownloading(projects, artifacts, true, true, result);
    myProjectsManager.waitForArtifactsDownloadingCompletion();

    return unresolved[0];
  }
コード例 #6
0
 protected void performPostImportTasks() {
   myProjectsManager.waitForPostImportTasksCompletion();
 }
コード例 #7
0
 protected void downloadArtifacts() {
   downloadArtifacts(myProjectsManager.getProjects(), null);
 }
コード例 #8
0
 protected void resolvePlugins() {
   myProjectsManager.waitForPluginsResolvingCompletion();
 }
コード例 #9
0
 protected void readProjects() {
   readProjects(myProjectsManager.getProjectsFiles());
 }
コード例 #10
0
 protected void scheduleResolveAll() {
   myProjectsManager.scheduleResolveAllInTests();
 }
コード例 #11
0
 protected void initProjectsManager(boolean enableEventHandling) {
   myProjectsManager.initForTests();
   myProjectsTree = myProjectsManager.getProjectsTreeForTests();
   if (enableEventHandling) myProjectsManager.listenForExternalChanges();
 }
コード例 #12
0
 protected void updateProjectsAndImport(VirtualFile... files) {
   readProjects(files);
   myProjectsManager.performScheduledImportInTests();
 }
コード例 #13
0
 protected void readProjects(List<VirtualFile> files, String... profiles) {
   myProjectsManager.resetManagedFilesAndProfilesInTests(files, Arrays.asList(profiles));
   waitForReadingCompletion();
 }