Package org.eclipse.core.runtime

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


      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here


      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here

    try {
      IProject project = javaProject.getProject();
      monitor.beginTask("Building JAR ...", 210);

      IPath cdkProjectJarLocation = new Path(CdkCorePlugin.getDefault().getStateLocation().append("temp").toString()).append(project.getName() + ".jar");
      IFile cdkProjectJarFile = project.getFile(cdkProjectJarLocation.lastSegment());
     
      ResourceUtils.createDirectory(ResourceUtils.getDirectory(cdkProjectJarLocation.toFile()));
     
      monitor.setTaskName("Initializing Jar ...");
      JarPackageData jarPackageData = new JarPackageData();
View Full Code Here

    Reader r = new InputStreamReader(source);
    int c;
    while ((c = r.read()) != -1)
      sb.append((char) c);
    r.close();
    return createCompilationUnit(fragment, typepath.lastSegment(),
        sb.toString());
  }

  public void addClassPathEntry(IClasspathEntry entry) throws CoreException {
    IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
View Full Code Here

   */
  private static String getPathLabel(IPackageFragmentRoot root) {
    final IPath path = root.getPath();
    try {
      if (root.getKind() == IPackageFragmentRoot.K_BINARY) {
        return path.lastSegment();
      }
    } catch (JavaModelException e) {
      EclEmmaUIPlugin.log(e);
    }
    return path.removeFirstSegments(1).toString();
View Full Code Here

      e.printStackTrace();
    }
   
    // Check that we aren't going to create a wocomponent inside another wocomponent
    IPath path = getContainerFullPath();
    if (path.lastSegment().endsWith(".wo")) {
      setErrorMessage("Cannot create a component within another component");
      return false;
    }
   
    return super.validatePage();
View Full Code Here

        String segment = path.segment(pathElementNum);
        if (segment.endsWith("." + "framework")) {
          choppedFrameworkPath = path.removeLastSegments(count - pathElementNum - 1);
        }
      }
      if (choppedFrameworkPath != null && !choppedFrameworkPath.lastSegment().startsWith("JavaVM")) {
        arrayList.add(choppedFrameworkPath);
      }
    }
    return arrayList;
  }
View Full Code Here

                modelGroup.loadModelsFromURL(jarResourcesURL, 1, failures, skipOnDuplicates, progressMonitor);
              }
            }
          } else if (entryKind == IClasspathEntry.CPE_PROJECT) {
            IPath path = entry.getPath();
            IProject dependsOnProject = ResourcesPlugin.getWorkspace().getRoot().getProject(path.lastSegment());
            addModelsFromProject(modelGroup, dependsOnProject, searchedResources, searchedProjects, failures, skipOnDuplicates, progressMonitor, depth + 1);
          } else if (entryKind == IClasspathEntry.CPE_SOURCE) {
            visitedProject = true;
            project.accept(new ModelVisitor(project, modelGroup, searchedResources, failures, skipOnDuplicates, progressMonitor), IResource.DEPTH_INFINITE, IContainer.EXCLUDE_DERIVED);
          }
View Full Code Here

      } else {
        IPath parentPath = childPath.removeLastSegments(1);
        while (parentPath.segmentCount() > 0) {
          ArrayList parentChildren = (ArrayList) childrenMap.get(parentPath);
          if (parentChildren == null) {
            Object dir = new JarEntryDirectory(parentPath.lastSegment());
            jarEntries.put(parentPath, dir);
            childrenMap.put(parentPath, parentChildren = new ArrayList());
            parentChildren.add(childPath);
            if (parentPath.segmentCount() == 1) {
              topJarEntries.add(dir);
View Full Code Here

    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

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.