September 16, 2008

(English) Getting oaw TraceComponent working

For openarchitectureware 4.3 there is a tracing extension available. It allows to create a tracing model of your model2model or model2text transformations. For example you can process this tracing model to generate a HTML, XML, ... documentation of your model transformations.

Unfortunately the extension does not work out of the box for me. I'm using openarchitectureware 4.3.1 from the oaw-development pluginbuilder on a mac. Exactly I use 4.3.1.20080910-1400PRD. After a little time of debugging I found a solution to get it working:

  • check out project org.openarchitectureware.util.stdlib from the oaw CVS

  • switch that projet to branch B_v43 (Team - Switch to Another Branch or Version...)

  • hint: the project must be placed in the workspace where the oaw project is located that will use tracing, because a reference to the trace metamodel (trace.ecore) in the plugin is incorrect (it points to ${workspace}/org.openarchitectureware.util.stdlib/src/org/openarchitectureware/util/stdlib/trace.ecore)


workflow:
<workflow>
<bean class="org.eclipse.mwe.emf.StandaloneSetup" >
<-- important to get the correct workspace path -->
<platformUri value=".."/>
</bean>

<-- XtendComponent and/or Generator -->

<component class="org.openarchitectureware.util.stdlib.TraceComponent">
<traceModelSlot value="tracemodel" />
<traceName value="trace" />
</component>

<component id="traceWriter" class="org.openarchitectureware.emf.XmiWriter">
<inputSlot value="tracemodel"/>
<modelFile value="gen/tracing.trace"/>
</component>
</workflow>

An short example of tracing model2model transformation shows the following snippet:
extension org::openarchitectureware::util::stdlib::tracing;

create Class Class2Table(Class c) :
createTrace(c,this,"m2m") ->
setName(c.name);

5 comments:

  1. Hi Michael!

    I'm writing a documentation of the stdlib features for oAW's reference manual. Can I copy the samples from your blog here?

    Best wishes,
    ~Karsten

    ReplyDelete
  2. Hi Karsten,
    of course you can use it.

    Regards,
    micha

    ReplyDelete
  3. Do you know if this problem happens in oaw 5( Eclipse Modeling)????

    ReplyDelete
  4. No, I have not been tested

    ReplyDelete