[XTEND] Standalone compiler [message #710734] |
Fri, 05 August 2011 07:01  |
Eclipse User |
|
|
|
Hello,
We are trying to compile an xtend fiel within an Ant task. To do it, we first develope a compilation class in Eclipse where everything worked fine (we based our code in the org.eclipse.xtext.xtend2.tests.compiler.TestCaseCompiler class) and then we converted this class into an ant Task.
The problem is that when we try to compile the xtend file from ant we always get following errors when executing "EcoreUtil.resolveAll(resource)":
java.lang.RuntimeException: [XtextLinkingDiagnostic: null:20 Couldn't resolve reference to JvmDeclaredType 'MsfServerInfo'., XtextLinkingDiagnostic: null:20 Couldn't resolve reference to JvmIdentifiableElement 'getClassPathEntries'., XtextLinkingDiagnostic: null:32 Couldn't resolve reference to JvmDeclaredType 'MsfServerInfo'., XtextLinkingDiagnostic: null:32 Couldn't resolve reference to JvmIdentifiableElement 'getViewModulesFiles'.]
We guess this is happening because within the xtend file there is an import including the MsfServerInfo class, and the EcoreUtil resolver cannot find it, so the question is... is there a way to add files to the "xtend classpath" so that they can be found during resolution and compilation phases?
Thank you very much in advance for your help.
|
|
|
|
|
|
Re: [XTEND] Standalone compiler [message #713140 is a reply to message #710839] |
Mon, 08 August 2011 02:31  |
Eclipse User |
|
|
|
Hi Christian,
Once again thanks a lot for your quick reply. You were completely right, as I told you my problem was that I needed to load the classpath, but I need to do it programmatically from java not from ant file, but I was not making it correctly so that's why it did not work, I made an small change in my java code and now everything is working properly.
Thank you very much for all your support.
Best regards.
|
|
|
Powered by
FUDForum. Page generated in 0.29093 seconds