Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Linking issue while programmatic validation
Linking issue while programmatic validation [message #1745271] Fri, 07 October 2016 03:43 Go to next message
Eclipse UserFriend
Hi,

I have a dsl that allows me to define functions. I have customized the LogicalContainerAwareReentrantTypeResolver#addExtensionsToMemberSession() so that I can cross-reference the function directly, as compared to using new MyClass().fooFunc(). The Xbase compiler is customized to generate appropriate code.

When open in editor, the functions are linked properly and I can navigate to them. However, when I try to validate the resourceset programmatically, the resource contains an error - The method foo() is not defined. Here, foo() is a method that is cross-referenced in function Bar. My guess is that the linker is failing to link the functions.

I am using the following code to validate the resourceset. I have tried resolving the resourceset (EcoreUtil.resolveAll(resourceSet)) however it didn't help.

final XtextResourceSet resourceSet = (XtextResourceSet) resourceSetProvider.get(project);
for (Resource resource : resourceSet.getResources()) {
	final XtextResource xtextResource = (XtextResource) resource;
	xtextResource.getResourceServiceProvider().getResourceValidator().validate(xtextResource, CheckMode.ALL, CancelIndicator.NullImpl)
       xtextResource.getErrors() //print the errors 
}


How do I deal with this problem ? Any specific code that I should debug to get some clarity ?

Tx in advance.

PS : I am sorry, I cannot share the code that I have customized in the Xbase compiler and LogicalContainerAwareReentrantTypeResolver.
Re: Linking issue while programmatic validation [message #1745285 is a reply to message #1745271] Fri, 07 October 2016 05:59 Go to previous message
Eclipse UserFriend
Can you reproduce this with the domain model example as well?
Previous Topic:Unit Testing the Language
Next Topic:problem with using import quickfix
Goto Forum:
  


Current Time: Thu May 15 22:31:44 EDT 2025

Powered by FUDForum. Page generated in 1.27243 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top