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

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

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

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

boolean isSourceFolderEmpty(IContainer sourceFolder) {
  String sourceFolderName = sourceFolder.getProjectRelativePath().addTrailingSeparator().toString();
  Object[] table = this.typeLocators.valueTable;
  for (int i = 0, l = table.length; i < l; i++)
    if (table[i] != null && ((String) table[i]).startsWith(sourceFolderName))
      return false;
  return true;
}

origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

boolean isSourceFolderEmpty(IContainer sourceFolder) {
  String sourceFolderName = sourceFolder.getProjectRelativePath().addTrailingSeparator().toString();
  Object[] table = this.typeLocators.valueTable;
  for (int i = 0, l = table.length; i < l; i++)
    if (table[i] != null && ((String) table[i]).startsWith(sourceFolderName))
      return false;
  return true;
}
 
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

boolean isSourceFolderEmpty(IContainer sourceFolder) {
  String sourceFolderName = sourceFolder.getProjectRelativePath().addTrailingSeparator().toString();
  Object[] table = this.typeLocators.valueTable;
  for (int i = 0, l = table.length; i < l; i++)
    if (table[i] != null && ((String) table[i]).startsWith(sourceFolderName))
      return false;
  return true;
}

origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

boolean isSourceFolderEmpty(IContainer sourceFolder) {
  String sourceFolderName = sourceFolder.getProjectRelativePath().addTrailingSeparator().toString();
  Object[] table = this.typeLocators.valueTable;
  for (int i = 0, l = table.length; i < l; i++)
    if (table[i] != null && ((String) table[i]).startsWith(sourceFolderName))
      return false;
  return true;
}

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

boolean isSourceFolderEmpty(IContainer sourceFolder) {
  String sourceFolderName = sourceFolder.getProjectRelativePath().addTrailingSeparator().toString();
  Object[] table = this.typeLocators.valueTable;
  for (int i = 0, l = table.length; i < l; i++)
    if (table[i] != null && ((String) table[i]).startsWith(sourceFolderName))
      return false;
  return true;
}

origin: org.eclipse.platform/org.eclipse.ui.intro

/**
 * Returns the parent folder of the given path.
 */
public static IPath getParentFolderPath(String contentFilePath) {
  IPath path = new Path(contentFilePath);
  path = path.removeLastSegments(1).addTrailingSeparator();
  return path;
}
origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin.equinox

