Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IPath.segment()


          if (!visited.contains(p)) {
            visited.add(p);
            extendClasspathWithProject(result, p, visited);
          }
        } else if (entryKind != IClasspathEntry.CPE_SOURCE) {
          String segment = path.segment(0);
          if (!segment.equals("org.eclipse.jdt.launching.JRE_CONTAINER")) {
            IClasspathEntry[] resolveClasspath = javaProject
                    .resolveClasspath(new IClasspathEntry[] { each });
            for (IClasspathEntry eachResolved : resolveClasspath) {
              if (eachResolved.getEntryKind() == IClasspathEntry.CPE_PROJECT) {
View Full Code Here


      try {

        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        root = project.findPackageFragmentRoot(new Path("/").append(projectText).append(moduleXmlPath.segment(0)));//$NON-NLS-1$

      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
View Full Code Here

      try {

        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        root = project.findPackageFragmentRoot(new Path("/").append(projectText).append(moduleXmlPath.segment(0)));//$NON-NLS-1$

      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
View Full Code Here

      try {

        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        root = project.findPackageFragmentRoot(new Path("/").append(projectText).append(moduleXmlPath.segment(0)));//$NON-NLS-1$

      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
View Full Code Here

      try {

        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        root = project.findPackageFragmentRoot(new Path("/").append(projectText).append(moduleXmlPath.segment(0)));//$NON-NLS-1$

      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
View Full Code Here

      try {

        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        root = project.findPackageFragmentRoot(new Path("/").append(projectText).append(moduleXmlPath.segment(0)));//$NON-NLS-1$

      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
View Full Code Here

      IStructuredModel model = ((IDOMNode) node).getModel();
      String baseLocation = model.getBaseLocation();
      if (!baseLocation.equals(IModelManager.UNMANAGED_MODEL)) {
        IPath path = new Path(baseLocation);
        if (path.segmentCount() > 1) {
          IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
          if (project.isAccessible()) {
            String key = createPreferenceKey(path);
            IEclipsePreferences preferences = new ProjectScope(project).getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName());
            type = preferences.get(key, DEFAULT_MIMETYPE);
          }
View Full Code Here

          for (int i = 0; i < classpathEntries.length; i++) {
            IClasspathEntry classpathEntry = classpathEntries[i];
            if (classpathEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
              IPath libraryPath = classpathEntry.getPath();
              if (libraryPath.getFileExtension() != null && libraryPath.getFileExtension().length() > 0) {
                if (libraryPath.getDevice() == null && workspaceRoot.getProject(libraryPath.segment(0)).exists()) {
                  libraryPath = workspaceRoot.getFile(libraryPath).getLocation();
                }
                String libraryPathString = libraryPath.toString();
                JarFile jarFile = null;
                try {
View Full Code Here

              IPath basePath = new Path(model.getBaseLocation());
              IResource derivedResource = null;
              if (basePath.segmentCount() > 1)
                derivedResource = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
              else
                derivedResource = ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0));
              IPath derivedPath = derivedResource.getLocation();
              if (derivedPath != null) {
                baseLocation = derivedPath.toString();
              }
              else {
View Full Code Here

  public static boolean isJSFLibraryContainer(IClasspathEntry cpEntry) {
    if (cpEntry.getEntryKind() != IClasspathEntry.CPE_CONTAINER)
      return false;
   
    IPath path = cpEntry.getPath();
    return path != null && path.segmentCount() == 2 && JSF_LIBRARY_CP_CONTAINER_ID.equals(path.segment(0));
  }
 
  /**
   * @param project
   * @return true if the JSF Faceted project is configured to use system supplied implementation
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.