Tabnine Logo
IPath.getDevice
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.eclipse/org.eclipse.jdt.ui

private boolean hasSameDevice(IPath p1, IPath p2) {
  String dev= p1.getDevice();
  if (dev == null) {
    return p2.getDevice() == null;
  }
  return dev.equals(p2.getDevice());
}
origin: org.eclipse/org.eclipse.ajdt.ui

private boolean hasSameDevice(IPath p1, IPath p2) {
  String dev= p1.getDevice();
  if (dev == null) {
    return p2.getDevice() == null;
  }
  return dev.equals(p2.getDevice());
}
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: 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.core

/**
 * Helper method - returns the {@link IResource} corresponding to the provided {@link IPath},
 * or <code>null</code> if no such resource exists.
 */
public static IResource getWorkspaceTarget(IPath path) {
  if (path == null || path.getDevice() != null)
    return null;
  IWorkspace workspace = ResourcesPlugin.getWorkspace();
  if (workspace == null)
    return null;
  return workspace.getRoot().findMember(path);
}

origin: org.eclipse.jdt/org.eclipse.jdt.ui

private boolean isWorkspacePath(IPath path) {
  if (path == null || path.getDevice() != null)
    return false;
  IWorkspace workspace= ResourcesPlugin.getWorkspace();
  if (workspace == null)
    return false;
  return workspace.getRoot().findMember(path) != null;
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Helper method - returns the {@link IResource} corresponding to the provided {@link IPath},
 * or <code>null</code> if no such resource exists.
 */
public static IResource getWorkspaceTarget(IPath path) {
  if (path == null || path.getDevice() != null)
    return null;
  IWorkspace workspace = ResourcesPlugin.getWorkspace();
  if (workspace == null)
    return null;
  return workspace.getRoot().findMember(path);
}

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

private boolean isWorkspacePath(IPath path) {
  if (path == null || path.getDevice() != null)
    return false;
  IWorkspace workspace= ResourcesPlugin.getWorkspace();
  if (workspace == null)
    return false;
  return workspace.getRoot().findMember(path) != null;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private boolean isWorkspacePath(IPath path) {
  if (path == null || path.getDevice() != null)
    return false;
  IWorkspace workspace= ResourcesPlugin.getWorkspace();
  if (workspace == null)
    return false;
  return workspace.getRoot().findMember(path) != null;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private boolean isWorkspacePath(IPath path) {
  if (path == null || path.getDevice() != null)
    return false;
  IWorkspace workspace= ResourcesPlugin.getWorkspace();
  if (workspace == null)
    return false;
  return workspace.getRoot().findMember(path) != null;
}
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Helper method - returns the {@link IResource} corresponding to the provided {@link IPath},
 * or <code>null</code> if no such resource exists.
 */
public static IResource getWorkspaceTarget(IPath path) {
  if (path == null || path.getDevice() != null)
    return null;
  IWorkspace workspace = ResourcesPlugin.getWorkspace();
  if (workspace == null)
    return null;
  return workspace.getRoot().findMember(path);
}
 
origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * Helper method - returns the {@link IResource} corresponding to the provided {@link IPath},
 * or <code>null</code> if no such resource exists.
 */
public static IResource getWorkspaceTarget(IPath path) {
  if (path == null || path.getDevice() != null)
    return null;
  IWorkspace workspace = ResourcesPlugin.getWorkspace();
  if (workspace == null)
    return null;
  return workspace.getRoot().findMember(path);
}

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.jst.j2ee.ui

/**
 * Answer the directory name specified as being the import source. Note that if it ends with a
 * separator then the separator is first removed so that java treats it as a proper directory
 */
private String getSourceDirectoryName(String sourceName) {
  IPath result = new Path(sourceName.trim());
  if (result.getDevice() != null && result.segmentCount() == 0) // something like "c:"
    result = result.addTrailingSeparator();
  else
    result = result.removeTrailingSeparator();
  return result.toOSString();
}
origin: org.eclipse.platform/org.eclipse.core.resources

/**
 * @deprecated use {@link #resolveURI(URI)} instead.
 */
@Override
@Deprecated
public IPath resolvePath(IPath path) {
  if (path == null || path.segmentCount() == 0 || path.isAbsolute() || path.getDevice() != null)
    return path;
  URI value = resolveURI(URIUtil.toURI(path));
  return value == null ? path : URIUtil.toPath(value);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources

/**
 * @deprecated use {@link #resolveURI(URI)} instead.
 */
@Override
@Deprecated
public IPath resolvePath(IPath path) {
  if (path == null || path.segmentCount() == 0 || path.isAbsolute() || path.getDevice() != null)
    return path;
  URI value = resolveURI(URIUtil.toURI(path));
  return value == null ? path : URIUtil.toPath(value);
}
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);
}
origin: org.eclipse.platform/org.eclipse.core.resources

/**
 * @see org.eclipse.core.resources.IPathVariableManager#resolvePath(IPath)
 */
@Deprecated
@Override
public IPath resolvePath(IPath path) {
  if (path == null || path.segmentCount() == 0 || path.isAbsolute() || path.getDevice() != null)
    return path;
  IPath value = getValue(path.segment(0));
  return value == null ? path : value.append(path.removeFirstSegments(1));
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources

/**
 * @see org.eclipse.core.resources.IPathVariableManager#resolvePath(IPath)
 */
@Deprecated
@Override
public IPath resolvePath(IPath path) {
  if (path == null || path.segmentCount() == 0 || path.isAbsolute() || path.getDevice() != null)
    return path;
  IPath value = getValue(path.segment(0));
  return value == null ? path : value.append(path.removeFirstSegments(1));
}
org.eclipse.core.runtimeIPathgetDevice

Javadoc

Returns the device id for this path, or null if this path has no device id. Note that the result will end in ':'.

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,
  • isEmpty,
  • addTrailingSeparator,
  • getFileExtension,
  • setDevice

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • 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
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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