Tabnine Logo
IPath.setDevice
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JButton (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Sublime Text for Python
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