本文整理了Java中org.eclipse.core.runtime.Path.addTrailingSeparator()
方法的一些代码示例,展示了Path.addTrailingSeparator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.addTrailingSeparator()
方法的具体详情如下:
包路径:org.eclipse.core.runtime.Path
类名称:Path
方法名:addTrailingSeparator
暂无
代码示例来源:origin: org.eclipse.pde/launching
public String[] getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
ArrayList programArgs = new ArrayList();
programArgs.add("-dev"); //$NON-NLS-1$
programArgs.add(ClasspathHelper.getDevEntriesProperties(getConfigDir(configuration).toString() + "/dev.properties", fAllBundles)); //$NON-NLS-1$
saveConfigurationFile(configuration);
programArgs.add("-configuration"); //$NON-NLS-1$
programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
String[] args = super.getProgramArguments(configuration);
for (int i = 0; i < args.length; i++) {
programArgs.add(args[i]);
}
return (String[]) programArgs.toArray(new String[programArgs.size()]);
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
@Override
public String[] getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
ArrayList<String> programArgs = new ArrayList<>();
programArgs.add("-dev"); //$NON-NLS-1$
programArgs.add(ClasspathHelper.getDevEntriesProperties(getConfigDir(configuration).toString() + "/dev.properties", fAllBundles)); //$NON-NLS-1$
saveConfigurationFile(configuration);
programArgs.add("-configuration"); //$NON-NLS-1$
programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
String[] args = super.getProgramArguments(configuration);
for (String arg : args) {
programArgs.add(arg);
}
return programArgs.toArray(new String[programArgs.size()]);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
/**
* Initializes this object's children table based on the contents of
* the specified source file.
*/
protected void initialize() {
children = new HashMap(1000);
Enumeration entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement();
if (!entry.isDirectory()) {
IPath path = new Path(entry.getName()).addTrailingSeparator();
int pathSegmentCount = path.segmentCount();
for (int i = 1; i < pathSegmentCount; i++) {
createContainer(path.uptoSegment(i));
}
createFile(entry);
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
/**
* Initializes this object's children table based on the contents of the
* specified source file.
*/
protected void initialize() {
children = new HashMap(1000);
children.put(root, new ArrayList());
Enumeration entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement();
IPath path = new Path(entry.getName()).addTrailingSeparator();
if (entry.isDirectory()) {
createContainer(path);
} else
{
// Ensure the container structure for all levels above this is initialized
// Once we hit a higher-level container that's already added we need go no further
int pathSegmentCount = path.segmentCount();
if (pathSegmentCount > 1) {
createContainer(path.uptoSegment(pathSegmentCount - 1));
}
createFile(entry);
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
/**
* Initializes this object's children table based on the contents of the
* specified source file.
*/
protected void initialize() {
children = new HashMap(1000);
children.put(root, new ArrayList());
Enumeration entries = tarFile.entries();
while (entries.hasMoreElements()) {
TarEntry entry = (TarEntry) entries.nextElement();
IPath path = new Path(entry.getName()).addTrailingSeparator();
if (entry.getFileType() == TarEntry.DIRECTORY) {
createContainer(path);
} else
{
// Ensure the container structure for all levels above this is initialized
// Once we hit a higher-level container that's already added we need go no further
int pathSegmentCount = path.segmentCount();
if (pathSegmentCount > 1) {
createContainer(path.uptoSegment(pathSegmentCount - 1));
}
createFile(entry);
}
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
protected void createSourceOutputBuildEntries(WorkspaceBuildModel model, IBuildModelFactory factory) throws CoreException {
String srcFolder = fData.getSourceFolderName();
if (!fData.isSimple() && srcFolder != null) {
String libraryName = fData.getLibraryName();
if (libraryName == null)
libraryName = "."; //$NON-NLS-1$
// SOURCE.<LIBRARY_NAME>
IBuildEntry entry = factory.createEntry(IBuildEntry.JAR_PREFIX + libraryName);
if (srcFolder.length() > 0)
entry.addToken(new Path(srcFolder).addTrailingSeparator().toString());
else
entry.addToken("."); //$NON-NLS-1$
model.getBuild().add(entry);
// OUTPUT.<LIBRARY_NAME>
entry = factory.createEntry(IBuildEntry.OUTPUT_PREFIX + libraryName);
String outputFolder = fData.getOutputFolderName().trim();
if (outputFolder.length() > 0)
entry.addToken(new Path(outputFolder).addTrailingSeparator().toString());
else
entry.addToken("."); //$NON-NLS-1$
model.getBuild().add(entry);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
File external = new File(location);
if (external.isDirectory()) {
IPath p = new Path(location).addTrailingSeparator().append(path);
exists = new File(p.toOSString()).exists();
} else
代码示例来源:origin: org.eclipse/org.eclipse.pde.core
File external = new File(location);
if (external.isDirectory()) {
IPath p = new Path(location).addTrailingSeparator().append(path);
exists = new File(p.toOSString()).exists();
} else
代码示例来源:origin: org.eclipse.pde/launching
if (!configuration.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
programArgs.add("-configuration"); //$NON-NLS-1$
programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
TargetPlatformHelper.checkPluginPropertiesConsistency(fAllBundles, getConfigDir(configuration));
programArgs.add("-configuration"); //$NON-NLS-1$
programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
if (!configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
programArgs.add("-configuration"); //$NON-NLS-1$
programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
TargetPlatformHelper.checkPluginPropertiesConsistency(fAllBundles, getConfigDir(configuration));
programArgs.add("-configuration"); //$NON-NLS-1$
programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
代码示例来源:origin: org.eclipse.pde/launching
programArgs.add("file:" + new Path(getConfigurationDirectory(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
代码示例来源:origin: org.eclipse/org.eclipse.pde.core
if (external.exists()) {
if (external.isDirectory()) {
IPath p = new Path(location).addTrailingSeparator().append(libname);
return new File(p.toOSString()).exists();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
if (external.exists()) {
if (external.isDirectory()) {
IPath p = new Path(location).addTrailingSeparator().append(libname);
return new File(p.toOSString()).exists();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
IPath path = new Path(tokens[i]).addTrailingSeparator();
SourceFolder sourceFolder = fSourceFolderMap.get(path);
if (sourceFolder == null) {
IPath path = new Path(tokens[i]).addTrailingSeparator();
if (path.segmentCount() == 1 && path.segment(0).equals(".")) { //$NON-NLS-1$
内容来源于网络,如有侵权,请联系作者删除!