org.eclipse.xtext.diagnostics.Diagnostic Java Examples

The following examples show how to use org.eclipse.xtext.diagnostics.Diagnostic. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LinkingDiagnosticMessageProvider.java    From statecharts with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public DiagnosticMessage getUnresolvedProxyMessage(ILinkingDiagnosticContext context) {
	String linkText = "";
	try {
		linkText = context.getLinkText();
	} catch (IllegalNodeException e) {
		linkText = e.getNode().getText();
	}

	String format = "Could not find declaration of %s '%s'";
	String type = context.getReference().getEReferenceType().getName();
	String message = String.format(format, "", linkText);
	if (!type.equals("EObject")) {
		message = String.format(format, type, linkText);
	}
	return new DiagnosticMessage(message, Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC);
}
 
Example #2
Source File: VarDeclarationParsingTest.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Test
@Tag("sarlValidation")
public void closure_xtend() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
		"agent A1 {",
			"def mycall(a : int, f : (Number,Number) => int) {",
				"return a + f.apply",
			"}",
			"def myaction {",
				"mycall(4) [ Float a, Integer b |",
				"	2 * a.floatValue + b.intValue",
				"]",
			"}",
		"}"
	));
	validate(getValidationHelper(), getInjector(), mas).assertError(
		XbasePackage.eINSTANCE.getXClosure(),
		Diagnostic.SYNTAX_DIAGNOSTIC,
		"mismatched input ',' expecting ']'");
}
 
Example #3
Source File: VarDeclarationParsingTest.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Test
@Tag("sarlValidation")
public void forLoop_xtend() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
		"import java.util.List",
		"agent A1 {",
			"var list : List<Integer>",
			"def myaction {",
				"for( Number i : list) {",
					"System.out.println(i)",
				"}",
			"}",
		"}"
	));
	validate(getValidationHelper(), getInjector(), mas).assertError(
		XbasePackage.eINSTANCE.getXFeatureCall(),
		Diagnostic.SYNTAX_DIAGNOSTIC,
		"missing ';' at 'i'");
}
 
Example #4
Source File: ArgDefaultValueParsingTest.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Test
@Tag("sarlParsing")
public void action_3p_vararg_2() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
			"capacity C1 {",
			"	def capAction",
			"}",
			"skill S1 implements C1 {",
			"	def capAction {}",
			"	def myaction(arg0 : int, arg1 : int, arg2 : int=45*) {}",
			"}"
			));
	validate(getValidationHelper(), getInjector(), mas).assertError(
			SarlPackage.eINSTANCE.getSarlAction(),
			Diagnostic.SYNTAX_DIAGNOSTIC,
			"no viable alternative at input");
}
 
Example #5
Source File: AddJunitLibToClasspathQuickfixTest.java    From xtext-xtend with Eclipse Public License 2.0 6 votes vote down vote up
@Test
public void addJUnit5LibToProjectClasspath() {
  this.removePluginNature();
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("import org.junit.jupiter.api|.Test");
  _builder.newLine();
  _builder.newLine();
  _builder.append("class FooTest {");
  _builder.newLine();
  _builder.append("    ");
  _builder.append("@Test");
  _builder.newLine();
  _builder.append("    ");
  _builder.append("def test() {}");
  _builder.newLine();
  _builder.append("}");
  _builder.newLine();
  final String content = _builder.toString();
  this.builder.create("FooTest.xtend", content).assertIssueCodes(Diagnostic.LINKING_DIAGNOSTIC).assertResolutionLabels("Add JUnit 5 lib to classpath").assertModelAfterQuickfix(content.replace("|", ""));
  this.assertClasspath(
    "classpath should contain a JUnit 5 container entry", 
    Junit5LibClasspathAdder.JUNIT5_LIBRARY_PATH);
}
 
Example #6
Source File: AddJunitLibToClasspathQuickfixTest.java    From xtext-xtend with Eclipse Public License 2.0 6 votes vote down vote up
@Test
public void addJUnit5LibToPluginProjectClasspath() {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("import org.junit.jupiter.api|.Test");
  _builder.newLine();
  _builder.newLine();
  _builder.append("class FooTest2 {");
  _builder.newLine();
  _builder.append("    ");
  _builder.append("@Test");
  _builder.newLine();
  _builder.append("    ");
  _builder.append("def test() {}");
  _builder.newLine();
  _builder.append("}");
  _builder.newLine();
  final String content = _builder.toString();
  this.builder.create("FooTest2.xtend", content).assertIssueCodes(Diagnostic.LINKING_DIAGNOSTIC).assertResolutionLabels("Add JUnit 5 lib to classpath").assertModelAfterQuickfix(content.replace("|", ""));
  this.assertRequireBundles(Junit5LibClasspathAdder.BUNDLE_IDS);
}
 
