This service is archived, please use www.eclipse.org/forums


Home » Archived Projects » Kitalpha » [CoEvolution/Transposer] eReference traces management
[CoEvolution/Transposer] eReference traces management [message #863] Mon, 30 May 2016 10:53 Go to next message
Nesrine Badache is currently offline  Nesrine Badache
Messages: 37
Registered: April 2015
Member
Hi,

are changes in eReferences managed in CoEvolution traces? For exemple :


object "Msg" to be transposed, has a eReference to another object "Type1". If I change from Type1 to another Type2, the transposer/coevolution diffmerge doesn't see the differences, so I can't impact the changes
from the diffmerge wizard.
Any clue about this?

Best Kinds,

Nesrine.
Re: [CoEvolution/Transposer] eReference traces management [message #866 is a reply to message #863] Wed, 01 June 2016 06:49 Go to previous messageGo to next message
Olivier Constant is currently offline  Olivier Constant
Messages: 21
Registered: August 2014
Junior Member
Hi Nesrine,

Nice catch. Just to be sure I correctly analysed the problem and the kind of solution I think of is OK: If you make the following change, are you satisfied by the result?

In class org.eclipse.emf.diffmerge.bridge.incremental.BridgeTraceBase dMatchPolicy, in method getMatchID, add the following lines just before the last line.
if (result != null)
  result = result.toString() + '|' + element_p.eClass().getName(); 
Re: [CoEvolution/Transposer] eReference traces management [message #867 is a reply to message #866] Wed, 01 June 2016 10:00 Go to previous messageGo to next message
Nesrine Badache is currently offline  Nesrine Badache
Messages: 37
Registered: April 2015
Member
Hi Olivier,


I've try with the additional line like this :

	public Object getMatchID(EObject element_p, IModelScope scope_p)
	{
		IBridgeTrace trace = scope_p == _createdScope ? _createdTrace : _existingTrace;
		Object result = trace.getCause(element_p);
		if (result != null)
			result = result.toString() + '|' + element_p.eClass().getName();
		return result;
	}


but still, no impact on the eRefences and the "diffmerg" wizard. Any other idea?

Best kinds,

Nesrine.
Re: [CoEvolution/Transposer] eReference traces management [message #872 is a reply to message #867] Thu, 02 June 2016 11:42 Go to previous messageGo to next message
Olivier Constant is currently offline  Olivier Constant
Messages: 21
Registered: August 2014
Junior Member
OK. Can you tell me where Type1 and Type2 are defined? In the model itself, in some shared library, in a platform plugin?
If possible, a snapshot might also give me a clue.
Re: [CoEvolution/Transposer] eReference traces management [message #873 is a reply to message #872] Fri, 03 June 2016 03:22 Go to previous messageGo to next message
Nesrine Badache is currently offline  Nesrine Badache
Messages: 37
Registered: April 2015
Member
Hi,


Let int and boolean two types defined in the source model. For the tranformation needs, an existing library type "TypesLib" is used. Transposer compare the names and use the corresponding type one in that library at the target model.

Library type:
 
<ISs xsi:type="IS" xmi:id="_hZQFMEo1EeSGbIZYaUD-EQ" name="TypesLib">
    <types xsi:type="SimpleType" xmi:id="_uHU9gEo5EeSGbIZYaUD-EQ" name="int"/>
    <types xsi:type="SimpleType" xmi:id="_yf-_0Eo5EeSGbIZYaUD-EQ" name="boolean"/>
<IS>



at Target transposed model :
<parameters xsi:type="Parameter" xmi:id="_xJ4ygClgEeaPCtVALmaqsg" name="MyParam">
      <type href="Types/TypesLib.xml#_uHU9gEo5EeSGbIZYaUD-EQ"/>
   </parameters>



So if I change in the source "int" by boolean, diffmerge doesn't see it.
I hope that is clearer. Don't hesitate Ffor further details.

Best Kinds,

Nesrine
Re: [CoEvolution/Transposer] eReference traces management [message #876 is a reply to message #873] Mon, 06 June 2016 04:18 Go to previous messageGo to next message
Olivier Constant is currently offline  Olivier Constant
Messages: 21
Registered: August 2014
Junior Member
Nesrine, I am pretty sure this is because the library is not included in the scopes being compared. This could be fixed by hand in an ad-hoc manner in your specific case. Or, it could be fixed in a general way by adding explicit support for such cases in the technology. Clearly there is a need for that, as shown by other use cases I have seen. It is in my TODO list, but it will take time before I achieve it (probably several weeks).
So it really depends on your time constraints: either I help you investigate an ad-hoc fix, or you wait for the general fix. Up to you.
Re: [CoEvolution/Transposer] eReference traces management [message #878 is a reply to message #876] Mon, 06 June 2016 08:01 Go to previous messageGo to next message
Nesrine Badache is currently offline  Nesrine Badache
Messages: 37
Registered: April 2015
Member
Hi Olivier,

thank you for your answer. It's very kind of you but no need for an ad-hoc manner for my use case. I'll wait for the general fix. Good luck with it, and I'll will come back to you if I have such feedbacks.

Best Kind,

Nesrine.
Re: [CoEvolution/Transposer] eReference traces management [message #879 is a reply to message #878] Mon, 06 June 2016 11:44 Go to previous messageGo to next message
Olivier Constant is currently offline  Olivier Constant
Messages: 21
Registered: August 2014
Junior Member
OK, sounds good. You may want to create an Eclipse Bugzilla entry to track my work.
For example, you may go to https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMF.Diff merge and fill the form by just selecting the "Co-Evolution" component and copy/pasting your message #873.
Re: [CoEvolution/Transposer] eReference traces management [message #881 is a reply to message #879] Wed, 08 June 2016 07:35 Go to previous messageGo to next message
Nesrine Badache is currently offline  Nesrine Badache
Messages: 37
Registered: April 2015
Member
Ok,

it's done at Bug 495686.
Re: [CoEvolution/Transposer] eReference traces management [message #883 is a reply to message #881] Fri, 10 June 2016 09:47 Go to previous message
Olivier Constant is currently offline  Olivier Constant
Messages: 21
Registered: August 2014
Junior Member
Nice. Posting link here.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=495686
Previous Topic: [VPDSL][GRAMMAR] Using Java grammar
Next Topic: Eclass CAPELLA not defined as extensible
Goto Forum:
  


Current Time: Wed Jan 22 00:10:58 EST 2020

Total time taken to generate the page: 0.01941 seconds