congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
IPath.toPortableString
Code IndexAdd Tabnine 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)

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

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getSystemService (Context)
  • getContentResolver (Context)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Reference (javax.naming)
  • BoxLayout (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now