public static String makeAbsolute(String original, String rootPath) {
  IPath path = new Path(original);
  // ensure we have a relative path to start with
  if (path.isAbsolute())
    return original;
  IPath root = new Path(rootPath);
  return root.addTrailingSeparator().append(original.replace(':', '}')).toOSString().replace('}', ':');
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.touchpoint.eclipse

public static String makeAbsolute(String original, String rootPath) {
  IPath path = new Path(original);
  // ensure we have a relative path to start with
  if (path.isAbsolute())
    return original;
  IPath root = new Path(rootPath);
  return root.addTrailingSeparator().append(original.replace(':', '}')).toOSString().replace('}', ':');
}
origin: liferay/liferay-ide

public String getInstallLocation() {
  if ((_fInstallLocation == null) && (_fUnderlyingResource != null)) {
    IProject project = _fUnderlyingResource.getProject();
    IPath path = project.getLocation();
    if (path != null) {
      path = path.addTrailingSeparator();
      return path.toString();
    }
    return null;
  }
  return _fInstallLocation;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

public String getInstallLocation() {
  if (fInstallLocation == null && fUnderlyingResource != null) {
    IPath path = fUnderlyingResource.getProject().getLocation();
    return path != null ? path.addTrailingSeparator().toString() : null;
  }
  return fInstallLocation;
}
origin: org.eclipse.equinox.p2.touchpoint/eclipse

public static String makeAbsolute(String original, String rootPath) {
  IPath path = new Path(original);
  // ensure we have a relative path to start with
  if (path.isAbsolute())
    return original;
  IPath root = new Path(rootPath);
  return root.addTrailingSeparator().append(original.replace(':', '}')).toOSString().replace('}', ':');
}
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.scout.sdk.deps/org.eclipse.pde.core

@Override
public String getInstallLocation() {
  // Ensure we have an underlying resource
  if (fUnderlyingResource == null) {
    return null;
  }
  IPath path = fUnderlyingResource.getLocation();
  if (path == null)
    return null;
  return path.removeLastSegments(2).addTrailingSeparator().toOSString();
}
origin: org.eclipse/org.eclipse.pde.core

public String getInstallLocation() {
  // Ensure we have an underlying resource
  if (fUnderlyingResource == null) {
    return null;
  }
  IPath path = fUnderlyingResource.getLocation();
  if(path == null)
    return null;
  return path.removeLastSegments(2).addTrailingSeparator().toOSString();
}
origin: org.eclipse/org.eclipse.pde.core

public String getInstallLocation() {
  IPath path = fUnderlyingResource.getLocation();
  return path == null ? null : path.removeLastSegments(1).addTrailingSeparator().toOSString();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private static boolean addToExclusions(IPath entryPath, CPListElement curr) {
  IPath[] exclusionFilters= (IPath[]) curr.getAttribute(CPListElement.EXCLUSION);
  if (!JavaModelUtil.isExcludedPath(entryPath, exclusionFilters)) {
    IPath pathToExclude= entryPath.removeFirstSegments(curr.getPath().segmentCount()).addTrailingSeparator();
    IPath[] newExclusionFilters= new IPath[exclusionFilters.length + 1];
    System.arraycopy(exclusionFilters, 0, newExclusionFilters, 0, exclusionFilters.length);
    newExclusionFilters[exclusionFilters.length]= pathToExclude;
    curr.setAttribute(CPListElement.EXCLUSION, newExclusionFilters);
    return true;
  }
  return false;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private static boolean addToExclusions(IPath entryPath, CPListElement curr) {
  IPath[] exclusionFilters= (IPath[]) curr.getAttribute(CPListElement.EXCLUSION);
  if (!JavaModelUtil.isExcludedPath(entryPath, exclusionFilters)) {
    IPath pathToExclude= entryPath.removeFirstSegments(curr.getPath().segmentCount()).addTrailingSeparator();
    IPath[] newExclusionFilters= new IPath[exclusionFilters.length + 1];
    System.arraycopy(exclusionFilters, 0, newExclusionFilters, 0, exclusionFilters.length);
    newExclusionFilters[exclusionFilters.length]= pathToExclude;
    curr.setAttribute(CPListElement.EXCLUSION, newExclusionFilters);
    return true;
  }
  return false;
}
origin: org.eclipse/org.eclipse.jdt.ui

private static boolean addToExclusions(IPath entryPath, CPListElement curr) {
  IPath[] exclusionFilters= (IPath[]) curr.getAttribute(CPListElement.EXCLUSION);
  if (!JavaModelUtil.isExcludedPath(entryPath, exclusionFilters)) {
    IPath pathToExclude= entryPath.removeFirstSegments(curr.getPath().segmentCount()).addTrailingSeparator();
    IPath[] newExclusionFilters= new IPath[exclusionFilters.length + 1];
    System.arraycopy(exclusionFilters, 0, newExclusionFilters, 0, exclusionFilters.length);
    newExclusionFilters[exclusionFilters.length]= pathToExclude;
    curr.setAttribute(CPListElement.EXCLUSION, newExclusionFilters);
    return true;
  }
  return false;
}

origin: org.eclipse.pde/org.eclipse.pde.api.tools

/**
 * Constructor
 */
private ApiBaselineManager(boolean framework) {
  if (framework) {
    ApiPlugin.getDefault().addSaveParticipant(this);
    savelocation = ApiPlugin.getDefault().getStateLocation().append(".api_profiles").addTrailingSeparator(); //$NON-NLS-1$
  }
}
origin: org.eclipse.xtext/ui

  protected URI computeTraceURI(URI uri, IJavaProject javaProject) throws JavaModelException {
    for (IPackageFragmentRoot root : javaProject.getPackageFragmentRoots())
      if (root.getKind() == IPackageFragmentRoot.K_SOURCE) {
        URI prefix = URI.createPlatformResourceURI(root.getResource().getFullPath().addTrailingSeparator().toString(), true);
        if (isPrefix(prefix, uri))
          return uri.deresolve(prefix).trimFragment().trimQuery();
      }
    return super.getURIForTrace(uri);
  }
}
org.eclipse.core.runtimeIPathaddTrailingSeparator

Javadoc

Returns a path with the same segments as this path but with a trailing separator added. This path must have at least one segment.

If this path already has a trailing separator, this path is returned.

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • setContentView (Activity)
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JCheckBox (javax.swing)
  • JPanel (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
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