Examples of removeLastSegments()


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

            }
        }
        if (filePath != null) {
            final IPath path = new Path(filePath);
            IFileStore fileStore = EFS.getLocalFileSystem().getStore(
                    path.removeLastSegments(1));
            fileStore = fileStore.getChild(path.lastSegment());
            final IFileInfo fetchInfo = fileStore.fetchInfo();
            if (!fetchInfo.isDirectory() && fetchInfo.exists()) {
                if (element instanceof IErlModule
                        && element.getParent() instanceof IErlExternal) {
View Full Code Here

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

        final int n = ref.segmentCount();
        final List<String> result = Lists.newArrayList();
        for (final Iterator<String> iter = list.iterator(); iter.hasNext();) {
            final String element = iter.next();
            IPath p = new Path(element);
            p = p.removeLastSegments(1).removeFirstSegments(n).setDevice(null);
            String ps = p.toString();
            if ("".equals(ps)) {
                ps = ".";
            }
            if (result.indexOf(ps) < 0) {
View Full Code Here

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

 
  public Collection<IPath> justFolders(final Iterable<String> files) {
    final Function1<String, IPath> _function = new Function1<String, IPath>() {
      public IPath apply(final String it) {
        Path _path = new Path(it);
        return _path.removeLastSegments(1);
      }
    };
    Iterable<IPath> _map = IterableExtensions.<String, IPath>map(files, _function);
    return CollectionLiterals.<IPath>newLinkedHashSet(((IPath[])Conversions.unwrapArray(_map, IPath.class)));
  }
View Full Code Here

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

          pathString);
    } else {
      messageString = NLS
          .bind(
              PreferencesMessages.WizardDataTransfer_overwriteNameAndPathQuestion,
              path.lastSegment(), path.removeLastSegments(1)
                  .toOSString());
    }

    final MessageDialog dialog = new MessageDialog(getContainer()
        .getShell(), PreferencesMessages.Question, null, messageString,
View Full Code Here

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

      if (resource != null)
        rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(resource.getLocation());
    } else {
      rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path);
      while (rootInfo == null && path.segmentCount() > 0) {
        path = path.removeLastSegments(1);
        rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path);
      }
    }
  }
  if (rootInfo == null)
View Full Code Here

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

    // the FILTERTYPE expression!
    String tempRulesFileName = getTempRulesFileName();
    IPath path = new Path(tempRulesFileName);
    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, path.removeFileExtension()
            .lastSegment());
    String portableString = path.removeLastSegments(1).toPortableString();
    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { portableString });
    ae.setConfigParameterValue(RutaEngine.PARAM_ADDITIONAL_SCRIPTS, new String[0]);
    ae.setConfigParameterValue(RutaEngine.PARAM_RELOAD_SCRIPT, true);
    if (useDynamicAnchoring) {
      ae.setConfigParameterValue(RutaEngine.PARAM_DYNAMIC_ANCHORING, true);
View Full Code Here

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

    IPackageFragment packageFragment = null;
    if(!projectText.equals("")) {//$NON-NLS-1$
      try {
        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        IPath packageFragmentPath = new Path("/").append(projectText).append(moduleXmlPath.removeLastSegments(1));//$NON-NLS-1$
        packageFragmentPath = packageFragmentPath.append("client");//$NON-NLS-1$
        packageFragment = project.findPackageFragment(packageFragmentPath);
      } catch (JavaModelException e) {
        Activator.logException(e);
      }
View Full Code Here

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

    if(!projectText.equals("")) {//$NON-NLS-1$

      try {
        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        IPath packageFragmentPath = new Path("/").append(projectText).append(moduleXmlPath.removeLastSegments(1));//$NON-NLS-1$
        if(isImplCreation)
          packageFragmentPath = packageFragmentPath.append("server");//$NON-NLS-1$
        else
          packageFragmentPath = packageFragmentPath.append("client");//$NON-NLS-1$
        packageFragment = project.findPackageFragment(packageFragmentPath);
View Full Code Here

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

    if(!projectText.equals("")) {//$NON-NLS-1$
     
      try {
        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        IPath packageFragmentPath = new Path("/").append(projectText).append(moduleXmlPath.removeLastSegments(1));//$NON-NLS-1$
        packageFragment = project.findPackageFragment(packageFragmentPath);
      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
View Full Code Here

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

    IPackageFragment packageFragment = null;
    if (!projectText.equals("")) {//$NON-NLS-1$
      try {
        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        IPath packageFragmentPath = new Path("/").append(projectText).append(moduleXmlPath.removeLastSegments(1));//$NON-NLS-1$
        packageFragmentPath = packageFragmentPath.append("client");//$NON-NLS-1$
        packageFragment = project.findPackageFragment(packageFragmentPath);
      } catch (JavaModelException e) {
        Activator.logException(e);
      }
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.