Examples of IBuildpathEntry


Examples of org.eclipse.dltk.core.IBuildpathEntry

        .getIncludePaths(project);
    for (IncludePath entry : includePathEntries) {
      Object includePathEntry = entry.getEntry();

      if (includePathEntry instanceof IBuildpathEntry) {
        IBuildpathEntry bpEntry = (IBuildpathEntry) includePathEntry;
        newBuildpath.add(BPListElement.createFromExisting(bpEntry,
            fCurrScriptProject));
      } else {
        IResource resource = (IResource) includePathEntry;
        newBuildpath.add(new BPListElement(fCurrScriptProject,
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

  class LabelProvider extends ScriptUILabelProvider {

    public Image getImage(Object element) {

      if (element instanceof IBuildpathEntry) {
        IBuildpathEntry includePathEntry = (IBuildpathEntry) element;
        if (includePathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
          return PHPPluginImages
              .get(PHPPluginImages.IMG_OBJS_ENV_VAR);
        } else {
          return PHPPluginImages
              .get(PHPPluginImages.IMG_OBJS_LIBRARY);
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

      if (element == EXTERNAL_CONTAINER) {
        return Messages.PathEntrySelectionDialog_6;
      }

      if (element instanceof IBuildpathEntry) {
        IBuildpathEntry includePathEntry = (IBuildpathEntry) element;
        return EnvironmentPathUtils.getLocalPathString(includePathEntry
            .getPath());
      }

      if (!(element instanceof PathEntry)) {
        return super.getText(element);
      }

      PathEntry entry = (PathEntry) element;
      String path = entry.getResolvedPath();

      if (entry.getType() == Type.WORKSPACE) {
        VirtualPath tmpPath = entry.getAbstractPath().clone();
        tmpPath.removeFirstSegment();
        path = tmpPath.toString();
        if (path.startsWith("/")) { //$NON-NLS-1$
          path = path.substring(1);
        }
      }
      if (entry.getType() == Type.INCLUDE_FOLDER
          || entry.getType() == Type.INCLUDE_VAR) {
        IBuildpathEntry includePathEntry = (IBuildpathEntry) entry
            .getContainer();
        String includePath = EnvironmentPathUtils
            .getLocalPathString(includePathEntry.getPath());
        if (includePathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
          IPath p = DLTKCore.getResolvedVariablePath(includePathEntry
              .getPath());
          if (p != null) {
            includePath = p.toOSString();
          }
        }
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

            IResource resource = (IResource) selectedElement;
            fWorkspacePathText.setData(Type.WORKSPACE);
            fWorkspacePathText.setText(resource.getFullPath()
                .toString());
          } else if (selectedElement instanceof IBuildpathEntry) {
            IBuildpathEntry includePathEntry = (IBuildpathEntry) selectedElement;
            fWorkspacePathText.setData(includePathEntry
                .getEntryKind() == IBuildpathEntry.BPE_VARIABLE ? Type.INCLUDE_VAR
                : Type.INCLUDE_FOLDER);
            if (includePathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
              IPath incPath = DLTKCore
                  .getResolvedVariablePath(includePathEntry
                      .getPath());
              if (incPath != null) {
                fWorkspacePathText.setText(incPath.toOSString());
              }
            } else {
              fWorkspacePathText.setText(EnvironmentPathUtils
                  .getLocalPath(includePathEntry.getPath())
                  .toOSString());
            }
          } else if (selectedElement instanceof IPFile) {
            IPFile ipFile = (IPFile) selectedElement;
            IBuildpathEntry includePathEntry = ipFile.includePathEntry;
            fWorkspacePathText.setData(includePathEntry
                .getEntryKind() == IBuildpathEntry.BPE_VARIABLE ? Type.INCLUDE_VAR
                : Type.INCLUDE_FOLDER);
            fWorkspacePathText.setText(ipFile.file
                .getAbsolutePath());
          }
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

              IProject project = (IProject) parentElement;
              IncludePath[] includePath = IncludePathManager
                  .getInstance().getIncludePaths(project);
              for (IncludePath path : includePath) {
                if (path.isBuildpath()) {
                  IBuildpathEntry buildpathEntry = (IBuildpathEntry) path
                      .getEntry();
                  if (buildpathEntry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY
                      || buildpathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
                    r.add(buildpathEntry);
                  }
                }
              }
            }
            return r.toArray();
          } else if (parentElement instanceof IBuildpathEntry) {
            IBuildpathEntry includePathEntry = (IBuildpathEntry) parentElement;
            IPath path = EnvironmentPathUtils
                .getLocalPath(includePathEntry.getPath());
            File file = null;
            if (includePathEntry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY) {
              file = path.toFile();
            } else if (includePathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
              path = DLTKCore.getResolvedVariablePath(path);
              if (path != null) {
                file = path.toFile();
              }
            }
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

    class LabelProvider extends ScriptUILabelProvider {

      public Image getImage(Object element) {
        if (element instanceof IBuildpathEntry) {
          IBuildpathEntry includePathEntry = (IBuildpathEntry) element;
          if (includePathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
            return PHPPluginImages
                .get(PHPPluginImages.IMG_OBJS_ENV_VAR);
          } else {
            return PHPPluginImages
                .get(PHPPluginImages.IMG_OBJS_LIBRARY);
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

        return super.getImage(element);
      }

      public String getText(Object element) {
        if (element instanceof IBuildpathEntry) {
          IBuildpathEntry includePathEntry = (IBuildpathEntry) element;
          return EnvironmentPathUtils.getLocalPath(
              includePathEntry.getPath()).toOSString();
        }
        if (element instanceof IPFile) {
          return ((IPFile) element).file.getName();
        }
        return super.getText(element);
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

          IProject project = (IProject) parentElement;
          IncludePath[] includePath = IncludePathManager
              .getInstance().getIncludePaths(project);
          for (IncludePath path : includePath) {
            if (path.isBuildpath()) {
              IBuildpathEntry buildpathEntry = (IBuildpathEntry) path
                  .getEntry();
              if (buildpathEntry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY
                  || buildpathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
                r.add(buildpathEntry);
              }
            }
          }
        }
        return r.toArray();
      } else if (parentElement instanceof IBuildpathEntry) {
        IBuildpathEntry buildpathEntry = (IBuildpathEntry) parentElement;
        IPath path = buildpathEntry.getPath();
        File file = null;
        if (buildpathEntry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY) {
          file = path.toFile();
        } else if (buildpathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
          path = DLTKCore.getResolvedVariablePath(path);
          if (path != null) {
            file = path.toFile();
          }
        }
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

class PHPResLabelProvider extends ScriptUILabelProvider {

  public Image getImage(Object element) {
    if (element instanceof IBuildpathEntry) {
      IBuildpathEntry buildpathEntry = (IBuildpathEntry) element;
      if (buildpathEntry.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
        return PHPPluginImages.get(PHPPluginImages.IMG_OBJS_ENV_VAR);
      } else {
        return PHPPluginImages.get(PHPPluginImages.IMG_OBJS_LIBRARY);
      }
    }
View Full Code Here

Examples of org.eclipse.dltk.core.IBuildpathEntry

    return super.getImage(element);
  }

  public String getText(Object element) {
    if (element instanceof IBuildpathEntry) {
      IBuildpathEntry includePathEntry = (IBuildpathEntry) element;
      return EnvironmentPathUtils
          .getLocalPath(includePathEntry.getPath()).toOSString();
    }
    if (element instanceof IncPathFile) {
      return ((IncPathFile) element).file.getName();
    }
    return super.getText(element);
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.