Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.IBuildpathEntry


  public static IProjectFragment addSourceFolder(IContainer folder) throws CoreException {
    IScriptProject dltkProj = DLTKCore.create(folder.getProject());
    IProjectFragment fragment = dltkProj.getProjectFragment(folder);
    if(!fragment.exists()) {
      IBuildpathEntry[] bpentries = dltkProj.getRawBuildpath();
      IBuildpathEntry entry = DLTKCore.newSourceEntry(fragment.getPath());
      dltkProj.setRawBuildpath(ArrayUtil.concat(bpentries, entry), null);
    }
    return fragment;
  }
View Full Code Here


    IScriptProject dltkProj = DLTKCore.create(project);
    assertTrue(!dltkProj.exists());
    setupLangProject(project);
    assertTrue(dltkProj.exists());
   
    IBuildpathEntry entry = DLTKCore.newContainerEntry(
      ScriptRuntime.newDefaultInterpreterContainerPath().append(libraryEntry)   
    );
    dltkProj.setRawBuildpath(new IBuildpathEntry[] {entry}, null);
    assertNotNull(ScriptRuntime.getInterpreterInstall(dltkProj));
  }
View Full Code Here

    for (DubBundleChecker bundleDep : deps) {
      verifyAndRemoveDepBuildpathEntries(bundleDep, buildpathToVerify);
    }
   
    for (ListIterator<IBuildpathEntry> iter = buildpathToVerify.listIterator(); iter.hasNext(); ) {
      IBuildpathEntry bpEntry = iter.next();
     
      IPath entryPath = EnvironmentPathUtils.getLocalPath(bpEntry.getPath());
     
      if(bpEntry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY && !isDubBuildpathEntry(bpEntry)) {
        String entryPathStr = entryPath.toString();
        assertTrue(
            entryPathStr.endsWith("druntime/import") ||
            entryPathStr.endsWith("phobos") ||
            entryPathStr.startsWith("#special#builtin"));
        iter.remove();
        continue;
      }
     
      assertTrue(bpEntry.getEntryKind() == IBuildpathEntry.BPE_SOURCE);
      assertTrue(bpEntry.isExternal() == false);
      IPath folderPath = entryPath.removeFirstSegments(1); // Remove project segment
      assertTrue(sourcePaths.remove(folderPath.toFile().toPath()));
      iter.remove();
      continue;
    }
View Full Code Here

    }
  }
 
  protected static void removeDepProjBPEntry(IProject project, LinkedList<IBuildpathEntry> buildpathToVerify) {
    for (ListIterator<IBuildpathEntry> iter = buildpathToVerify.listIterator(); iter.hasNext(); ) {
      IBuildpathEntry bpEntry = iter.next();
      IPath bpEntryPath = EnvironmentPathUtils.getLocalPath(bpEntry.getPath());
     
      if(bpEntryPath.equals(project.getFullPath())) {
        assertTrue(bpEntry.getEntryKind() == IBuildpathEntry.BPE_PROJECT);
        iter.remove();
        return;
      }
    }
    assertFail(); // Must find match
View Full Code Here

  }
 
  protected static void removeDepBuildpathEntry(LinkedList<IBuildpathEntry> buildpathToVerify,
      Path srcFolderAbsolutePath) {
    for (ListIterator<IBuildpathEntry> iter = buildpathToVerify.listIterator(); iter.hasNext(); ) {
      IBuildpathEntry bpEntry = iter.next();
     
      IPath bpEntryPath = EnvironmentPathUtils.getLocalPath(bpEntry.getPath());
      if(bpEntryPath.toFile().toPath().equals(srcFolderAbsolutePath)) {
        assertTrue(bpEntry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY);
        iter.remove();
        return;
      }
    }
    assertFail(); // Must find match
View Full Code Here

      RutaIdeCorePlugin.error(e);
      return;
    }
    final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
    for (int i = 0; i < resolvedBuildpath.length; i++) {
      final IBuildpathEntry entry = resolvedBuildpath[i];
      if (entry.getEntryKind() == IBuildpathEntry.BPE_PROJECT) {
        final IPath path = entry.getPath();
        final IProject project = workspaceRoot.getProject(path.lastSegment());
        if (project.exists()) {
          packageCollector.getPackagesProvided().addAll(
                  manager.getInternalPackageNames(install, project));
        }
View Full Code Here

      RutaIdeCorePlugin.error(e1);
      return Collections.EMPTY_SET;
    }
    final Set buildpath = new HashSet();
    for (int i = 0; i < resolvedBuildpath.length; i++) {
      final IBuildpathEntry entry = resolvedBuildpath[i];
      if (entry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY && entry.isExternal()) {
        buildpath.add(EnvironmentPathUtils.getLocalPath(entry.getPath()));
      }
    }
    return buildpath;
  }
View Full Code Here

        if (createFromExisting.getBuildpathEntry().getEntryKind() != IBuildpathEntry.BPE_SOURCE) {
          buildpathEntries.add(createFromExisting);
        }
      }
    }
    IBuildpathEntry newSourceEntry = DLTKCore.newSourceEntry(srcFolder.getFullPath());
    buildpathEntries.add(BPListElement.createFromExisting(newSourceEntry, scriptProject));

    BuildpathsBlock.flush(buildpathEntries, scriptProject, monitor);
    copyDescriptors(descFolder);
View Full Code Here

    {
       
        IPath[] include = new IPath[]{new Path("composer/*")};
        IBuildpathAttribute[] attributes = new IBuildpathAttribute[0];
        IPath[] exclude = new IPath[0];
        IBuildpathEntry vendorEntry = DLTKCore.newBuiltinEntry(
                composerPath, new IAccessRule[0], attributes,
                include, exclude, false, false);
        List<IBuildpathEntry> vendorEntries = new ArrayList<IBuildpathEntry>();
        vendorEntries.add(vendorEntry);
       
View Full Code Here

                            foundChildren);
                    IAccessRule[] accessRules = BuildpathEntry
                            .decodeAccessRules(attributeList);
                    */
                   
                    IBuildpathEntry entry = DLTKCore.newLibraryEntry(Path
                            .fromPortableString(path), new IAccessRule[0],
                            new IBuildpathAttribute[0], false, true);
                    res.add(entry);
                }
            }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.IBuildpathEntry

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.