Below is the transform, dump and model.
TRANSFORMATION test2code : src -> tgt
NAMESPACE http:///au/edu/uq/itee/mdavv/wrsa/foxbus/modelManagement.ecore
NAMESPACE http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime.ecore
RULE nowYouSeeMe
FORALL DesignTime d
MAKE println(d, d.components.name,d.components.eClass());
RULE nowYouDont
FORALL Component c
MAKE println(c.name);
INFO: Loaded (11681394) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/transformations/
inaccessibleObjects.qvt
INFO: Loaded (3538808) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/instances/
My.modelmanagement
INFO: Transformation started: test2code
INFO: Constructing stratification...
INFO: ... 1 levels.
INFO: Stratum 0 : nowYouSeeMe, nowYouDont
INFO: Evaluating nowYouSeeMe
INFO: Evaluating nowYouDont
INFO: []
INFO: [nowYouSeeMe::d/
Desig...@tefkat.model.impl.ReferenceExtentImpl@905eb5 (resources:
[org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl@35ff78 uri='platform:/
resource/au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/instances/
My.modelmanagement'])] [Basic Calculations]
[org.eclipse.emf.ecore.impl.EClassImpl@ce88d2 (name: Component)
(instanceClassName: null) (abstract: false, interface: false)]
INFO: TRule: nowYouDont completed.
INFO: TRule: nowYouSeeMe completed.
INFO: Transformation finished
INFO: ResourceSet event 8: null
<?xml version="1.0" encoding="UTF-8"?>
<au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement:Repository
xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement="http:///au/edu/
uq/itee/mdavv/wrsa/foxbus/modelManagement.ecore">
<designTime>
<components name="Basic Calculations"/>
</designTime>
</au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement:Repository>
If this behavior is by design this makes writing transformations very
hard, as you have to write recursive traversal just as you do in Java.
All the nice declarative ease of use immediately goes away. It would
also make debugging very much harder, as you constantly have to watch
you back if you are crossing a package boundary.
The fully-qualified name will work.
RULE nowYouDont
FORALL ::designtime::components::Component c
MAKE println(c.name);
michael
TRANSFORMATION inaccessible: src -> tgt
NAMESPACE http:///au/edu/uq/itee/mdavv/wrsa/foxbus/modelManagement.ecore
NAMESPACE http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime.ecore
NAMESPACE http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime/components.ecore
RULE stillDontSeeIt
FORALL ::designtime::components::Component c
MAKE println(c.name);
INFO: Loaded (25058902) http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime.ecore
INFO: Loaded (9545769) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/transformations/
inaccessibleObjects.qvt
INFO: Loaded (18353341) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/instances/
My.modelmanagement
INFO: Transformation started: test2code
INFO: Constructing stratification...
INFO: ... 1 levels.
INFO: Stratum 0 : nowYouDont
INFO: Evaluating nowYouDont
INFO: []
INFO: TRule: nowYouDont completed.
INFO: Transformation finished
INFO: ResourceSet event 8: null
On Nov 2, 10:26 am, "michael lawley" <mich...@lawley.id.au> wrote:
> The problem is that the Components is in
> http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime/components.ecore,
> not http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime.ecore -- it's
> in a nested package.
>
> The fully-qualified name will work.
>
> RULE nowYouDont
> FORALL ::designtime::components::Component c
> MAKE println(c.name);
>
> michael
>
> > DesignT...@tefkat.model.impl.ReferenceExtentImpl@905eb5 (resources:
> > [org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl@35ff78 uri='platform:/
> > resource/au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/instances/
> > My.modelmanagement'])] [Basic Calculations]
> > [org.eclipse.emf.ecore.impl.EClassImpl@ce88d2 (name: Component)
> > (instanceClassName: null) (abstract: false, interface: false)]
> > INFO: TRule: nowYouDont completed.
> > INFO: TRule: nowYouSeeMe completed.
> > INFO: Transformation finished
> > INFO: ResourceSet event 8: null
>
> > <?xml version="1.0" encoding="UTF-8"?>
> > <au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement:Repository
> > xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> > xmlns:au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement="http:///au/edu/
> > uq/itee/mdavv/wrsa/foxbus/modelManagement.ecore">
> > <designTime>
> > <components name="Basic Calculations"/>
> > </designTime>
> > </au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement:Repository>
>
> > If this behavior is by design this makes writing transformations very
> > hard, as you have to write recursive traversal just as you do in Java.
> > All the nice declarative ease of use immediately goes away. It would
> > also make debugging very much harder, as you constantly have to watch
> > you back if you are crossing a package boundary.- Hide quoted text -
>
> - Show quoted text -
TRANSFORMATION test2code : src -> tgt
NAMESPACE http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime/components.ecore
RULE butNowIdo
FORALL Component c
MAKE println(c.name);
INFO: Loaded (19509258) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/transformations/
inaccessibleObjects.qvt
INFO: Loaded (20383660) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/instances/
My.modelmanagement
INFO: Transformation started: test2code
INFO: Constructing stratification...
INFO: ... 1 levels.
INFO: Stratum 0 : nowYouDont
INFO: Evaluating nowYouDont
INFO: [Basic Calculations]
INFO: TRule: nowYouDont completed.
INFO: Transformation finished
INFO: ResourceSet event 8: null
> > - Show quoted text -- Hide quoted text -
NAMESPACE http:///au/edu/uq/itee/mdavv/wrsa/foxbus/modelManagement.ecore
RULE cannotResolveType
>>> FORALL ::modelManagement::designtime::components::Component
c
MAKE println(c.name);
This one does not parse.
And this one does not find anything:
TRANSFORMATION test2code : src -> tgt
NAMESPACE http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime.ecore
RULE cantSeeFromHere
FORALL ::designtime::components::Component c
MAKE println(c.name);
INFO: Loaded (16019520) http:///au/edu/uq/itee/mdavv/wrsa/foxbus/designtime.ecore
INFO: Loaded (8334151) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/transformations/
inaccessibleObjects.qvt
INFO: Loaded (12677894) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/instances/
My.modelmanagement
INFO: Transformation started: test2code
INFO: Constructing stratification...
INFO: ... 1 levels.
INFO: Stratum 0 : cantSeeFromHere
INFO: Evaluating cantSeeFromHere
INFO: []
INFO: TRule: cantSeeFromHere completed.
INFO: Transformation finished
INFO: ResourceSet event 8: null
Other bonus features of the new build include major improvements to
error reporting from the parser.
michael