Codota Logo
IPath.getDevice
Code IndexAdd Codota 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)

  • 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/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

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • findViewById (Activity)
  • orElseThrow (Optional)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
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