作者:无极圈晨曦 | 来源:互联网 | 2023-07-30 19:20
本文整理了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);