Examples of IBuildpathEntry


Examples of org.eclipse.dltk.core.IBuildpathEntry

   
    IEclipsePreferences projectPreferences = ComposerPlugin.getDefault().getProjectPreferences(scriptProject.getProject());
    String stored = projectPreferences.get(ComposerPreferenceConstants.BUILDPATH_INCLUDES_EXCLUDES, null);
   
    if (stored != null) {
      IBuildpathEntry buildpathEntry = scriptProject.decodeBuildpathEntry(stored);
      for (IPath includePath : buildpathEntry.getInclusionPatterns()) {
        elem.addToInclusion(path.append(includePath));
      }
      for (IPath excludePath : buildpathEntry.getExclusionPatterns()) {
        elem.addToExclusions(path.append(excludePath));
      }
    }
   
    return wizard = new BuildPathExclusionWizard(new BPListElement[]{}, elem);
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

  @SuppressWarnings("unchecked")
  protected void applyChanges() {
   
    List<BPListElement> elements = wizard.getModifiedElements();
    BPListElement element = (BPListElement) elements.get(0);
    IBuildpathEntry buildpathEntry = element.getBuildpathEntry();
   
    if (buildpathEntry instanceof BuildpathEntry) {
      BuildpathEntry entry = (BuildpathEntry) buildpathEntry;
      String encodeBuildpathEntry = scriptProject.encodeBuildpathEntry(entry);
      IEclipsePreferences projectPreferences = ComposerPlugin.getDefault().getProjectPreferences(scriptProject.getProject());
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

    if (parentElement instanceof PackagePath) {

      PackagePath pPath = (PackagePath) parentElement;
      IScriptProject scriptProject = pPath.getProject();
      IBuildpathEntry entry = pPath.getEntry();

      try {

        IProjectFragment[] allProjectFragments;
        allProjectFragments = scriptProject.getAllProjectFragments();
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

    }
  }
 
  private void addPath(IPath path, List<IBuildpathEntry> entries) {
    // find parent
    IBuildpathEntry parent = null;
    int parentLength = 0;
    IPath entryPath;
    for (IBuildpathEntry entry : entries) {
      entryPath = entry.getPath();
      if (entryPath.isPrefixOf(path)
          && (parent == null || (entryPath.toString().length() > parentLength))) {
        parent = entry;
        parentLength = parent.getPath().toString().length();
      }
    }
   
    // add path as exclusion to found parent
    if (parent != null) {
      List<IPath> exclusions = new ArrayList<IPath>();
      exclusions.addAll(Arrays.asList(parent.getExclusionPatterns()));
     
      IPath diff = path.removeFirstSegments(path.matchingFirstSegments(parent.getPath()));
      if (parent.getPath().equals(composerPath)) {
        diff = diff.uptoSegment(1);
      }
      diff = diff.removeTrailingSeparator().addTrailingSeparator();
      if (!exclusions.contains(diff)) {
        exclusions.add(diff);
      }
     
      entries.remove(parent);
     
      parent = DLTKCore.newSourceEntry(parent.getPath(), exclusions.toArray(new IPath[]{}));
      entries.add(parent);
    }
   
    // add own entry
    // leave vendor/composer untouched with exclusions
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

      RutaIdePlugin.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

Examples of org.eclipse.dltk.core.IBuildpathEntry

      RutaIdePlugin.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

Examples of org.eclipse.dltk.core.IBuildpathEntry

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

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

Examples of org.eclipse.dltk.core.IBuildpathEntry

    return new CoreException(new Status(IStatus.ERROR, PHPUiPlugin.ID,
        IDLTKStatusConstants.INTERNAL_ERROR, message, ex));
  }

  public static boolean isInvalidPharBuildEntry(BPListElement cpentry) {
    IBuildpathEntry entry = cpentry.getBuildpathEntry();
    return isInvalidPharBuildEntry(entry);

  }
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

    }
    IncludePath[] paths = IncludePathManager.getInstance().getIncludePaths(
        project);
    for (IncludePath includePath : paths) {
      if (includePath.getEntry() instanceof IBuildpathEntry) {
        IBuildpathEntry bPath = (IBuildpathEntry) includePath
            .getEntry();
        if (bPath.getEntryKind() == IBuildpathEntry.BPE_CONTAINER
            && !bPath.getPath().toString()
                .equals("org.eclipse.php.core.LANGUAGE")) { //$NON-NLS-1$
          IBuildpathContainer buildpathContainer = DLTKCore
              .getBuildpathContainer(bPath.getPath(),
                  DLTKCore.create(project));
          if (buildpathContainer != null) {
            final IBuildpathEntry[] buildpathEntries = buildpathContainer
                .getBuildpathEntries();
            for (IBuildpathEntry buildpathEntry : buildpathEntries) {
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

          if (!BuildpathModifier.isSourceFolder(project)
              || BuildPathUtils.isInBuildpath(project.getPath(),
                  project))
            return false;
        } else if (element instanceof IProjectFragment) {
          IBuildpathEntry entry = ((IProjectFragment) element)
              .getRawBuildpathEntry();
          if (entry != null
              && entry.getEntryKind() == IBuildpathEntry.BPE_CONTAINER) {
            return false;
          }
        } else if (element instanceof IncludePath) {
          return true;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.