|
Re: headless build - XtextResourceSet problem [message #1462227 is a reply to message #1462219] |
Wed, 05 November 2014 10:52 |
|
Hi,
this should normally not happen.
can you share a code snippet i can paste into an xtext hello world project
the following works nice for me (my extension is mydsl3 though)
public class Main {
public static void main(String[] args) {
Injector injector = new MyDslStandaloneSetup().createInjectorAndDoEMFRegistration();
XtextResourceSet set = injector.getInstance(XtextResourceSet.class);
set.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
URI uri = URI.createURI("dummy:/"+Long.toString(System.nanoTime())+".mydsl3"); // a dummy yet unique URI
Resource resource = set.createResource(uri);
System.out.println(resource.getClass().toString());
}
}
this works in a standlone java app.
please note: a headless eclipse / osgi app is not a standlone java app (the topic heading indicates that you maybe do not have a standlone java app)
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
Re: headless build - XtextResourceSet problem [message #1462648 is a reply to message #1462608] |
Wed, 05 November 2014 20:24 |
Bruce L. Messages: 81 Registered: June 2011 |
Member |
|
|
Hi,
good point, but I think I am not missing any. Together with all the .class, I have the .xtextbin, .g .tokens (in parser/antlr/internal/)
I built manually the language infrastructure and put the results (.class plus the above mentioned binaries) in a folder ME. A directory compare between ME and the Eclipse build directory shows no differences (Eclipse has some ._trace, .xtend sources, the mwe2, nothing runtime I think). The .class in the two folders are not exactly the same though (at binary level)
Then I run the very same Main.class with classpath pointing at ME and Eclipse. It works for the second, not for the first. It really looks like there is something different in the compilation.. (?!?)
I am not using any jar now, but directly pointing the classpath to the base path with the .class files.
I cannot think of a solution
Thanks
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02433 seconds