当前位置: 首页>>代码示例>>Java>>正文


Java Issue.getUriToProblem方法代码示例

本文整理汇总了Java中org.eclipse.xtext.validation.Issue.getUriToProblem方法的典型用法代码示例。如果您正苦于以下问题:Java Issue.getUriToProblem方法的具体用法?Java Issue.getUriToProblem怎么用?Java Issue.getUriToProblem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.xtext.validation.Issue的用法示例。


在下文中一共展示了Issue.getUriToProblem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: attachData

import org.eclipse.xtext.validation.Issue; //导入方法依赖的package包/类
public void attachData(Resource resource) {
	if (findDataAdapter(resource) != null) {
		return;
	}
	List<Issue> issues = collectIssues(resource);
	Data adapter = new Data();
	for (Issue issue : issues) {
		URI uriToProblem = issue.getUriToProblem();
		if (uriToProblem != null && uriToProblem.trimFragment().equals(resource.getURI())) {
			EObject erroneousElement = resource.getEObject(uriToProblem.fragment());
			adapter.addIssue(erroneousElement, issue);
			for(EObject jvmElement: associations.getJvmElements(erroneousElement)) {
				adapter.addIssue(jvmElement, issue);
			}
		}
	}
	resource.eAdapters().add(adapter);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:19,代码来源:ElementIssueProvider.java

示例2: doGetIssuesAsString

import org.eclipse.xtext.validation.Issue; //导入方法依赖的package包/类
protected StringBuilder doGetIssuesAsString(Resource resource, final Iterable<Issue> issues, StringBuilder result) {
	for (Issue issue : issues) {
		URI uri = issue.getUriToProblem();
		result.append(issue.getSeverity());
		result.append(" (");
		result.append(issue.getCode());
		result.append(") '");
		result.append(issue.getMessage());
		result.append("'");
		if (uri != null) {
			EObject eObject = resource.getResourceSet().getEObject(uri, true);
			result.append(" on ");
			result.append(eObject.eClass().getName());
		}
		result.append(", offset " + issue.getOffset() + ", length " + issue.getLength());
		result.append("\n");
	}
	return result;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:20,代码来源:ValidationTestHelper.java

示例3: accept

import org.eclipse.xtext.validation.Issue; //导入方法依赖的package包/类
public void accept(final Issue issue, final String label, final String description, final String image, final ICoreSemanticModification semanticModification) {
  CoreSemanticModificationWrapper modificationWrapper = new CoreSemanticModificationWrapper(issue.getUriToProblem(), semanticModification);
  issueResolutions.add(new CoreIssueResolution(label, description, image, modificationContextFactory.createModificationContext(issue), modificationWrapper));
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:5,代码来源:CoreIssueResolutionAcceptor.java

示例4: uri

import org.eclipse.xtext.validation.Issue; //导入方法依赖的package包/类
/**
 * Creates a builder for an issue's URI.
 *
 * @see Issue#getUriToProblem()
 *
 * @return an instance of {@link URIPropertyMatcher} that can be used to specify the actual expectation
 */
public URIPropertyMatcherBuilder uri() {
	return new URIPropertyMatcherBuilder(this, "URI", (Issue issue) -> issue.getUriToProblem());
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:IssueMatcher.java


注:本文中的org.eclipse.xtext.validation.Issue.getUriToProblem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。