Example #7
Source File: VarDeclarationParsingTest.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Test
@Tag("sarlValidation")
public void multicatch_xtend() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
		"agent A1 {",
			"def myaction {",
				"try {",
					"System.out.println(\"G\")",
				"}",
				"catch(Exception e) {",
					"System.out.println(e)",
				"}",
				"catch(Throwable e) {",
					"System.out.println(e)",
				"}",
			"}",
		"}"
	));
	validate(getValidationHelper(), getInjector(), mas).assertError(
		TypesPackage.eINSTANCE.getJvmParameterizedTypeReference(),
		Diagnostic.SYNTAX_DIAGNOSTIC,
		"missing ':' at 'e'");
}
 
Example #8
Source File: AddJunitLibToClasspathQuickfixTest.java    From xtext-xtend with Eclipse Public License 2.0 6 votes vote down vote up
@Test
public void addJUnit4LibToPluginProjectClasspath() {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("import org.junit|.Test");
  _builder.newLine();
  _builder.newLine();
  _builder.append("class FooTest {");
  _builder.newLine();
  _builder.append("    ");
  _builder.append("@Test");
  _builder.newLine();
  _builder.append("    ");
  _builder.append("def test() {}");
  _builder.newLine();
  _builder.append("}");
  _builder.newLine();
  final String content = _builder.toString();
  this.builder.create("FooTest.xtend", content).assertIssueCodes(Diagnostic.LINKING_DIAGNOSTIC).assertResolutionLabels("Add JUnit 4 lib to classpath").assertModelAfterQuickfix(content.replace("|", ""));
  this.assertRequireBundles(new String[] { Junit4LibClasspathAdder.BUNDLE_ID });
}
 
Example #9
Source File: VarDeclarationParsingTest.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Test
@Tag("sarlValidation")
public void catch_xtend() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
		"agent A1 {",
			"def myaction {",
				"try {",
					"System.out.println(\"G\")",
				"}",
				"catch(Throwable e) {",
					"System.out.println(e)",
				"}",
			"}",
		"}"
	));
	validate(getValidationHelper(), getInjector(), mas).assertError(
		TypesPackage.eINSTANCE.getJvmParameterizedTypeReference(),
		Diagnostic.SYNTAX_DIAGNOSTIC,
		"missing ':' at 'e'");
}
 
Example #10
Source File: DefaultQuickfixProvider.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Override
public List<IssueResolution> getResolutions(Issue issue) {
	StopWatch stopWatch = new StopWatch(logger);
	try {
		if (Diagnostic.LINKING_DIAGNOSTIC.equals(issue.getCode())) {
			List<IssueResolution> result = new ArrayList<IssueResolution>();
			result.addAll(getResolutionsForLinkingIssue(issue));
			result.addAll(super.getResolutions(issue));
			return result;
		} else
			return super.getResolutions(issue);
	} finally {
		stopWatch.resetAndLog("#getResolutions");			
	}
	
}
 
Example #11
Source File: GamlSyntacticConverter.java    From gama with GNU General Public License v3.0 6 votes vote down vote up
private void convertFacets(final HeadlessExperiment stm, final ISyntacticElement elt,
		final Set<Diagnostic> errors) {
	final SymbolProto p = DescriptionFactory.getProto(EXPERIMENT, null);
	for (final Facet f : EGaml.getInstance().getFacetsOf(stm)) {
		final String fname = EGaml.getInstance().getKeyOf(f);

		// We compute (and convert) the expression attached to the facet
		final boolean label = p == null ? false : p.isLabel(fname);
		final IExpressionDescription fexpr = convExpr(f, label, errors);
		addFacet(elt, fname, fexpr, errors);
	}
	final IExpressionDescription ed = findExpr(stm, errors);
	addFacet(elt, NAME, ed, errors);
	addFacet(elt, TITLE, ed, errors);
	if (!elt.hasFacet(TYPE)) {
		addFacet(elt, TYPE, convertToLabel(null, HEADLESS_UI), errors);
	}
}
 
