[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt.amw] Re: [AMW] Problems with AMW weaver editor loading Traceability weaving model

Hello,

Thanks for your fast response :)


I followed all your advices but it doesn't load anyway.

I use Eclipse Europa, and all plugins downloaded via Update Site (except AMW is last version from CVS).



Hello,

this seems to be related with the uri of the models. Since you use Ecore .ecore as your metamodel, it may have a conflict with the Ecore metametamodel, which is always loaded. I would advise you to consider you models as metamodels.

Anyway, check if the 'xmlns' attribute of the models match with the metamodels.


It match for all models with the metamodel.


If they are ok, there are 2 things to try:

1/ instead of specifying the file path in the "metamodel-relative-path" element, use the uri "http://www.eclipse.org/emf/2002/Ecore";. You can set this feature in the second page of the wizard, or you can modify it directly the .prop file;

I tried it but i got the same error even -clean start option.


2/ select only "Metamodel" in the second page of the wizard. The property file won't have the "model-relative-path" element.


When you write "second page" ¿Do you mean 3th page? because in 2nd one I only see the option specify weaving model.



Regards,

Marcos.



Thank you!!,
Jose Carlos

José Carlos Herrero wrote:
Hello,

I have some problems getting loaded my traceability models in AMW weaver editor.

The scenario is:

 1- Simple ATL example transformation:
--
  module MDL01; -- Module Template
  create MDL01 : ECORE from source2 : ECORE;

  rule EPackage2EPackage {
    from
        i     :    ECORE!EPackage
    to
        o     :    ECORE!EPackage (
                name<-i.name,
                eClassifiers <- i.eClassifiers
        )             }

  rule EClass2EClass {
    from
        i     :    ECORE!EClass
    to
        o     :    ECORE!EClass (
                name<-'new_'+i.name,
                eStructuralFeatures <-i.eStructuralFeatures
                               )
  }
  rule EAttribute2EAttribute {
    from
        i     :    ECORE!EAttribute
    to
        o     :    ECORE!EAttribute (
                name<-i.name,
                eType<-i.eType
                )     }
--

  2- I followed ATLWtracer3_2 case study instructions:

2.1 Transform above ATL code in ecore (right mouse button) OK
2.2 Execute ATLWTracer.atl (I got transformWithTraces.ecore) OK
2.3 Transform from ecore to ATL transformWithTraces.ecore OK
2.4 Execute transformWithTraces.ecore OK
2.4.1 Model output transformation is correct
2.4.2 Traces are aparently correct
(It loads in sample ecore model editor -registering mmw_traceability.ecore-)
2.5 I followed traceability tutorial and I obtained the following properties file:


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<weaver>
<weaving>
<relative-path>/AMW_Sample/Ecore2Ecore/outtrace.amw</relative-path>
<panel>DefaultWeavingPanelExtension</panel>
<wmodel>TraceModel</wmodel>
</weaving>
<metamodels>
<plugin>
<relative-path>org.eclipse.weaver.extension.base/metamodels/mw_base_extension.km3</relative-path>


</plugin>
<local>
<relative-path>/AMW_Sample/TraceabilityExtension.km3</relative-path>
</local>
<complete/>
</metamodels>
<woven id="0">
<model-relative-path>/AMW_Sample/Ecore2Ecore/source2.ecore</model-relative-path>


<metamodel-relative-path>/AMW_Sample/Ecore2Ecore/Ecore.ecore</metamodel-relative-path>

<reference>wovenModels</reference>
<title>source2</title>
<panel>DefaultWovenPanelExtension</panel>
<wmodelref>TraceModelRef</wmodelref>
</woven>
<woven id="1">
<model-relative-path>/AMW_Sample/Ecore2Ecore/outmodel.ecore</model-relative-path>


<metamodel-relative-path>/AMW_Sample/Ecore2Ecore/Ecore.ecore</metamodel-relative-path>

<reference>wovenModels</reference>
<title>MDL01</title>
<panel>DefaultWovenPanelExtension</panel>
<wmodelref>TraceModelRef</wmodelref>
</woven>
</weaver>

2.6 When I load my outtrace.amw file in weaver editor I obtain the following exception:

org.eclipse.weaver.exception.WeaverException: Problems with this file "/AMW_Sample/Ecore2Ecore/outmodel.ecore"
The feature 'StructuralFeature' is not a valid feature
at org.eclipse.weaver.core.WeaverModelManager.initWoven(WeaverModelManager.java:219)


at org.eclipse.weaver.core.WeaverModelManager.<init>(WeaverModelManager.java:97)

at org.eclipse.weaver.editors.GlobalWeaverEditor.initModelManager(GlobalWeaverEditor.java:390)

...


I got AMW sources and I debugged it but I can't figure out how to solve this problem. By the way I tried to do the same with the models of the ATL2WTracer3_2 and all works fine.





Thanks in advance for your help, Jose Carlos.