Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Path


   * return _resourceManager.getResourceAsFile(relativePath); }
   */

  public InputStream getResourceAsStream(String relativePath) throws IOException {
    if (relativePath.startsWith("resources/")) {
      return FileLocator.toFileURL(FileLocator.find(Platform.getBundle(PLUGIN_ID), new Path(relativePath), null)).openStream();
    } else {
      return new FileInputStream(relativePath);
    }
  }
View Full Code Here


        List<LibrarySet> librarySets = new ArrayList<LibrarySet>(WGADesignerPlugin.getDefault().getLibrarySets().values());
       
        Iterator<LibrarySet> setIt = librarySets.iterator();
        while (setIt.hasNext()) {
          String id = setIt.next().getId();
          IPath currentSetPath = new Path(WGALibrarySetContainer.ID).append(id);
          if (_currentEntries != null) {
            // check if id is already in classpathentries
            for (IClasspathEntry entry : _currentEntries) {
              if (entry.getPath().equals(currentSetPath)) {
                setIt.remove();
View Full Code Here

    setControl(container);
  }

  public IClasspathEntry[] getNewContainers() {
    List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
    IPath containerPath = new Path(WGALibrarySetContainer.ID)
    TableItem[] items = _tabLibraries.getItems();
    for (TableItem item : items) {
      if (item.getChecked()) {
        LibrarySet librarySet = (LibrarySet) item.getData();
        entries.add(JavaCore.newContainerEntry(containerPath.append(librarySet.getId())));
      }
    }             
    return entries.toArray(new IClasspathEntry[0]);
  }
View Full Code Here

 
 
  private List<IPath> getClasspath(File catalinaHome, File javaHome) {
    ArrayList<IPath> classpath = new ArrayList<IPath>();   
   
    classpath.add(new Path(catalinaHome.getAbsolutePath()).append("bin").append("bootstrap.jar"));
    //classpath.add(new Path(javaHome.getAbsolutePath()).append("lib").append("tools.jar"));
    return classpath;
  }
View Full Code Here

      IFolder[] designs = currentRuntime.getDesignsAsFolder(false);
      for (IFolder folder : designs) {
        if (WGADesignStructureHelper.isDirlinkFolder(folder)) {
          File target = WGUtils.resolveDirLink(folder.getLocation().toFile());
          IPath targetPath;
          targetPath = new Path(target.getCanonicalPath());
          // check if targetpath is effected by change
          if (container.getLocation().isPrefixOf(targetPath)) {
            DirlinkRefactoringInformation info = new DirlinkRefactoringInformation(container, arguments);
            info.setFile(folder.getFile(WGUtils.DIRLINK_FILE));
            links.add(info);
          }
        }
      }
     
      IFolder[] plugins = currentRuntime.getPluginsAsFolder(false);
      for (IFolder folder : plugins) {
        if (WGADesignStructureHelper.isDirlinkFolder(folder)) {
          File target = WGUtils.resolveDirLink(folder.getLocation().toFile());
          IPath targetPath;
          targetPath = new Path(target.getCanonicalPath());
          // check if targetpath is effected by change
          if (container.getLocation().isPrefixOf(targetPath)) {
            DirlinkRefactoringInformation info = new DirlinkRefactoringInformation(container, arguments);
            info.setFile(folder.getFile(WGUtils.DIRLINK_FILE));
            links.add(info);
View Full Code Here

      cpEntry.setClasspathProperty(IRuntimeClasspathEntry.USER_CLASSES);
      classpathMementos.add(cpEntry.getMemento());
    }
   
    if (bootClasspath.length == 0) {   
      IPath systemLibsPath = new Path(JavaRuntime.JRE_CONTAINER);
      IRuntimeClasspathEntry systemLibsEntry = JavaRuntime.newRuntimeContainerClasspathEntry(systemLibsPath,IRuntimeClasspathEntry.STANDARD_CLASSES);
      classpathMementos.add(systemLibsEntry.getMemento());
    } else {
      for (int i = 0; i < bootClasspath.length; i++) {
        IRuntimeClasspathEntry cpEntry = JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(bootClasspath[i]));
        cpEntry.setClasspathProperty(IRuntimeClasspathEntry.BOOTSTRAP_CLASSES);
        classpathMementos.add(cpEntry.getMemento());
      }
    }
View Full Code Here

 
  private boolean isWGAPublisherProject(IProject project) {
    IFolder webContent = project.getFolder("WebContent");
    if (webContent.exists()) {
      IFolder webinf = webContent.getFolder("WEB-INF");
      if (webinf.exists() && webinf.exists(new Path("web.xml"))) {
        // TODO check web.xml for WGACore
        return true;
      }
    }
    return false;
View Full Code Here

    if (monitor == null) {
      monitor = new NullProgressMonitor();
    }
    try {
      monitor.beginTask("Incremental updating wga deployment.", 1);
      IResourceDelta delta = projectDelta.findMember(new Path("WebContent"));
      if (delta != null) {
        IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() {

          public boolean visit(IResourceDelta delta) throws CoreException {
            if (delta.getResource() != null) {
View Full Code Here

    return true;
  }

  private static File getImageFile(long id) {
    IPath path = new Path(Activator.getDefault().getStateLocation().toOSString());
    path = path.append(ICONS_FOLDER);
    File root = new File(path.toOSString());
    if (!root.exists())
      root.mkdir();

    path = path.append(id + ".ico");

    return new File(path.toOSString());
  }
View Full Code Here

    Activator activator = Activator.getDefault();
    if (activator == null)
      return null;

    IPath path = new Path(activator.getStateLocation().toOSString());
    path = path.append(ICONS_FOLDER);
    File root = new File(path.toOSString());
    if (!root.exists())
      res = root.mkdir();
    else
      res = true;

    path = path.append(fileName);

    if (!res)
      return null;

    return new File(path.toOSString());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.Path

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.