热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.eclipse.core.resources.IProject.getPathVariableManager()方法的使用及代码示例

本文整理了Java中org.eclipse.core.resources.IProject.getPathVariableManager()方法的一些代码示例,展示了

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

IProject.getPathVariableManager介绍

暂无

代码示例

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

private String getSuitablePathVariable(IPath commonPath) {
String variableName = commonPath.lastSegment();
if (variableName == null) {
variableName = commonPath.getDevice();
if (variableName == null)
variableName = "ROOT"; //$NON-NLS-1$
else
variableName = variableName.substring(0, variableName.length() -1); // remove the tailing ':'
}
StringBuffer buf = new StringBuffer();
for (int i = 0; i char c = variableName.charAt(i);
if (Character.isLetterOrDigit(c) || (c == '_'))
buf.append(c);
else
buf.append('_');
}
variableName = buf.toString();
int index = 1;
while (fProject.getPathVariableManager().isDefined(variableName)) {
variableName += index;
index++;
}
return variableName;
}

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

for (LinkDescription link : links.values()) {
IResource resource = project.findMember(link.getProjectRelativePath());
IPathVariableManager pathMan = resource == null ? project.getPathVariableManager() : resource.getPathVariableManager();
testLocation = pathMan.resolveURI(link.getLocationURI());

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

for (LinkDescription link : links.values()) {
IResource resource = project.findMember(link.getProjectRelativePath());
IPathVariableManager pathMan = resource == null ? project.getPathVariableManager() : resource.getPathVariableManager();
testLocation = pathMan.resolveURI(link.getLocationURI());

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

for (LinkDescription link : links.values()) {
IResource resource = project.findMember(link.getProjectRelativePath());
IPathVariableManager pathMan = resource == null ? project.getPathVariableManager() : resource.getPathVariableManager();
testLocation = pathMan.resolveURI(link.getLocationURI());

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

public IStatus validateProjectLocation(IProject context, IPath unresolvedLocation) {
if (unresolvedLocation == null)
return validateProjectLocationURI(context, null);
IPath location;
if (context != null)
location = context.getPathVariableManager().resolvePath(unresolvedLocation);
else
location = workspace.getPathVariableManager().resolvePath(unresolvedLocation);
//check that the location is absolute
if (!location.isAbsolute()) {
String message;
if (location.segmentCount() > 0)
message = NLS.bind(Messages.pathvar_undefined, location.toString(), location.segment(0));
else
message = Messages.links_noPath;
return new ResourceStatus(IResourceStatus.VARIABLE_NOT_DEFINED, null, message);
}
return validateProjectLocationURI(context, URIUtil.toURI(location));
}

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

public IStatus validateProjectLocation(IProject context, IPath unresolvedLocation) {
if (unresolvedLocation == null)
return validateProjectLocationURI(context, null);
IPath location;
if (context != null)
location = context.getPathVariableManager().resolvePath(unresolvedLocation);
else
location = workspace.getPathVariableManager().resolvePath(unresolvedLocation);
//check that the location is absolute
if (!location.isAbsolute()) {
String message;
if (location.segmentCount() > 0)
message = NLS.bind(Messages.pathvar_undefined, location.toString(), location.segment(0));
else
message = Messages.links_noPath;
return new ResourceStatus(IResourceStatus.VARIABLE_NOT_DEFINED, null, message);
}
return validateProjectLocationURI(context, URIUtil.toURI(location));
}

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

public IStatus validateProjectLocation(IProject context, IPath unresolvedLocation) {
if (unresolvedLocation == null)
return validateProjectLocationURI(context, null);
IPath location;
if (context != null)
location = context.getPathVariableManager().resolvePath(unresolvedLocation);
else
location = workspace.getPathVariableManager().resolvePath(unresolvedLocation);
//check that the location is absolute
if (!location.isAbsolute()) {
String message;
if (location.segmentCount() > 0)
message = NLS.bind(Messages.pathvar_undefined, location.toString(), location.segment(0));
else
message = Messages.links_noPath;
return new ResourceStatus(IResourceStatus.VARIABLE_NOT_DEFINED, null, message);
}
return validateProjectLocationURI(context, URIUtil.toURI(location));
}

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

return locationStatus;
IPathVariableManager pathVariableManager= project.getPathVariableManager();
IPath path1= Path.fromOSString(fLinkFields.fLinkLocation.getText());
IPath resolvedPath= pathVariableManager.resolvePath(path1);

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

return locationStatus;
IPathVariableManager pathVariableManager= project.getPathVariableManager();
IPath path1= Path.fromOSString(fLinkFields.fLinkLocation.getText());
IPath resolvedPath= pathVariableManager.resolvePath(path1);

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

remaining = new ArrayList();
String[] variables = fProject.getPathVariableManager()
.getPathVariableNames();
String variableName = getSuitablePathVariable(commonPath);
try {
fProject.getPathVariableManager().setURIValue(variableName,
URIUtil.toURI(commonPath));
} catch (CoreException e) {
String variableName = getSuitablePathVariable(commonPath);
try {
fProject.getPathVariableManager().setURIValue(variableName,
URIUtil.toURI(commonPath));
} catch (CoreException e) {

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

URI location;
if (context != null)
location = context.getPathVariableManager().resolveURI(unresolvedLocation);
else
location = workspace.getPathVariableManager().resolveURI(unresolvedLocation);

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

URI location;
if (context != null)
location = context.getPathVariableManager().resolveURI(unresolvedLocation);
else
location = workspace.getPathVariableManager().resolveURI(unresolvedLocation);

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

URI location;
if (context != null)
location = context.getPathVariableManager().resolveURI(unresolvedLocation);
else
location = workspace.getPathVariableManager().resolveURI(unresolvedLocation);

推荐阅读
author-avatar
无极圈晨曦
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有