Example #12
Source File: ArgDefaultValueParsingTest.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Test
@Tag("sarlValidation")
public void action_1p_invalid2() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
			"capacity C1 {",
			"	def capAction",
			"}",
			"skill S1 implements C1 {",
			"	def capAction {}",
			"	def myaction(arg : int*=4) {}",
			"}"
			));
	validate(getValidationHelper(), getInjector(), mas).assertError(
			SarlPackage.eINSTANCE.getSarlAction(),
			Diagnostic.SYNTAX_DIAGNOSTIC,
			"mismatched input '*=' expecting ')'");
}
 
Example #13
Source File: Bug437669Test.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
@Test
public void testUnresolved_02() {
	Type type = getContext();
	INode nameNode = NodeModelUtils.findNodesForFeature(type, ImportedURIPackage.Literals.TYPE__NAME).get(0);
	resolve(type, "BlaBlaBla", nameNode.getOffset(), nameNode.getLength());
	Resource resource = type.eResource();
	assertEquals(resource.getErrors().toString(), 1, resource.getErrors().size());
	
	LineAndColumn lineAndColumn = NodeModelUtils.getLineAndColumn(nameNode, nameNode.getOffset());

	Diagnostic diagnostic = (Diagnostic) resource.getErrors().get(0);
	assertEquals(nameNode.getOffset(), diagnostic.getOffset());
	assertEquals(nameNode.getLength(), diagnostic.getLength());
	assertEquals(lineAndColumn.getLine(), diagnostic.getLine());
	assertEquals(lineAndColumn.getColumn(), diagnostic.getColumn());
	assertEquals("Couldn't resolve reference to Type 'BlaBlaBla'.", diagnostic.getMessage());
}
 
Example #14
Source File: VarDeclarationParsingTest.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Test
@Tag("sarlValidation")
public void valueDeclaration_localScope_xtend() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
		"agent A1 {",
			"def myaction {",
				"val int i",
				"val j = 45",
				"val double k = 45",
				"System.out.println(i)",
				"System.out.println(j)",
				"System.out.println(k)",
			"}",
		"}"
	));
	Validator validator = validate(getValidationHelper(), getInjector(), mas);
	validator.assertError(
			XbasePackage.eINSTANCE.getXFeatureCall(),
			Diagnostic.LINKING_DIAGNOSTIC,
			"The method or field i is undefined");
	validator.assertError(
			XbasePackage.eINSTANCE.getXFeatureCall(),
			Diagnostic.LINKING_DIAGNOSTIC,
			"The method or field k is undefined");
}
 
Example #15
Source File: VarDeclarationParsingTest.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Test
@Tag("sarlValidation")
public void valueDeclaration_SarlFieldScope_xtend() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
		"import java.util.List",
		"agent A1 {",
			"val List<Integer> list",
			"val i = 45",
			"val double j = 45",
		"}"
	));
	validate(getValidationHelper(), getInjector(), mas)
		.assertError(
			SarlPackage.eINSTANCE.getSarlAgent(),
			Diagnostic.SYNTAX_DIAGNOSTIC,
			"mismatched input '<' expecting '}");
}
 
Example #16
Source File: GamlSyntacticConverter.java    From gama with GNU General Public License v3.0 6 votes vote down vote up
private final IExpressionDescription convExpr(final Facet facet, final boolean label,
		final Set<Diagnostic> errors) {
	if (facet != null) {
		final Expression expr = facet.getExpr();
		if (expr == null && facet.getBlock() != null) {
			final Block b = facet.getBlock();
			final ISyntacticElement elt =
					SyntacticFactory.create(ACTION, new Facets(NAME, SYNTHETIC + SYNTHETIC_ACTION++), true);
			convertBlock(elt, b, errors);
			return convExpr(elt, errors);
		}
		if (expr != null) {
			return label ? convertToLabel(expr, EGaml.getInstance().getKeyOf(expr)) : convExpr(expr, errors);
		}
		final String name = facet.getName();
		// TODO Verify the use of "facet"
		if (name != null) { return convertToLabel(null, name); }
	}
	return null;
}
 
Example #17
Source File: GamlSyntacticConverter.java    From gama with GNU General Public License v3.0 5 votes vote down vote up
private void convCatch(final S_Try stm, final ISyntacticElement elt, final Set<Diagnostic> errors) {
	final EObject catchBlock = stm.getCatch();
	if (catchBlock != null) {
		final ISyntacticElement catchElt =
				SyntacticFactory.create(IKeyword.CATCH, catchBlock, EGaml.getInstance().hasChildren(catchBlock));
		convStatements(catchElt, EGaml.getInstance().getStatementsOf(catchBlock), errors);
		elt.addChild(catchElt);
	}
}
 
