Package org.eclipse.core.runtime

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


            String referencePath = null;
            reference = reference.toLowerCase();
            if (reference.startsWith("::")) {
                String tmpPath = "/";
                for (int i = 0; i < relativePathToMediumFolder.segmentCount(); i++) {
                    tmpPath += relativePathToMediumFolder.segment(i) + "/";
                }

                referencePath = reference.replace("::", tmpPath);
                referencePath = referencePath.replaceAll(":", "/");
View Full Code Here


      String referencePath = null;
      reference = reference.toLowerCase();
      if (reference.startsWith("::")) {
        String tmpPath = scriptType + "/";
        for (int i = 0; i < relativePathToMediumFolder.segmentCount(); i++) {
          tmpPath += relativePathToMediumFolder.segment(i) + "/";
        }

        referencePath = reference.replace("::", tmpPath);
        referencePath = referencePath.replaceAll(":", "/");
View Full Code Here

        if (pathOfEditedFile.segmentCount() > 0 && (currentFilePath.segmentCount() >= pathOfEditedFile.segmentCount()) && medium.equals(mymedium)) {
          int a = currentFilePath.segmentCount();
          int b = pathOfEditedFile.segmentCount();
          tmp = currentFilePath.removeLastSegments(a - b);
          if (tmp.equals(pathOfEditedFile)) {
            currentFilePath = currentFile.removeFirstSegments(tmp.segmentCount());
            tmlfilerefs.add("::" + currentFilePath.toString().replaceAll("\\/", ":"));
          }

        }
View Full Code Here

              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());
View Full Code Here

              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());
View Full Code Here

              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("\\/", ":"));
                    }
View Full Code Here

               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

        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();
View Full Code Here

              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

                IClasspathEntry[] entries = new IClasspathEntry[sourceLength
                    + libLength];
                for (int i = 0; i < sourceLength; i++) {
                    IPath sourcePath = new Path(sourceFolders[i]);
                    int segmentCount = sourcePath.segmentCount();
                    if (segmentCount > 0) {
                        // create folder and its parents
                        IContainer container = project;
                        for (int j = 0; j < segmentCount; j++) {
                            IFolder folder = container.getFolder(new Path(
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.