|
|
|
|
Re: problems when running mwe2 with Xbase 2.8 [message #1641817 is a reply to message #1630675] |
Sat, 28 February 2015 20:19 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
Xtext has reverted some incompatible changes introduced at M4. My
observations below on changes that may be necessary to MWE2 scripts are
no longer applicable. I have been able to revert my scripts to as they were.
Regards
Ed Willink
On 23/02/2015 10:20, Ed Willink wrote:
> Hi
>
> I've certainly noticed changes in this area, but I'm never sure what
> the correct policy is for multi-layer grammars; I've changed a few
> times since Xtext 2.3 when it was simple; you could import
> platform:/resource/... and everything worked nicely.
>
> With MWE2 2.8, the declarations seem more sensible. You must now
> registerEcoreFile for each platform:/resource/... and it all works.
>
> e.g.
>
> Workflow {
> bean = StandaloneSetup {
> platformUri = "${QVTcoreRuntimeProject}/.."
> scanClassPath = true
> registerEcoreFile =
> "platform:/resource/org.eclipse.ocl.pivot/model/Pivot.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.pivot.qvtcorebase/model/QVTcoreBase.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.ocl.xtext.base/model/BaseCS.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.xtext.qvtcorebase/model/QVTcoreBaseCS.ecore"
> registerEcoreFile =
> "platform:/resource/org.eclipse.qvtd.xtext.qvtcore/model/QVTcoreCS.ecore"
> registerGenModelFile =
> "platform:/resource/org.eclipse.qvtd.xtext.qvtcore/model/QVTcoreCS.genmodel"
> }
>
> however my multi-editor MWE2 scripts don't work anymore: e.g.
>
> Workflow {
> component = @GenerateQVTcoreBaseEditor {}
> component = @GenerateQVTcoreEditor {}
> component = @GenerateQVTimperativeEditor {}
> component = @GenerateQVTrelationEditor {}
> }
>
> Something has incorrectly loaded http:/... instead of, or as well as,
> platform:/resource and so if you have a better platform:/resource than
> http:/... you get the cannot-add-feature diagnostic.
>
> Xtext 2.8 has also gone backwards. It too seems determined to use the
> referenced http:/... intermittently rather than the required
> platform:/resource, so somehow the magic model index that burns cycles
> to support the requirement to reference the wrong model doesn't
> correct the wrong reference. I now ignore Xtext editor errors that I
> don't believe.
>
> Bring back Xtext 2.3; you import what you actually want and no clever
> index is needed to re-interpret what you import. A system that
> requires an erroneous declaration seems doomed to fail.
>
> Regards
>
> Ed Willink
>
> On 23/02/2015 09:31, Lorenzo Bettini wrote:
>> Hi
>>
>> I'm currently using Xtext 2.8 from the nightly update site, in a
>> language that uses Xbase
>>
>> this morning I've updated it and using 2.8.0.v201502220955
>>
>> when running the mwe2 workflow I'm getting many errors of the shape
>>
>> 928 [main] ERROR ipse.xtext.generator.LanguageConfig -
>> [TransformationDiagnostic: null:123 Cannot add supertype 'XExpression'
>> to sealed type 'OrExpression'.
>>
>> TransformationDiagnostic: null:123 Cannot add supertype 'XExpression' to
>> sealed type 'OrExpression'. (ErrorCode:
>> CannotCreateTypeInSealedMetamodel)
>>
>> where OrExpression is defined in a rule as follows
>>
>> PremiseExpression returns xbase::XExpression:
>> TerminalPremiseExpression
>> =>({OrExpression.branches+=current} ...
>> ;
>>
>> has anything changed in the way rules and inheritance relations must be
>> specified, or is it just a bug in this version?
>>
>> thanks in advance
>> Lorenzo
>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04136 seconds