Example #18
Source File: LinkingDiagnosticMessageProvider.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public DiagnosticMessage getViolatedBoundsConstraintMessage(ILinkingDiagnosticContext context, int size) {
	String message = "Too many matches for reference to '" + context.getLinkText() + "'. " 
			+ "Feature " + context.getReference().getName() + " can only hold " + context.getReference().getUpperBound()
			+ " reference" + (context.getReference().getUpperBound() != 1 ? "s" : "") + " but found " + size + " candidate" +
			(size!=1 ? "s" : "");
	return new DiagnosticMessage(message, Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC);
}
 
Example #19
Source File: Bug846Test.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Test
@Tag("sarlValidation")
public void parsing_04() throws Exception {
	SarlScript mas = file(getParseHelper(), SNIPSET04);
	final Validator validator = validate(getValidationHelper(), getInjector(), mas);
	validator.assertError(
			XbasePackage.eINSTANCE.getXBlockExpression(),
			Diagnostic.SYNTAX_DIAGNOSTIC,
			"mismatched input '**'");
}
 
Example #20
Source File: Linker.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected void afterCreateAndSetProxy(EObject obj, INode node, EReference eRef, CrossReference xref, IDiagnosticProducer diagnosticProducer) {
	AbstractElement terminal = xref.getTerminal();
	if (!(terminal instanceof RuleCall)) { 
		throw new IllegalArgumentException(String.valueOf(xref));
	}
	AbstractRule rule = ((RuleCall) terminal).getRule();
	try {
		String tokenText = NodeModelUtils.getTokenText(node);
		valueConverterService.toValue(tokenText, rule.getName(), node);
	} catch(ValueConverterException e) {
		diagnosticProducer.addDiagnostic(new DiagnosticMessage(e.getMessage(), Severity.ERROR, Diagnostic.SYNTAX_DIAGNOSTIC, Strings.EMPTY_ARRAY));
	}
}
 
Example #21
Source File: ListBasedDiagnosticConsumer.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
public void consume(Diagnostic diagnostic) {
	final Pair<Integer, Integer> newRange = Tuples.create(diagnostic.getOffset(), diagnostic.getLength());
	if (coveredNodes.add(newRange)) {
		boolean changed = this.diagnostics.add(diagnostic);
		diagnosticsConsumed |= changed;
	}
}
 
Example #22
Source File: Bug437669Test.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testUnresolved_01() {
	Type type = resolve("BlaBlaBla");
	Resource resource = type.eResource();
	assertEquals(resource.getErrors().toString(), 1, resource.getErrors().size());

	Diagnostic diagnostic = (Diagnostic) resource.getErrors().get(0);
	assertEquals(0, diagnostic.getOffset());
	assertEquals(1, diagnostic.getLength());
	assertEquals(1, diagnostic.getLine());
	assertEquals(1, diagnostic.getColumn());
	assertEquals("Couldn't resolve reference to Type 'BlaBlaBla'.", diagnostic.getMessage());
}
 
Example #23
Source File: LinkingErrorTest.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Test public void testLinkingErrorMessage() throws Exception {
	XtextResource resource = getResourceFromStringAndExpect("type A extends B", 1);
	assertEquals(1, resource.getErrors().size());
	Diagnostic error = (Diagnostic) resource.getErrors().get(0);
	assertEquals(1, error.getLine());
	assertEquals("Couldn't resolve reference to Type 'B'.", error.getMessage());
}
 
Example #24
Source File: GamlLinkingErrorMessageProvider.java    From gama with GNU General Public License v3.0 5 votes vote down vote up
@Override
public DiagnosticMessage getViolatedBoundsConstraintMessage(final ILinkingDiagnosticContext context,
		final int size) {
	final String message = "Too many matches for reference to '" + context.getLinkText() + "'. " + "Feature "
			+ context.getReference().getName() + " can only hold " + context.getReference().getUpperBound()
			+ " reference" + (context.getReference().getUpperBound() != 1 ? "s" : "") + " but found " + size
			+ " candidate" + (size != 1 ? "s" : "");
	return new DiagnosticMessage(message, Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC);
}
 
