Customized EMF Comare UI [message #1053697] |
Tue, 07 May 2013 09:36 |
Anuj Mehta Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi,
EMF Compare gives us standard UI where we can compare the structural differences of two EMF models.
In our use case we can't use this functionality because we are showing EMF model in the form based editor UI so if we need to compare two EMF models then we need to compare the two form based editors.
So couple of doubts ....
1. Is there any support available by which we can enhance the standard EMF compare UI?
2. Is it possible to feed the comparisons (after calling compare method from EMFCompare class of two EMF models) to this customized UI If not then how can we extract the useful data form comparisons and create our own UI out of it.
[Updated on: Tue, 07 May 2013 10:48] Report message to a moderator
|
|
|
|
Re: Customized EMF Comare UI [message #1053880 is a reply to message #1053724] |
Wed, 08 May 2013 05:47 |
Anuj Mehta Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi Cedric,
Thanks for sharing the valuable information on this topic.
Regarding to the first Question
Currently I have used following APIs
Factory fatory1 = FactoryImpl.init();
Action action1 = fatory1.createAction();
action1.setName("Action1");
EMFController emfModel1 = fatory1.createEMFController();
emfModel1.getActions().add(action1);
Method method1 = fatory1.createMethod();
method1.setName("Method1");
emfModel1.getMethods().add(method1);
Factory fatory2 = FactoryImpl.init();
Action action2 = fatory2.createAction();
action2.setName("Action2");
EMFController emfModel2 = fatory2.createEMFController();
emfModel2.getActions().add(action2);
Event event2 = fatory2.createEvent();
event2.setName("event2");
emfModel2.getEvents().add(event2);
IMatchEngine.Factory factory = new MatchEngineFactoryImpl(UseIdentifiers.NEVER);
IMatchEngine.Factory.Registry matchEngineRegistry = new MatchEngineFactoryRegistryImpl();
matchEngineRegistry .add(factory);
EMFCompare comparator = EMFCompare.builder().setMatchEngineFactoryRegistry(matchEngineRegistry).build();
Comparison comparison = comparator.compare(EMFCompare.createDefaultScope(emfModel1, emfModel2));
ICompareEditingDomain editingDomain = EMFCompareEditingDomain.create(emfModel1, emfModel2,emfModel1);
AdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
CompareEditorInput input = new ComparisonEditorInput(new CompareConfiguration(), comparison, editingDomain, adapterFactory);
CompareUI.openCompareEditor(input,true);
And the output is
Structure Compare
* EMFController
*[^] Action Action1
Action1[name changed]
*[-] Event event2[events delete]
*[+] Method Method1[methods add]
(Since cannot paste the image so showing by typing....)
This above structure compare suiting well in our use case but can be little enhanced...So couple of Doubts :
1. Currently Text Compare is empty what should be done extra in order to use this.
2. If we select any of the object in the Structure Compare nothing is shown in the properties view ...so how can we integrate properties view with this compare editor.
3. How can we change the icons of the different objects...Actually In our use case we have different icons for these objects.
[Updated on: Wed, 08 May 2013 05:50] Report message to a moderator
|
|
|
|
|
|
Re: Customized EMF Comare UI [message #1065135 is a reply to message #1057856] |
Mon, 24 June 2013 13:21 |
Axel RICHARD Messages: 43 Registered: September 2010 Location: France |
Member |
|
|
Hi Anuj,
You say in your previous message that you have an answer for this problem: "If we select any of the object in the Structure Compare nothing is shown in the properties view ...so how can we integrate properties view with this compare editor."
Could you tell me more about how solution did you use to solve the problem ?
Thanks,
Axel.
Axel Richard
Obeo
[Updated on: Mon, 24 June 2013 13:22] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03588 seconds