Hello everybody,
I am new to the XText modeling world. I already have done the beginner tutorials and created an DSL with different XPand templates etc.
Now I wan't to create two DSLs where DSL2 (presentation) uses elements of DSL1 (domain). Later at runtime I want to write two files: one for the domain-model and a second one for the presentation model. In the presentation-model I want to import the domain-model to use the elements of it.
For this I created two XText-projects plus generators. In the first I defined my Domain-modeling-language. I tested it as Eclipse App and it works of course. Then I exported it as plugin to the modeling-eclipse-distribution (the distribution package from the xtext-eclipse side build on eclipse galileo).
After that I created my presentation-modeling-language. The first lines of the language are the following:
grammar a.b.PDL with a.b.DDL
import "h**p://www.b.a/DDL"
generate pDL "h**p://www.b.a/PDL"
ViewModel :
(imports+=DomainModel)*
(views+=View)*;
Import :
'import' importURI=STRING;
To resolve the dependencies I simply added the three projects of DSL1 to the "Required plugins" of the plugin.xml.
Now when I try to run the Presentation-language-project as Eclipse App I get:
0 [Thread-1] WARN org.eclipse.xtext.service.AbstractGenericModule - Trying to use method public java.lang.Class<? extends org.eclipse.xtext.ui.core.editor.contentassist.IContentProposalProvider> a.b.AbstractPDLUiModule.bindIContentProposalProvider() for configuration failed
I don't know if this is the correct way. I have read about the DSL linking on different sites and tried the plugin-dependency-thing by myself.
Is this the correct way to do this? Is there a correct and comprehensive documentation for this?
Edit: Okay I solved my Problem by myself. I was wrong with the "(imports+=DomainModel)*". It should be of couse an "Import" instead of the "DomainModel". Also I changed the extended grammar back to standard Terminals and added "<registerGeneratedEPackage value="a.b.dDL.DDLPackage"/>" to the workflow. Now all things work fine!
Thanks for the help!
Sven
PS: I had to remove the links in the code to post this message. h**p means http of course!
[Updated on: Thu, 12 May 2011 08:57]
Report message to a moderator