Examples of IPath


Examples of org.eclipse.core.runtime.IPath

    _tmlMetadataFileListener = new TMLMetadataFileMaintainer();
    ResourcesPlugin.getWorkspace().addResourceChangeListener(_tmlMetadataFileListener, IResourceChangeEvent.POST_CHANGE|IResourceChangeEvent.PRE_BUILD);   
    _projectBuilderManager = new ProjectBuilderManager();
    ResourcesPlugin.getWorkspace().addResourceChangeListener(_projectBuilderManager, IResourceChangeEvent.POST_CHANGE|IResourceChangeEvent.PRE_BUILD);
    _projectBuilderManager.performPluginStartup();     
    IPath stateLocation = getStateLocation();   

        _headerFileMap.put(HEADER_TML_MODUL, new HeaderHandler(HEADER_TML_MODUL, stateLocation.append("defaultTmlModulLicense.txt").toFile(), "TML-Modules"));
        _headerFileMap.put(HEADER_CSS_MODUL, new HeaderHandler(HEADER_CSS_MODUL, stateLocation.append("defaultCssModulLicense.txt").toFile(), "CSS-Modules"));
        _headerFileMap.put(HEADER_JS_MODUL, new HeaderHandler(HEADER_JS_MODUL, stateLocation.append("defaultJsModulLicense.txt").toFile(), "JS-Modules"));
        _headerFileMap.put(HEADER_TMLSCRIPT_MODUL, new HeaderHandler(HEADER_TMLSCRIPT_MODUL, stateLocation.append("defaultTmlScriptModulLicense.txt").toFile(), "TMLScripts-Modules"));
        _headerFileMap.put(HEADER_VBS_MODUL, new HeaderHandler(HEADER_VBS_MODUL, stateLocation.append("defaultVbsModulLicense.txt").toFile(), "VBS-Modules"));
        _headerFileMap.put(HEADER_XML_MODUL, new HeaderHandler(HEADER_XML_MODUL, stateLocation.append("defaultXmlModulLicense.txt").toFile(), "XML-Modules"));     

  }
View Full Code Here

