hi Christian,
thanks for your explanation.
i succeed by playing some tricks.
i put the profiles at the same folder as the model file. and
replace text in the model file like this:
pathmap://ARCTIS_PROFILES/arctis.profile.uml .....
-> ARCTIS_PROFILES/arctis.profile.uml
then henshin can recognize the model file.
this needs a simple manual manipulation.
i wonder if there can be a way that henshin can load a profile
and use the profile as the loaded metamodel of a model for
manipulation ... ...
many thanks!
yours sincerely,
Fenglin Han
On 16.04.2012 20:34, Christian Krause wrote:
Hi Simon,
this is not a problem of Henshin. The loading of models is
completely done by EMF. There is no bug or anything like this. It
is just a matter of correctly using URIs. Proper URI handling can
be quite tricky in EMF.
Looking at your example, the first problem I see is that I am not
aware o the "pathmap" scheme in the first example. If you want to
refer to a file in your workspace, the correct way to do it would
be using a platform-resource URI:
platform:/resource/project-name/path
where you have to replace "project-name" and "path". Using this
pattern you can access files in your workspace using an absolute
path (within your workspace, not the filesystem!).
What works better in practice is to use relative URIs. In your
model, a relative path could be used like this:
<references xmi:type="ecore:EPackage" href="">"arctis.profile.uml#_WFTqUXjGEdyxtoUMycQn9Q"/>
assuming that the UML model and the profile are located in the
same directory.
Of course, you are not editing your models using a text editor.
What you have to ensure is that in the editors you use you
properly import your models, e.g. using relative paths. When you
save the files, open them in a text editor and make sure the URIs
are ok. If you refer to elements in other files, you usually
should have relative paths or platform-resource URIs.
Cheers,
Christian
On 04/16/2012 02:38 PM, sih wrote:
hi Christian,
i have a problem with applying henshin to the uml model i
use. it seems to be the problem of pathmap definition in the
model plugin.
for example the following lines compares two ways of importing a
profile:
<profileApplication xmi:id="_uMWN8YYXEeGsGOj-M3HL4Q">
<eAnnotations xmi:id="_uMWN8oYXEeGsGOj-M3HL4Q" source=MailScanner
has detected a possible fraud attempt from
"www.eclipse.org" claiming to be
"http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="">"pathmap://ARCTIS_PROFILES/arctis.profile.uml#_WFTqUXjGEdyxtoUMycQn9Q"/>
</eAnnotations>
<appliedProfile
href=""/>
</profileApplication>
<profileApplication xmi:id="_ONjgoIYYEeGsGOj-M3HL4Q">
<eAnnotations xmi:id="_ONjgoYYYEeGsGOj-M3HL4Q" source=MailScanner
has detected a possible fraud attempt from
"www.eclipse.org" claiming to be
"http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href=""true" class="moz-txt-link-freetext"
href="file:/E:/Program%20Files/Papyrus-1.12/workspace/ArctisProfile/model/arctis.profile.uml#_85TLIAoDEeGPj89VQGUoOg">file:/E:/Program%20Files/Papyrus-1.12/workspace/ArctisProfile/model/arctis.profile.uml#_85TLIAoDEeGPj89VQGUoOg"/>
</eAnnotations>
<appliedProfile href="" moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="file:/E:/Program%20Files/Papyrus-1.12/workspace/ArctisProfile/model/arctis.profile.uml#_lbS9gFm_Ed-BsIyprHxBdA">"file:/E:/Program%20Files/Papyrus-1.12/workspace/ArctisProfile/model/arctis.profile.uml#_lbS9gFm_Ed-BsIyprHxBdA"/>
</profileApplication>
Henshin will recognize the second way of importing the profiles.
but the first way,the profile is contained in the plugin in the
eclipse environment, won't.
Can henshin support pathmap in eclipse plugin? if not, is there
a compensate way?
yours sincerely,
Simon Han
On 14.04.2012 11:43, Christian Krause wrote:
Hi Simon,
if the attribute is of type String and you want to assign the
constant "hahah" to it, the correct _expression_ would be:
body="hahah"
So if you want to use a string constant, you have to use the
quotes.
Cheers,
Christian
Am 13.04.2012 21:15, schrieb sih:
hi i got a not-working example:
this one is not related with profiling, is about add
attributes to the nodes.
add a comment to a flow final node.
if i put a attribute to the comment, the transformation will
not working, if i delete the property in the comment node.
the rule will work.
since any "real" uml models will contain attributes, this
should be corrected.
to avoid complexity, i did not apply any profile.
you can test it out with the attached files: root model :
My1.uml henshin file: uml_metamodel.henshin
yours sincerely,
Simon Han
_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev
_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev
_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev
_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev
|