Package org.eclipse.core.runtime

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


    IPath path = resouce.getFullPath();
    while (path != null && path.segmentCount() > 0) {
      if (path.equals(parentPath)) {
        return true;
      }
      path = path.removeLastSegments(1);
    }
    return false;
  }

  protected boolean supportsNamespaces(IScriptProject project) {
View Full Code Here


      } else if (includePath.getEntry() instanceof IResource) {
        IResource oldRes = (IResource) includePath.getEntry();

        if (renamedPath.isPrefixOf(oldRes.getFullPath())) {
          renamedPath = renamedPath
              .removeLastSegments(1)
              .append(destProjectName)
              .append(oldRes.getFullPath().removeFirstSegments(
                  renamedPath.segmentCount()));
          IResource newRes = null;
View Full Code Here

    IResource oldRes = fElement.getResource();
    IResource newRes = null;

    if (oldRes != null) {
      IPath renamedPath = oldRes.getFullPath();
      renamedPath = renamedPath.removeLastSegments(1).append(destName)
          .append(
              resource.getFullPath().removeFirstSegments(
                  renamedPath.segmentCount()));
      newRes = ResourcesPlugin.getWorkspace().getRoot().getFile(
          renamedPath);
View Full Code Here

    if (initPath.length() == 0) {
      initPath = ""; //$NON-NLS-1$
    } else {
      IPath entryPath = new Path(initPath);
      if (ArchieveFileFilter.isZipPath(entryPath)) {
        entryPath.removeLastSegments(1);
      }
      initPath = entryPath.toOSString();
    }
    return initPath;
  }
View Full Code Here

        problemMessage = NLS.bind(
            IDEWorkbenchMessages.ResourceGroup_pathOccupied,
            path.makeRelative());
        return false;
      }
      path = path.removeLastSegments(1);
    }
    return true;
  }

  /**
 
View Full Code Here

        if (newPath != null && newPath.trim().length() > 0) {
          if (!isIniFileSet
              || (fPHPIni.getText() == null || fPHPIni.getText()
                  .trim().length() == 0)) {
            IPath path = new Path(newPath);
            path = path.removeLastSegments(1);
            path = path.append(PHP_INI);
            if (path.toFile().exists()) {
              fPHPIni.setText(path.toOSString());
            }
          }
View Full Code Here

          editor, lineNumber);
      return editor;
    }

    IPath path = new Path(filePath);
    String parentPath = path.removeLastSegments(1).toOSString();
    IFileStore fileStore = EFS.getLocalFileSystem().getStore(
        new Path(parentPath));

    fileStore = fileStore.getChild(path.lastSegment());
View Full Code Here

        IPath localPath = path.setDevice(null).removeFirstSegments(
            rootPath.segmentCount());
        if (localPath.segmentCount() >= 1) {
          final IScriptFolder folder;
          if (localPath.segmentCount() > 1) {
            folder = root.getScriptFolder(localPath.removeLastSegments(1));
          } else {
            folder = root.getScriptFolder(Path.EMPTY);
          }
          module = folder.getSourceModule(localPath.lastSegment());
          break;
View Full Code Here

  // create target parent folder and grandparents
  IPath ParentFolders = new Path(target.toString()).removeLastSegments(1);
  for (int curfolder = ParentFolders.segmentCount() - 1; curfolder >= 0; curfolder--) {
      try {
    createNewFolder(project, ParentFolders.removeLastSegments(curfolder).toString(), null);
      } catch (CoreException e) {// ignore this error as the parent
               // folders may have been created yet
      }
  }
View Full Code Here

      // below are calculated values
      var = new EnvironmentVariable(ArduinoConst.ENV_KEY_JANTJE_PLATFORM_FILE, platformPath.toString());
      contribEnv.addVariable(var, confdesc);

      ArduinoHelpers.setProjectPathVariables(project, platformPath.removeLastSegments(1));
      ArduinoHelpers.setTheEnvironmentVariables(project, confdesc, false);

      try {
    ArduinoHelpers.addArduinoCodeToProject(project, confdesc);
      } catch (CoreException e1) {
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.