Examples of org.eclipse.core.runtime.IPath

        while (containers.hasNext()) {
           
            IFolder container = containers.next();
           
            if (versionCompliance != null && versionCompliance.toWGAVersion() != null && versionCompliance.toWGAVersion().isAtLeast(5, 4)) {                               
                IPath refPath = container.getFullPath().makeRelativeTo(helper.getFileContainerRoot().getFullPath());
              references.add(refPath.toString().toLowerCase().replaceAll("\\/",":"));
             
              IPath activeFolderPath = activeFile.getParent().getFullPath().makeRelativeTo(helper.getTmlRoot().getFullPath());
              // remove medium
              activeFolderPath = activeFolderPath.removeFirstSegments(1);
               if (activeFolderPath.segmentCount() > 0 && (refPath.segmentCount() >= activeFolderPath.segmentCount())) {
                    int a = refPath.segmentCount();
                    int b = activeFolderPath.segmentCount();
                    IPath tmp = refPath.removeLastSegments(a - b);
                    if (tmp.equals(activeFolderPath)) {
                        refPath = refPath.removeFirstSegments(tmp.segmentCount());
                        references.add("::" + refPath.toString().replaceAll("\\/", ":"));
                    }
   
                }
            } else {
View Full Code Here

Examples of org.eclipse.core.runtime.IPath

        String medium = WGADesignStructureHelper.determineMediaKey(activeFile);
       
        ResourceIndexManager rsm = Plugin.getDefault().getResourceIndexManager();
        if (rsm != null) {
          // the path to the file which we are currently editing
          IPath pathOfEditedFile = activeFile.getParent().getProjectRelativePath();
          // the path of the medium of the current file
          IPath mediumPath = designHelper.getTmlRoot().getFolder(new Path(medium)).getProjectRelativePath();
          pathOfEditedFile = pathOfEditedFile.removeFirstSegments(mediumPath.segmentCount());
                         
          Iterator<String> scriptPaths = rsm.getScriptPaths(designRoot, type).iterator();
         
          while (scriptPaths.hasNext()) {
            String scriptPath = scriptPaths.next();
           
            // scriptfile path
            IPath scriptFile = new Path(scriptPath).removeFileExtension();
   
            // path of the current file
            IPath currentFilePath = scriptFile.removeLastSegments(1);
   
            // removing the path of the selected medium
            currentFilePath = currentFilePath.removeFirstSegments(mediumPath.segmentCount());
   
            // removing the path of the elected medium
            scriptFile = scriptFile.removeFirstSegments(mediumPath.segmentCount());
   
            IPath tmp = null;
            if (currentFilePath.segmentCount() >= pathOfEditedFile.segmentCount()) {
   
              int a = currentFilePath.segmentCount();
              int b = pathOfEditedFile.segmentCount();
              tmp = currentFilePath.removeLastSegments(a - b);
              if (tmp.equals(pathOfEditedFile)) {
   
                currentFilePath = scriptFile.removeFirstSegments(tmp.segmentCount());
   
                references.add("::" + currentFilePath.toString().replaceAll("\\/", ":"));
   
              } else {
                  String reference = scriptFile.toString().replaceAll("\\/", ":");
View Full Code Here

Examples of org.eclipse.core.runtime.IPath

    try {
      plugin = this;
     
      // #00000046 - try to init library sets as early as possible
      Bundle bundle = Platform.getBundle(PLUGIN_ID);      
      IPath path = new Path("resources/librarySets");
      URL librarySetURL = FileLocator.find(bundle, path, null);      
      File librarySetsDir = new File(FileLocator.toFileURL(librarySetURL).getPath());
 
      DirectoryLibrarySet j2ee13 = new DirectoryLibrarySet(LIBRARY_SET_J2EE_1_3);
      j2ee13.setName("Partial J2EE 1.3");
View Full Code Here

Examples of org.eclipse.core.runtime.IPath

        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

Examples of org.eclipse.core.runtime.IPath

    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

Examples of org.eclipse.core.runtime.IPath

      WGARuntime currentRuntime = allRuntimes.get(itRT.next());
      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));
View Full Code Here

Examples of org.eclipse.core.runtime.IPath

    if (info.getArguments() instanceof RenameArguments) {
      RenameArguments arguments = (RenameArguments) info.getArguments();
      IContainer currentDirLinkTarget = WGADesignStructureHelper.resolveDirLink(info.getFile());
     
      // compute newTargetPath up to renamed resource
      IPath newTarget = info.getElement().getLocation().removeLastSegments(1).append(arguments.getNewName());
     
      // build full target path
      int segments = currentDirLinkTarget.getLocation().matchingFirstSegments(newTarget);
      newTarget = newTarget.append(currentDirLinkTarget.getLocation().removeFirstSegments(segments + 1));
      return newTarget;
    }else if(info.getArguments() instanceof MoveArguments){
      MoveArguments moveArguments = (MoveArguments) info.getArguments();
      IContainer currentDirLinkTarget = WGADesignStructureHelper.resolveDirLink(info.getFile());
      if(moveArguments.getDestination() instanceof IContainer){
        IContainer destinationContainer = (IContainer)moveArguments.getDestination();
       
        IPath newTarget = destinationContainer.getLocation().append(info.getElement().getName());   
       
        int segments = currentDirLinkTarget.getLocation().matchingFirstSegments(((IFolder)info.getElement()).getLocation());       
       
        newTarget = newTarget.append(currentDirLinkTarget.getLocation().removeFirstSegments(segments));
     
       
       
        return newTarget;
      }   
View Full Code Here

Examples of org.eclipse.core.runtime.IPath

   
    List<String> classpathMementos = new ArrayList<String>();
   
    Iterator<IPath> classPathEntries = classpath.iterator();
    while (classPathEntries.hasNext()) {
      IPath cpPath = classPathEntries.next();
      IRuntimeClasspathEntry cpEntry = JavaRuntime.newArchiveRuntimeClasspathEntry(cpPath);   
      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]));
View Full Code Here

Examples of org.eclipse.core.runtime.IPath

        IPackageFragmentRoot[] roots = project.getPackageFragmentRoots();
        for (int ri = 0; ri < roots.length; ri++) {
          IPackageFragmentRoot root = roots[ri];         
          if (root.isExternal()) {
            IPath location = root.getPath();
            if (external.contains(location)) {
              continue;
            }
            external.add(location);
          }
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.