org.eclipse.core.runtime.Path.makeRelative()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.eclipse.core.runtime.Path.makeRelative()方法的一些代码示例,展示了Path.makeRelative()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.makeRelative()方法的具体详情如下:
包路径:org.eclipse.core.runtime.Path
类名称:Path
方法名:makeRelative

Path.makeRelative介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.resources

String filePath = url.getFile().trim();
filePath = URLDecoder.decode(filePath, "UTF-8"); //$NON-NLS-1$
IPath spec = new Path(filePath).makeRelative();
if (!spec.segment(0).equals(RESOURCE))
  throw new IOException(NLS.bind(Messages.url_badVariant, url));

代码示例来源:origin: org.eclipse.platform/org.eclipse.core.resources

String filePath = url.getFile().trim();
filePath = URLDecoder.decode(filePath, "UTF-8"); //$NON-NLS-1$
IPath spec = new Path(filePath).makeRelative();
if (!spec.segment(0).equals(RESOURCE))
  throw new IOException(NLS.bind(Messages.url_badVariant, url));

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources

String filePath = url.getFile().trim();
filePath = URLDecoder.decode(filePath, "UTF-8"); //$NON-NLS-1$
IPath spec = new Path(filePath).makeRelative();
if (!spec.segment(0).equals(RESOURCE))
  throw new IOException(NLS.bind(Messages.url_badVariant, url));

代码示例来源:origin: org.eclipse/org.eclipse.jdt.debug.ui

/**
 * @see org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock#setDefaultWorkingDir()
 */
protected void setDefaultWorkingDir() {
  String outputDir = JavaRuntime.getProjectOutputDirectory(getLaunchConfiguration());
  if (outputDir != null) {
    outputDir = new Path(outputDir).makeRelative().toOSString();
    setDefaultWorkingDirectoryText("${workspace_loc:"  + outputDir + "}");  //$NON-NLS-1$//$NON-NLS-2$
  } else {
    super.setDefaultWorkingDir();
  }        
}

代码示例来源:origin: org.eclipse.emf/cdo

if (branch != null)
 branchPath = new Path(branch).makeRelative();

代码示例来源:origin: com.b2international.snowowl/org.eclipse.emf.cdo

if (branch != null)
 branchPath = new Path(branch).makeRelative();

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

IPath pkgPath= new Path(pkgName.replace('.', IPath.SEPARATOR)).makeRelative();

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

IPath pkgPath= new Path(pkgName.replace('.', IPath.SEPARATOR)).makeRelative();

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

IPath pkgPath= new Path(pkgName.replace('.', IPath.SEPARATOR)).makeRelative();

相关文章