Example #25
Source File: MultiProjectTest.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testCrossProjectLink() {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("type Foo {");
  _builder.newLine();
  _builder.append("    ");
  _builder.append("Bar bar");
  _builder.newLine();
  _builder.append("}");
  _builder.newLine();
  final URI foo = this.createFile(this.project0, "Foo.testlang", _builder);
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("type Bar {");
  _builder_1.newLine();
  _builder_1.append("}");
  _builder_1.newLine();
  final URI bar = this.createFile(this.project1, "Bar.testlang", _builder_1);
  this.workspaceManager.doBuild(Collections.<URI>unmodifiableList(CollectionLiterals.<URI>newArrayList(foo, bar)), CollectionLiterals.<URI>emptyList(), CancelIndicator.NullImpl);
  Assert.assertEquals(2, this.diagnostics.size());
  Assert.assertEquals(1, this.diagnostics.get(foo).size());
  Assert.assertEquals(Diagnostic.LINKING_DIAGNOSTIC, IterableExtensions.<Issue>head(this.diagnostics.get(foo)).getCode());
  Assert.assertTrue(this.diagnostics.get(bar).isEmpty());
  this.diagnostics.clear();
  List<String> _dependencies = this.workspaceManager.getProjectManager(this.project0.getName()).getProjectDescription().getDependencies();
  String _name = this.project1.getName();
  _dependencies.add(_name);
  this.workspaceManager.doBuild(Collections.<URI>unmodifiableList(CollectionLiterals.<URI>newArrayList(foo, bar)), CollectionLiterals.<URI>emptyList(), CancelIndicator.NullImpl);
  Assert.assertEquals(2, this.diagnostics.size());
  Assert.assertTrue(this.diagnostics.get(foo).isEmpty());
  Assert.assertTrue(this.diagnostics.get(bar).isEmpty());
}
 
Example #26
Source File: FeatureCallValidationTest.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testBrokenModel_13() throws Exception {
	XtendClass clazz = clazz("class C { def UnknownType m1() {} def void m2() { newArrayList(m1, m1).map[ unknownOperation.doesNotExist ] }}");
	helper.assertNoError(clazz, IssueCodes.INCOMPATIBLE_TYPES);
	helper.assertError(clazz, XbasePackage.Literals.XFEATURE_CALL, Diagnostic.LINKING_DIAGNOSTIC, "unknownOperation is");
	helper.assertError(clazz, TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE, Diagnostic.LINKING_DIAGNOSTIC, "UnknownType cannot be resolved to a type.");
}
 
Example #27
Source File: ArgDefaultValueParsingTest.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Test
@Tag("sarlValidation")
public void action_3p_vararg_2() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
			"agent A1 {",
			"def myaction(arg0 : int, arg1 : int, arg2 : int=45*) {",
			"System.out.println(arg0)",
			"}",
			"}"
			));
	validate(getValidationHelper(), getInjector(), mas).assertError(
			SarlPackage.eINSTANCE.getSarlAction(),
			Diagnostic.SYNTAX_DIAGNOSTIC,
			"no viable alternative at input");
}
 
Example #28
Source File: FeatureCallValidationTest.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testBrokenModel_14() throws Exception {
	XtendClass clazz = clazz("class C { def void m() { <UnknownType>newArrayList().map[ unknownOperation.doesNotExist ] }}");
	helper.assertNoError(clazz, IssueCodes.INCOMPATIBLE_TYPES);
	helper.assertError(clazz, XbasePackage.Literals.XFEATURE_CALL, Diagnostic.LINKING_DIAGNOSTIC, "unknownOperation is");
	helper.assertError(clazz, TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE, Diagnostic.LINKING_DIAGNOSTIC, "UnknownType cannot be resolved to a type.");
}
 
Example #29
Source File: ArgDefaultValueParsingTest.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Test
@Tag("sarlValidation")
public void action_1p_invalid1() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
			"agent A1 {",
			"def myaction(arg : int=4*) {",
			"System.out.println(arg)",
			"}",
			"}"
			));
	validate(getValidationHelper(), getInjector(), mas).assertError(
			SarlPackage.eINSTANCE.getSarlAction(),
			Diagnostic.SYNTAX_DIAGNOSTIC,
			"no viable alternative at input");
}
 
Example #30
Source File: AgentParsingTest.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Test
public void missedCapacityDeclaration() throws Exception {
	SarlScript mas = file(getParseHelper(), multilineString(
			"agent A1 {",
			"uses MyCap",
			"}"
			));
	validate(getValidationHelper(), getInjector(), mas).assertError(
			TypesPackage.eINSTANCE.getJvmParameterizedTypeReference(),
			Diagnostic.LINKING_DIAGNOSTIC,
			"MyCap cannot be resolved to a type");
}