Package org.eclipse.dltk.internal.ui.wizards.buildpath

Examples of org.eclipse.dltk.internal.ui.wizards.buildpath.BPListElement


    // in case it is not, add the entry to the added elements list
    // and ask the user if he would like to add it to the build path as well

    for (Iterator iterator = insertedElements.iterator(); iterator
        .hasNext();) {
      BPListElement element = (BPListElement) iterator.next();
      if (!BuildPathUtils.isContainedInBuildpath(element.getPath(),
          fCurrJProject)) {
        fAddedElements.add(element);
      }
    }

    if (fAddedElements.size() > 0) {
      addToBuildPath = IncludePathUtils.openConfirmationDialog(
          getShell(), PHPUIMessages.IncludePath_AddEntryTitle,
          PHPUIMessages.IncludePath_AddEntryToBuildPathMessage); //
      for (IChangeListener listener : addedElementListeners) {
        listener.update(true);
      }
    }

    for (Iterator iter = insertedElements.iterator(); iter.hasNext();) {
      BPListElement element = (BPListElement) iter.next();
      fFoldersList.expandElement(element, 3);
    }

    fFoldersList.removeElements(removedElements);

    for (Iterator iter = modifiedElements.iterator(); iter.hasNext();) {
      BPListElement element = (BPListElement) iter.next();
      fFoldersList.refresh(element);
      fFoldersList.expandElement(element, 3);
    }

    fFoldersList.refresh(); // does enforce the order of the entries.
View Full Code Here


    List<BPListElement> exportedEntries = new ArrayList<BPListElement>();
    List<BPListElement> allEntries = new ArrayList<BPListElement>();
    if (buildpathEntries != null) {
      for (int i = 0; i < buildpathEntries.length; i++) {
        IBuildpathEntry curr = buildpathEntries[i];
        BPListElement listElement = BPListElement.createFromExisting(
            curr, fCurrScriptProject);
        if (curr.isExported()
            || curr.getEntryKind() == IBuildpathEntry.BPE_SOURCE) {
          exportedEntries.add(listElement);
        }
View Full Code Here

      // go over the dialog entries. collect all of the source entries for
      // the include path array
      // and the rest for the build path array
      for (Iterator<IBuildpathEntry> iter = buildpathEntries.iterator(); iter
          .hasNext();) {
        BPListElement entry = (BPListElement) iter.next();
        newIncludePathEntries.add(entry.getBuildpathEntry());
        if (entry.getEntryKind() != IBuildpathEntry.BPE_SOURCE) {
          newBuildPathEntries.add(entry.getBuildpathEntry());
          // https://bugs.eclipse.org/bugs/show_bug.cgi?id=307982
          // Add project in build path,press ok,then edit the
          // project's access rules will throw exception.
          BuildPathUtils.removeEntryFromBuildPath(javaProject,
              entry.getBuildpathEntry());
        }

        IResource res = entry.getResource();
        if (res instanceof IFolder && entry.getLinkTarget() == null
            && !res.exists()) {
          CoreUtility.createFolder((IFolder) res, true, true,
              new SubProgressMonitor(monitor, 1));
        } else {
          monitor.worked(1);
View Full Code Here

        IBuildpathEntry bpEntry = (IBuildpathEntry) includePathEntry;
        newBuildpath.add(BPListElement.createFromExisting(bpEntry,
            fCurrScriptProject));
      } else {
        IResource resource = (IResource) includePathEntry;
        newBuildpath.add(new BPListElement(fCurrScriptProject,
            IBuildpathEntry.BPE_SOURCE, resource.getFullPath(),
            resource, false));
      }

    }
View Full Code Here

  }

  @Override
  public Image getImage(Object element) {
    if (element instanceof BPListElement) {
      BPListElement cpentry = (BPListElement) element;
      ImageDescriptor imageDescriptor = getCPListElementBaseImage(cpentry);
      if (imageDescriptor != null) {
        if (PharUIUtil.isInvalidPharBuildEntry(cpentry)) {
          imageDescriptor = new ScriptElementImageDescriptor(
              imageDescriptor,
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected INewWizard createWizard() throws CoreException {
      BPListElement newEntrie = new BPListElement(fSelectedProject,
          IBuildpathEntry.BPE_SOURCE, false);
      BPListElement[] existing = BPListElement
          .createFromExisting(fSelectedProject);
      boolean isProjectSrcFolder = BPListElement.isProjectSourceFolder(
          existing, fSelectedProject);
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.internal.ui.wizards.buildpath.BPListElement

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.