Package dtool.dub

Examples of dtool.dub.DubBundleDescription


    }
    super.launch(resource, mode);
  }
 
  protected IFile getProjectExecutableArtifact(IProject project) {
    DubBundleDescription bundleInfo = DeeCore.getWorkspaceModel().getBundleInfo(project);
    Path targetFilePath = bundleInfo.getMainBundle().getEffectiveTargetFullPath();
   
    return project.getFile(EclipseUtils.path(targetFilePath));
  }
View Full Code Here


    if(!(element instanceof IFolder)) {
      return false;
    }
    IFolder folder = (IFolder) element;
    IProject project = folder.getProject();
    DubBundleDescription bundleInfo = getWorkspaceModel().getBundleInfo(project);
    if(bundleInfo == null) {
      return false;
    }
   
    java.nio.file.Path[] sourceFolders = bundleInfo.getMainBundle().getEffectiveSourceFolders();
    for (java.nio.file.Path srcFolderPath : sourceFolders) {
      if(folder.getProjectRelativePath().toFile().toPath().equals(srcFolderPath)) {
        return true;
      }
    }
View Full Code Here

 
  @Override
  public StyledString visitDepContainer(DubDependenciesContainer element) {
    StyledString baseText = new StyledString("DUB Dependencies");
   
    DubBundleDescription bundleInfo = element.getBundleInfo();
    if(bundleInfo.hasErrors()) {
      // TODO: present more details about origin of error (json or dub describre)
      if(bundleInfo.isResolved()) {
        return baseText.append(" [DUB error]", fgColor(DUB_DEPCONTAINER_ERROR_ANNOTATION_FG));
      } else {
        return baseText.append(" [DUB error]", fgColor(DUB_DEPCONTAINER_ERROR_ANNOTATION_FG));
      }
    } else {
      if(bundleInfo.isResolved()) {
        return baseText;
      } else {
        return baseText.append(" <dub describing>", fgColor(DUB_DEPCONTAINER_ANNOTATION_FG));
      }
    }
View Full Code Here

  }
 
  @Override
  public StyledString visitDubManifestFile(IFile element) {
    StyledString baseString = new StyledString(element.getName());
    DubBundleDescription bundleInfo = DeeCore.getWorkspaceModel().getBundleInfo(element.getProject());
    if(bundleInfo == null) {
      return null;
    }
    return appendVersionString(baseString, bundleInfo.getMainBundle());
  }
View Full Code Here

    }
  }
 
  protected void doUpdateManifestEntry(BundlePath bundlePath) throws ExecutionException {
    RunDubDescribeCallable dubDescribeTask = new RunDubDescribeCallable(bundlePath, false);
    DubBundleDescription bundleDesc = dubDescribeTask.submitAndGet(dubProcessAgent);
   
    FileTime dubStartTimeStamp = dubDescribeTask.getStartTimeStamp();
    DubDescribeAnalysis dubDescribeAnalyzer = new DubDescribeAnalysis(bundleDesc);
   
    setNewManifestEntry(dubStartTimeStamp, dubDescribeAnalyzer);
View Full Code Here

  }
 
  public void writeDubJsonAndCheckDubModel(String dubJson, IProject project, DubBundleChecker expMainBundle)
      throws CoreException {
    LatchRunnable preUpdateLatch = writeDubJsonWithModelLatch(project, dubJson);
    DubBundleDescription unresolvedBundleDesc = getExistingDubBundleInfo(project);
    preUpdateLatch.releaseAll();
   
    checkDubModel(unresolvedBundleDesc, project, expMainBundle);
  }
View Full Code Here

      DubBundleChecker expMainBundle) throws CoreException {
    checkUnresolvedBundle(project, expMainBundle, unresolvedDubBundle);
   
    DeeCore.getWorkspaceModelManager().syncPendingUpdates();
   
    DubBundleDescription dubBundle = getExistingDubBundleInfo(project);
    if(unresolvedDubBundle.hasErrors()) {
      // Check that we did not attempt to call dub describe on a manifest with errors
      assertTrue(unresolvedDubBundle == dubBundle);
    }
   
    DubBundleException error = dubBundle.getError();
    if(error != null) {
      expMainBundle.checkBundleDescription(unresolvedDubBundle, false);
      testDubContainerUnresolved(project, expMainBundle, true);
     
      IMarker errorMarker = assertNotNull(getDubErrorMarker(project));
View Full Code Here

      "~master", array("src"), CommonDubTest.paths("src"),
      null,
      null,
      null, null));
   
    DubBundleDescription bundleDesc = new DubBundleDescription(mainBundle, bundleDeps);
   
    getModelManager().addProjectInfo(project, bundleDesc);
   
    DubDependenciesContainer dubContainer = getDubContainer(project);
    assertTrue(dubContainer.getChildren().length == 1);
View Full Code Here

    assertTrue(model.getBundleInfo(project) == null);
   
    // Test concurrency: updating a project that was removed in the meantime
    LatchRunnable preUpdateLatch = writeDubJsonWithModelLatch(project,
      "{"+ jsEntry("name", "xptobundle")+ jsFileEnd());
    DubBundleDescription unresolvedBundleDesc = getExistingDubBundleInfo(project);
    assertTrue(model.getBundleInfo(project) != null);
    project.delete(true, null);
    preUpdateLatch.releaseAll();
    _awaitModelUpdates_();
    assertTrue(model.getBundleInfo(project) == null);
View Full Code Here

    String dubLibJson = jsObject(jsEntry("name", "dub_lib"));
    writeDubJson(libProject, dubLibJson);
   
    // DUB_LIB project buildpath entry not on DUB_TEST yet
    _awaitModelUpdates_();
    DubBundleDescription dubBundle = getExistingDubBundleInfo(project);
    checkFullyResolvedCode(project, dubBundle,
      main(loc(project), null, "dub_test", DEFAULT_VERSION, srcFolders(),
        rawDeps("dub_lib"),
        bundle(libProjectLocation, "dub_lib")
      ));
View Full Code Here

TOP

Related Classes of dtool.dub.DubBundleDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.