Disable language support for project [message #1724003] |
Fri, 19 February 2016 11:33  |
Eclipse User |
|
|
|
I use three different languages. My project consists of different modules (each an eclipse project).
One project, which does some configuration and depends on all the others, but uses only one language.
Now I want to disable the 2 other languages for this module.
I tried to disable the compiler for the project, but the chunks of the other languages are still loaded, when I run a clean build. This cost quite a lot of time as all the CrossRefernces are resolved.
In ClusteringBuilderState I found the doUpdate takes very long because of EcoreUtil2.resolveLazyCrossReferences(resource, cancelMonitor);
This is done for files which do not belong to the used language.
Thanks
|
|
|
|
|
|
|
Re: Disable language support for project [message #1724129 is a reply to message #1724126] |
Sun, 21 February 2016 09:46   |
Eclipse User |
|
|
|
Jan Koehnlein wrote on Sun, 21 February 2016 08:57I don't quite get it yet.
1) There is only one single builder for all Xtext languages, so no such thing as a "used language" from the builder's perspective.
2) What is the difference between "depending on" another language and "using" it?
3) The auto-builder runs for changed resources only. Have you disabled "Build automatically"? May not be a good idea to do only full builds if you're they are slow.
4) The builder only resolves cross-references directly from changed files, but not transitively. This is necessary and shouldn't be disabled.
5) As long as a project does not contain any resource of a given language, it will not build it.
1.) Thanks for clarification
2.) The languages only uses the generated java classes of the other language. So there is no direct dependency on language level. If project A depends on project B, but does not uses the language used in project B, but only the generated java classes. (The bad thing is that project C depends on A and needs to have access to model of project B. I thought of creating two artifacts one java.jar and one model.jar, so each project can decide if it needs the model ore not.)
3.) I have to run a full build quite often, as I have an ugly structure, that I have to create some build script which needs to read the whole model and this is not triggered when I change one file of the model.
5.) This is not my experience. When the project contains resources in the class path, which do not belong to sources of the project, than these resources are loaded when I run a full build.
|
|
|
Re: Disable language support for project [message #1724134 is a reply to message #1724127] |
Sun, 21 February 2016 10:52  |
Eclipse User |
|
|
|
Christian Dietrich wrote on Sun, 21 February 2016 09:00i asume you have files in that project that you do not want to read/index/reference.
i proposed to override org.eclipse.xtext.resource.impl.DefaultResourceServiceProvider.canHandle(URI)
and add a binding for IResourceServiceProvider in the runtime module
Yes I guess this would do the trick, but how can I access the currently build project?, to read some control file or better how can I read the compile flag?
|
|
|
Powered by
FUDForum. Page generated in 0.08069 seconds