congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
IPath.addTrailingSeparator
Code IndexAdd Tabnine 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)

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

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Notification (javax.management)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top 17 Plugins for Android Studio
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