本文整理汇总了Java中org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider类的典型用法代码示例。如果您正苦于以下问题:Java ILinkingDiagnosticMessageProvider类的具体用法?Java ILinkingDiagnosticMessageProvider怎么用?Java ILinkingDiagnosticMessageProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILinkingDiagnosticMessageProvider类属于org.eclipse.xtext.linking包,在下文中一共展示了ILinkingDiagnosticMessageProvider类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getUnresolvedProxyMessage
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public DiagnosticMessage getUnresolvedProxyMessage(final ILinkingDiagnosticMessageProvider.ILinkingDiagnosticContext context) {
EReference _reference = context.getReference();
final EClass referenceType = _reference.getEReferenceType();
String linkText = "";
try {
String _linkText = context.getLinkText();
linkText = _linkText;
} catch (final Throwable _t) {
if (_t instanceof IllegalNodeException) {
final IllegalNodeException e = (IllegalNodeException)_t;
INode _node = e.getNode();
String _text = _node.getText();
linkText = _text;
} else {
throw Exceptions.sneakyThrow(_t);
}
}
String _name = referenceType.getName();
String _plus = ("Couldn\'t resolve reference to " + _name);
String _plus_1 = (_plus + " \'");
String _plus_2 = (_plus_1 + linkText);
final String msg = (_plus_2 + "\'.");
String _name_1 = referenceType.getName();
DiagnosticMessage _diagnosticMessage = new DiagnosticMessage(msg, Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC, _name_1, linkText);
return _diagnosticMessage;
}
开发者ID:RobertWalter83,项目名称:DialogScriptDSL,代码行数:27,代码来源:CustomLinkingDiagnosticMessageProvider.java
示例2: createAndAddDiagnostic
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
/**
* @since 2.3
*/
protected void createAndAddDiagnostic(Triple<EObject, EReference, INode> triple, IllegalNodeException ex) {
if (isValidationDisabled())
return;
ILinkingDiagnosticMessageProvider.ILinkingDiagnosticContext context = createDiagnosticMessageContext(triple);
DiagnosticMessage message = linkingDiagnosticMessageProvider.getIllegalNodeMessage(context, ex);
if (message != null) {
List<Diagnostic> list = getDiagnosticList(message);
Diagnostic diagnostic = createDiagnostic(triple, message);
if (!list.contains(diagnostic))
list.add(diagnostic);
}
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:16,代码来源:LazyLinkingResource.java
示例3: configure
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void configure() {
Binder binder = createNiceMock(Binder.class);
AnnotatedBindingBuilder<LangFactory> bindLangFactory = createMock(AnnotatedBindingBuilder.class);
AnnotatedBindingBuilder<ILinkingDiagnosticMessageProvider.Extended> bindLinkingDMP = createMock(AnnotatedBindingBuilder.class);
AnnotatedBindingBuilder<ILaunchManager> bindLaunchManager = createMock(AnnotatedBindingBuilder.class);
final ILaunchManager launchManager = createMock(ILaunchManager.class);
final AnnotatedBindingBuilder<Console> bindConsole = createMock(AnnotatedBindingBuilder.class);
final Console console = createMock(Console.class);
expect(binder.bind(LangFactory.class)).andReturn(bindLangFactory);
expect(binder.bind(ILinkingDiagnosticMessageProvider.Extended.class)).andReturn(bindLinkingDMP);
expect(binder.bind(ILaunchManager.class)).andReturn(bindLaunchManager);
expect(binder.bind(Console.class)).andReturn(bindConsole);
bindLangFactory.toInstance(LangFactory.eINSTANCE);
expect(bindLinkingDMP.to(Antlr4MissingReferenceMessageProvider.class)).andReturn(null);
bindLaunchManager.toInstance(launchManager);
bindConsole.toInstance(console);
Object[] mocks = {binder, bindLangFactory, bindLinkingDMP, launchManager, console };
replay(mocks);
new Antlr4RuntimeModule() {
@Override
protected ILaunchManager getLaunchManager() {
return launchManager;
}
@Override
protected Console getConsole() {
return console;
}
}.configure(binder);
verify(mocks);
}
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:41,代码来源:Antlr4RuntimeModuleTest.java
示例4: bindILinkingDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
/**
* @since 2.9
*/
public Class<? extends ILinkingDiagnosticMessageProvider> bindILinkingDiagnosticMessageProvider() {
return UnresolvedFeatureCallTypeAwareMessageProvider.class;
}
开发者ID:eclipse,项目名称:xtext-extras,代码行数:7,代码来源:DefaultXbaseRuntimeModule.java
示例5: bindILinkingDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
@Override
public Class<? extends ILinkingDiagnosticMessageProvider> bindILinkingDiagnosticMessageProvider() {
return UnresolvedAnnotationTypeAwareMessageProvider.class;
}
开发者ID:eclipse,项目名称:xtext-extras,代码行数:5,代码来源:DefaultXbaseWithAnnotationsRuntimeModule.java
示例6: getUnresolvedProxyMessage
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
@Override
public DiagnosticMessage getUnresolvedProxyMessage(final ILinkingDiagnosticMessageProvider.ILinkingDiagnosticContext context) {
String _xtrycatchfinallyexpression = null;
try {
_xtrycatchfinallyexpression = context.getLinkText();
} catch (final Throwable _t) {
if (_t instanceof IllegalNodeException) {
final IllegalNodeException e = (IllegalNodeException)_t;
_xtrycatchfinallyexpression = e.getNode().getText();
} else {
throw Exceptions.sneakyThrow(_t);
}
}
String linkText = _xtrycatchfinallyexpression;
if ((linkText == null)) {
return null;
}
EObject contextObject = context.getContext();
boolean _isStaticMemberCallTarget = this.isStaticMemberCallTarget(contextObject);
if (_isStaticMemberCallTarget) {
StringConcatenation _builder = new StringConcatenation();
_builder.append(linkText);
_builder.append(" cannot be resolved to a type.");
return new DiagnosticMessage(_builder.toString(), Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC,
UnresolvedFeatureCallTypeAwareMessageProvider.TYPE_LITERAL);
}
if ((contextObject instanceof XAbstractFeatureCall)) {
boolean _isOperation = ((XAbstractFeatureCall)contextObject).isOperation();
boolean _not = (!_isOperation);
if (_not) {
return this.handleUnresolvedFeatureCall(context, ((XAbstractFeatureCall)contextObject), linkText);
}
}
EClass referenceType = context.getReference().getEReferenceType();
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append(linkText);
_builder_1.append(" cannot be resolved");
String _typeName = this.getTypeName(referenceType, context.getReference());
_builder_1.append(_typeName);
_builder_1.append(".");
final String msg = _builder_1.toString();
return new DiagnosticMessage(msg, Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC, linkText);
}
开发者ID:eclipse,项目名称:xtext-extras,代码行数:44,代码来源:UnresolvedFeatureCallTypeAwareMessageProvider.java
示例7: createDiagnosticMessage
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
protected DiagnosticMessage createDiagnosticMessage(Triple<EObject, EReference, INode> triple) {
ILinkingDiagnosticMessageProvider.ILinkingDiagnosticContext context = createDiagnosticMessageContext(triple);
DiagnosticMessage message = diagnosticMessageProvider.getUnresolvedProxyMessage(context);
return message;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:6,代码来源:LazyLinkingResource.java
示例8: getDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public ILinkingDiagnosticMessageProvider getDiagnosticMessageProvider() {
return diagnosticMessageProvider;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:4,代码来源:LazyLinkingResource.java
示例9: setDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public void setDiagnosticMessageProvider(ILinkingDiagnosticMessageProvider diagnosticMessageProvider) {
this.diagnosticMessageProvider = diagnosticMessageProvider;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:4,代码来源:LazyLinkingResource.java
示例10: setDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public void setDiagnosticMessageProvider(ILinkingDiagnosticMessageProvider.Extended diagnosticMessageProvider) {
this.diagnosticMessageProvider = diagnosticMessageProvider;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:4,代码来源:Linker.java
示例11: getDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public ILinkingDiagnosticMessageProvider.Extended getDiagnosticMessageProvider() {
return diagnosticMessageProvider;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:4,代码来源:Linker.java
示例12: bindILinkingDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public Class<? extends ILinkingDiagnosticMessageProvider.Extended> bindILinkingDiagnosticMessageProvider() {
return XtextLinkingDiagnosticMessageProvider.class;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:4,代码来源:XtextRuntimeModule.java
示例13: bindILinkingDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public Class<? extends ILinkingDiagnosticMessageProvider> bindILinkingDiagnosticMessageProvider() {
return PhdlLinkingDiagnosticMessageProvider.class;
}
开发者ID:timofonic,项目名称:PHDL,代码行数:4,代码来源:PhdlUiModule.java
示例14: bindILinkingDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public Class<? extends ILinkingDiagnosticMessageProvider.Extended> bindILinkingDiagnosticMessageProvider() {
return GamlLinkingErrorMessageProvider.class;
}
开发者ID:gama-platform,项目名称:gama,代码行数:4,代码来源:GamlRuntimeModule.java
示例15: bindILinkingDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public Class<? extends ILinkingDiagnosticMessageProvider> bindILinkingDiagnosticMessageProvider() {
return XtxtUMLLinkingDiagnosticMessageProvider.class;
}
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:4,代码来源:XtxtUMLRuntimeModule.java
示例16: bindILinkingDiagnosticMessageProvider
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
public Class<? extends ILinkingDiagnosticMessageProvider> bindILinkingDiagnosticMessageProvider() {
return CustomLinkingDiagnosticMessageProvider.class;
}
开发者ID:RobertWalter83,项目名称:DialogScriptDSL,代码行数:4,代码来源:CharacterScriptRuntimeModule.java
示例17: configure
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider; //导入依赖的package包/类
@Override
public void configure(final Binder binder) {
checkNotNull(binder);
super.configure(binder);
binder.bind(LangFactory.class).toInstance(LangFactory.eINSTANCE);
binder.bind(ILinkingDiagnosticMessageProvider.Extended.class)
.to(Antlr4MissingReferenceMessageProvider.class);
binder.bind(ILaunchManager.class).toInstance(getLaunchManager());
binder.bind(Console.class).toInstance(getConsole());
}
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:16,代码来源:Antlr4RuntimeModule.java
注:本文中的org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论