Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » emf-merge.xml - what does $$ mean and other questions
emf-merge.xml - what does $$ mean and other questions [message #757178] Thu, 17 November 2011 00:23 Go to next message
Gennady Agranov is currently offline Gennady AgranovFriend
Messages: 1
Registered: November 2011
Junior Member
Hi!

1. I was looking at emf-merge.xml and found this rule:

<merge:pull
sourceGet="EnumConstant/getBody"
targetMarkup="^lastgen$|^gen$|^modifiable$|^model$$"
targetPut="EnumConstant/setBody"/>

Can it be just a typo and it should be:

targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"

But what if I missing something and it is important?

And what does $$ mean as pattern element - is it valid?

2. And what about this rule:

<merge:pull
sourceGet="Member/getFlags"
targetMarkup="^gen$"
equals="Member/getName"
targetPut="Member/setFlags"/>


What does equals="Member/getName" mean?

3. And is there some javadoc or other information about merge.xml directives?

I am using JMerge to create customizable java files from emf models (but not genmodel based)

Thank you very much,

Gennady
Re: emf-merge.xml - what does $$ mean and other questions [message #757955 is a reply to message #757178] Thu, 17 November 2011 07:16 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Gennady,

Comments below.

On 17/11/2011 1:23 AM, Gennady Agranov wrote:
> Hi!
>
> 1. I was looking at emf-merge.xml and found this rule:
> <merge:pull
> sourceGet="EnumConstant/getBody"
> targetMarkup="^lastgen$|^gen$|^modifiable$|^model$$"
> targetPut="EnumConstant/setBody"/>
>
> Can it be just a typo and it should be:
> targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"
Looks like a typo to me, yes.
>
> But what if I missing something and it is important?
>
> And what does $$ mean as pattern element - is it valid?
Well, $ is supposed to match the end of the line, so I don't think $$ is
all that meaningful. Maybe it will match model$ at the end of the line,
but that's not the intent.
>
> 2. And what about this rule:
>
> <merge:pull
> sourceGet="Member/getFlags"
> targetMarkup="^gen$"
> equals="Member/getName"
> targetPut="Member/setFlags"/>
>
>
> What does equals="Member/getName" mean?
That means those two things have to have the same method name. It's to
ensure that if you merge foo into "fooGen" that you can have fooGen be
private even though foo is public.
>
> 3. And is there some javadoc or other information about merge.xml
> directives?
No, there's a shortage of that! JControlModel shows how the file is
read, but that's about it...
>
> I am using JMerge to create customizable java files from emf models
> (but not genmodel based)
Yes, it's certainly intended to be reusable.
>
> Thank you very much,
>
> Gennady
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Advise on the ecore creation
Next Topic:[EMFT] WorkspaceSynchronizer doesn't checks that URI is not a platform resource URI
Goto Forum:
  


Current Time: Tue Apr 23 09:50:49 GMT 2024

Powered by FUDForum. Page generated in 0.02589 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top