Codota Logo
IPath.toPortableString
Code IndexAdd Codota to your IDE (free)

How to use
toPortableString
method
in
org.eclipse.core.runtime.IPath

Best Java code snippets using org.eclipse.core.runtime.IPath.toPortableString (Showing top 20 results out of 531)

  • Common ways to obtain IPath
private void myMethod () {
IPath i =
  • Codota IconString fullPath;new Path(fullPath)
  • Codota IconIResource resource;resource.getLocation()
  • Codota IconIResource resource;resource.getFullPath()
  • Smart code suggestions by Codota
}
origin: eclipse/buildship

  @Override
  public String apply(IPath path) {
    return path.toPortableString();
  }
});
origin: eclipse/buildship

  @Override
  public String apply(IPath linkedResource) {
    return linkedResource.toPortableString();
  }
});
origin: liferay/liferay-ide

public static String toPortableString(IPath path) {
  if (path == null) {
    return "";
  }
  return path.toPortableString();
}
origin: eclipse/eclipse.jdt.ls

public static String getWorkspaceInvisibleProjectName(IPath workspacePath) {
  String fileName = workspacePath.toFile().getName();
  String projectName = fileName + "_" + Integer.toHexString(workspacePath.toPortableString().hashCode());
  return projectName;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

boolean areFixed(IResource[] res) {
  for (int i = 0; i < res.length; i++) {
    String fullPath = res[i].getFullPath().toPortableString();
    if (!fFixedResources.containsKey(fullPath))
      return false;
  }
  return true;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private void xmlWriteJarLocation(JarPackageData jarPackage, Document document, Element xmlJarDesc) throws DOMException {
  Element jar= document.createElement(JarPackagerUtil.JAR_EXTENSION);
  xmlJarDesc.appendChild(jar);
  jar.setAttribute("path", jarPackage.getJarLocation().toPortableString()); //$NON-NLS-1$
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

private void savePath(IPath path) throws IOException {
  if (path == null) {
    this.out.writeBoolean(true);
  } else {
    this.out.writeBoolean(false);
    saveString(path.toPortableString());
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

private void xmlWriteJarLocation(JarPackageData jarPackage, Document document, Element xmlJarDesc) throws DOMException {
  Element jar= document.createElement(JarPackagerUtil.JAR_EXTENSION);
  xmlJarDesc.appendChild(jar);
  jar.setAttribute("path", jarPackage.getJarLocation().toPortableString()); //$NON-NLS-1$
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private void savePath(IPath path) throws IOException {
  if (path == null) {
    this.out.writeBoolean(true);
  } else {
    this.out.writeBoolean(false);
    saveString(path.toPortableString());
  }
}
origin: infinitest/infinitest

  private String relativePath(IPath path) {
    return path.removeFirstSegments(1).toPortableString();
  }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources

static private IPath convertToProperCase(IPath path) {
  if (Platform.getOS().equals(Platform.OS_WIN32))
    return Path.fromPortableString(path.toPortableString().toLowerCase());
  return path;
}
origin: org.eclipse.platform/org.eclipse.core.resources

static private IPath convertToProperCase(IPath path) {
  if (Platform.getOS().equals(Platform.OS_WIN32))
    return Path.fromPortableString(path.toPortableString().toLowerCase());
  return path;
}
origin: org.apache.uima/ruta-ep-ide-ui

private String makeAbsolute(String input, ILaunchConfiguration configuration)
    throws CoreException {
 IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(input);
 if (member != null) {
  return member.getLocation().toPortableString();
 }
 return input;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources

  public void setLinkLocation(IPath location, int updateFlags, IProgressMonitor monitor) throws CoreException {
    if (location.isAbsolute()) {
      setLinkLocation(URIUtil.toURI(location.toPortableString()), updateFlags, monitor);
    } else {
      try {
        setLinkLocation(new URI(null, null, location.toPortableString(), null), updateFlags, monitor);
      } catch (URISyntaxException e) {
        setLinkLocation(URIUtil.toURI(location.toPortableString()), updateFlags, monitor);
      }
    }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private static String encodePath(IPath path) {
  if (path == null) {
    return "#"; //$NON-NLS-1$
  } else if (path.isEmpty()) {
    return "&"; //$NON-NLS-1$
  } else {
    return encode(path.toPortableString());
  }
}
origin: io.sarl/io.sarl.eclipse

@Override
public StandardSREInstall clone() {
  final StandardSREInstall clone = (StandardSREInstall) super.clone();
  clone.jarFile = this.jarFile == null ? null : Path.fromPortableString(clone.jarFile.toPortableString());
  return clone;
}
origin: org.eclipse/org.eclipse.jdt.ui

private static String encodePath(IPath path) {
  if (path == null) {
    return "#"; //$NON-NLS-1$
  } else if (path.isEmpty()) {
    return "&"; //$NON-NLS-1$
  } else {
    return encode(path.toPortableString());
  }
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private static String encodePath(IPath path) {
  if (path == null) {
    return "#"; //$NON-NLS-1$
  } else if (path.isEmpty()) {
    return "&"; //$NON-NLS-1$
  } else {
    return encode(path.toPortableString());
  }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources

URI toURI(IPath path) {
  if (path.isAbsolute())
    return org.eclipse.core.filesystem.URIUtil.toURI(path);
  try {
    return new URI(null, null, path.toPortableString(), null);
  } catch (URISyntaxException e) {
    return org.eclipse.core.filesystem.URIUtil.toURI(path);
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public IClasspathAttribute performEdit(Shell shell, ClasspathAttributeAccess attribute) {
  String initialLocation= attribute.getClasspathAttribute().getValue();
  IPath locationPath= initialLocation == null ? null : new Path(initialLocation);
  IPath newPath= BuildPathDialogAccess.configureExternalAnnotationsAttachment(shell, locationPath);
  if(null == newPath)	// Was the dialog cancelled?
    return null;
  return JavaCore.newClasspathAttribute(IClasspathAttribute.EXTERNAL_ANNOTATION_PATH, newPath.segmentCount() == 0 ? null : newPath.toPortableString());
}
org.eclipse.core.runtimeIPathtoPortableString

Javadoc

Returns a platform-neutral string representation of this path. The format is not specified, except that the resulting string can be passed back to the Path#fromPortableString(String) constructor to produce the exact same path on any platform.

This string is suitable for passing to Path#fromPortableString(String).

Popular methods of IPath

  • toString
    Returns a string representation of this path, including its device id. The same separator, "/", is u
  • toFile
    Returns a java.io.File corresponding to this path.
  • toOSString
    Returns a string representation of this path which uses the platform-dependent path separator define
  • append
    Returns the canonicalized path obtained from the concatenation of the given path's segments to the e
  • segmentCount
    Returns the number of segments in this path. Note that both root and empty paths have 0 segments.
  • removeLastSegments
    Returns a copy of this path with the given number of segments removed from the end. The device id is
  • lastSegment
    Returns the last segment of this path, ornull if it does not have any segments.
  • removeFirstSegments
    Returns a copy of this path with the given number of segments removed from the beginning. The device
  • segment
    Returns the specified segment of this path, ornull if the path does not have such a segment.
  • equals
    Returns whether this path equals the given object. Equality for paths is defined to be: same sequenc
  • isAbsolute
    Returns whether this path is an absolute path (ignoring any device id). Absolute paths start with a
  • isPrefixOf
    Returns whether this path is a prefix of the given path. To be a prefix, this path's segments must a
  • isAbsolute,
  • isPrefixOf,
  • makeRelative,
  • makeAbsolute,
  • getDevice,
  • isEmpty,
  • addTrailingSeparator,
  • getFileExtension,
  • setDevice

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JList (javax.swing)
  • JTextField (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now