Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Path


  }

  private static IFile lookupFileReference(String referencePath, IFolder folder) {
    if (referencePath != null) {
      // first try - use unmodified referencePath
      IFile referenceFile = folder.getFile(new Path(referencePath));
      if (referenceFile.exists()) {
        return referenceFile;
      }

      // second try - lowercase referencePath
      referenceFile = folder.getFile(new Path(referencePath.toLowerCase()));
      if (referenceFile.exists()) {
        return referenceFile;
      }

      // third try - case insensitiv match on all files in folder
View Full Code Here


  }
 
     private static IFolder lookupFolderReference(String referencePath, IFolder folder) {
          if (referencePath != null) {
              // first try - use unmodified referencePath
              IFolder referenceFolder = folder.getFolder(new Path(referencePath));
              if (referenceFolder.exists()) {
                  return referenceFolder;
              }

              // second try - lowercase referencePath
              referenceFolder = folder.getFolder(new Path(referencePath.toLowerCase()));
              if (referenceFolder.exists()) {
                  return referenceFolder;
              }

              // third try - case insensitiv match on all files in folder
View Full Code Here

  }

  public IFolder getLabelContainer(String language, boolean createIfMissing) throws CoreException {
    IFolder container = getFileContainer("labels_" + language.toLowerCase());
    if (container == null) {
      container = getFileContainerRoot().getFolder(new Path("labels_" + language.toLowerCase()));
    }
    if (!container.exists()) {
      container.create(false, true, new NullProgressMonitor());
    }
    return container;
View Full Code Here

   
  }

  public void createLabel(String labelFileName, String key, String value) throws CoreException {
    IFolder labelContainer = getLabelContainer(getDevelopmentLanguage(), true);
    IFile labelFile = labelContainer.getFile(new Path(labelFileName.toLowerCase()) + ".properties");
    createLabel(labelFile, key, value);
  }
View Full Code Here

   *
   * @param tmlfile
   * @return metadata file (must not exist)
   */
  public static IFile getMetadataFile(IFile tmlfile) {
    IFolder metadataFolder = tmlfile.getParent().getFolder(new Path("metadata"));
    return metadataFolder.getFile(tmlfile.getName().substring(0, tmlfile.getName().length() - tmlfile.getFileExtension().length()) + "metadata.xml");
  }
View Full Code Here

      return isWGADesignResource((IFile)resource);
    } else if (resource instanceof IContainer) {
      IContainer parent = (IContainer)resource;
      while (parent instanceof IFolder) {
        parent = parent.getParent();
        IFile syncInfo = parent.getFile(new Path(DesignDirectory.DESIGN_DEFINITION_FILE));
        if (syncInfo.exists()) {
          return true;
        }
        syncInfo = parent.getFile(new Path(DesignDirectory.SYNCINFO_FILE));
        if (syncInfo.exists()) {
          return true;
        }
      }
      return false;
View Full Code Here

    File linkedFile = WGUtils.resolveDirLink(file.getParent().getLocation().toFile());
    return  (IContainer) file.getWorkspace().getRoot().findContainersForLocationURI(linkedFile.toURI())[0];
  }
 
  public static IContainer resolveDirLink(IContainer container) {
    return resolveDirLink(container.getFile(new Path(WGUtils.DIRLINK_FILE)));
  }
View Full Code Here

    init(determineSyncInfo(anyDesignResource));
  }

  public WGADesignStructureHelper(IContainer designRoot) {
    File designInfoFile = DesignDirectory.getDesignDefinitionFile(designRoot.getLocation().toFile());
    init(designRoot.getFile(new Path(designInfoFile.getName())));
  }
View Full Code Here

  }

  private void init(IFile syncInfo) {
    _syncInfo = syncInfo;
    _designRoot = _syncInfo.getParent();
    _fileContainerRoot = _designRoot.getFolder(new Path("files"));
    _csConfig = _fileContainerRoot.getFolder("system").getFile("csconfig.xml");
    _scriptsRoot = _designRoot.getFolder(new Path("scripts"));
    _tmlRoot = _designRoot.getFolder(new Path("tml"));
    _schemaDefinition= _fileContainerRoot.getFolder("system").getFile("schema.xml");
  }
View Full Code Here

 
  public static IFile determineSyncInfo(IContainer container) {   
    IContainer parent = container;
    while (parent instanceof IFolder) {
      parent = parent.getParent();
      IFile syncInfo = parent.getFile(new Path(DesignDirectory.DESIGN_DEFINITION_FILE));
      if (syncInfo.exists()) {
        return syncInfo;
      }
      syncInfo = parent.getFile(new Path(DesignDirectory.SYNCINFO_FILE));
      if (syncInfo.exists()) {
        return syncInfo;
      }
    }
    return null;
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.