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

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

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

  • 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: org.eclipse.jdt/org.eclipse.jdt.core

@Override
IPath buildChildPath(IPath parent, String key) {
  IPath nextPath = Path.EMPTY.append(parent);
  nextPath.setDevice(key);
  return nextPath;
}

origin: org.eclipse.tycho/org.eclipse.jdt.core

@Override
IPath buildChildPath(IPath parent, String key) {
  IPath nextPath = Path.EMPTY.append(parent);
  nextPath.setDevice(key);
  return nextPath;
}

origin: org.eclipse.platform/org.eclipse.equinox.p2.core

@Override
public IPath computePath(File source) {
  IPath result = new Path(source.getAbsolutePath());
  IPath rootPath = new Path(root.getAbsolutePath());
  result = result.removeFirstSegments(rootPath.matchingFirstSegments(result));
  return result.setDevice(null);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.core

public IPath computePath(File source) {
  IPath sourcePath = new Path(source.getAbsolutePath());
  sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep));
  return sourcePath.setDevice(null);
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher.eclipse

public IPath computePath(File source) {
  String prefix = filesMap.get(source);
  IPath result = null;
  if (prefix.startsWith(PROVIDED_PATH)) {
    // the desired path is provided in the map
    result = new Path(prefix.substring(10));
  } else {
    //else the map contains a prefix which must be stripped from the path
    result = new Path(source.getAbsolutePath());
    IPath rootPath = new Path(prefix);
    result = result.removeFirstSegments(rootPath.matchingFirstSegments(result));
  }
  return result.setDevice(null);
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.core

public IPath computePath(File source) {
  IPath result = new Path(source.getAbsolutePath());
  IPath rootPath = new Path(root.getAbsolutePath());
  result = result.removeFirstSegments(rootPath.matchingFirstSegments(result));
  return result.setDevice(null);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.core

public IPath computePath(File source) {
  IPath result = new Path(source.getAbsolutePath());
  IPath rootPath = new Path(root.getAbsolutePath());
  result = result.removeFirstSegments(rootPath.matchingFirstSegments(result));
  return result.setDevice(null);
}
origin: org.eclipse.equinox.p2/core

public IPath computePath(File source) {
  IPath result = new Path(source.getAbsolutePath());
  IPath rootPath = new Path(root.getAbsolutePath());
  result = result.removeFirstSegments(rootPath.matchingFirstSegments(result));
  return result.setDevice(null);
}
origin: org.eclipse.equinox.p2/core

public IPath computePath(File source) {
  IPath sourcePath = new Path(source.getAbsolutePath());
  sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep));
  return sourcePath.setDevice(null);
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.core

@Override
public IPath computePath(File source) {
  IPath sourcePath = new Path(source.getAbsolutePath());
  sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep));
  return sourcePath.setDevice(null);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

public LocalSite(IPath path) {
  if (path.getDevice() != null)
    fPath = path.setDevice(path.getDevice().toUpperCase(Locale.ENGLISH));
  else
    fPath = path;
  fPlugins = new ArrayList<>();
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.core

public IPath computePath(File source) {
  IPath sourcePath = new Path(source.getAbsolutePath());
  sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep));
  return sourcePath.setDevice(null);
}
origin: eclipse/eclipse.jdt.ls

private IPath fixDevice(IPath path) {
  if (path != null && path.getDevice() != null) {
    return path.setDevice(path.getDevice().toUpperCase());
  }
  if (Platform.OS_WIN32.equals(Platform.getOS()) && path != null && path.toString().startsWith("//")) {
    String server = path.segment(0);
    String pathStr = path.toString().replace(server, server.toUpperCase());
    return new Path(pathStr);
  }
  return path;
}
origin: org.eclipse/org.eclipse.pde.core

public LocalSite(IPath path) {
  if (path.getDevice() != null)
    fPath = path.setDevice(path.getDevice().toUpperCase(Locale.ENGLISH));
  else
    fPath = path;
  fPlugins = new ArrayList();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public IPath getPathExtension() {
  return new Path(getText()).removeFirstSegments(1).setDevice(null);
}
origin: org.eclipse/org.eclipse.jdt.ui

public IPath getPathExtension() {
  return new Path(getText()).removeFirstSegments(1).setDevice(null);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

  public String[] getRelativePluginList() {
    String[] list = new String[fPlugins.size()];
    for (int i = 0; i < fPlugins.size(); i++) {
      IPluginModelBase model = fPlugins.get(i);
      IPath location = new Path(model.getInstallLocation());
      // defect 37319
      if (location.segmentCount() > 2)
        location = location.removeFirstSegments(location.segmentCount() - 2);
      //31489 - entry must be relative
      list[i] = location.setDevice(null).makeRelative().toString();
    }
    return list;
  }
}
origin: org.openl/org.openl.eclipse.ui

static public IResource findWorkspaceResource(IPath path) {
  IWorkspaceRoot ws = ResourcesPlugin.getWorkspace().getRoot();
  IPath wsPath = ws.getLocation();
  if (wsPath.isPrefixOf(path)) {
    path = path.removeFirstSegments(wsPath.segmentCount());
    path = path.setDevice(null);
  }
  return ws.findMember(path);
}
origin: org.eclipse/org.eclipse.pde.core

public void load(BundleDescription description, PDEState state) {
  IPath path = new Path(description.getLocation());
  String device = path.getDevice();
  if (device != null)
    path = path.setDevice(device.toUpperCase());
  setInstallLocation(path.toOSString());
  fLocalization = state.getBundleLocalization(description.getBundleId());
  super.load(description, state);
}
  
origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

@Override
public void load(BundleDescription description, PDEState state) {
  IPath path = new Path(description.getLocation());
  String device = path.getDevice();
  if (device != null)
    path = path.setDevice(device.toUpperCase());
  setInstallLocation(path.toOSString());
  fLocalization = state.getBundleLocalization(description.getBundleId());
  super.load(description, state);
}
org.eclipse.core.runtimeIPathsetDevice

Javadoc

Returns a new path which is the same as this path but with the given device id. The device id must end with a ":". A device independent path is obtained by passing null.

For example, "C:" and "Server/Volume:" are typical device ids.

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,
  • toPortableString,
  • makeRelative,
  • makeAbsolute,
  • getDevice,
  • isEmpty,
  • addTrailingSeparator,
  • getFileExtension

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • getSystemService (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Path (java.nio.file)
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • BoxLayout (javax.swing)
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