Home » Modeling » EMF » EMF Compare - ADD / DELETE differences list(EMF Compare Differences List Unpredictable)
EMF Compare - ADD / DELETE differences list [message #1815968] |
Wed, 16 October 2019 07:05  |
Eclipse User |
|
|
|
We are comparing 2 versions of the same file using EMF compare.
The one version (current version) of the file have differences from other version (older) in terms of addition or deletion.
If we add specifications at the start of the file or in between, then EMF compare shows many differences than actual in "ADD" kind.
Whereas if we add specifications at the last, then EMF compare shows exact differences as actual.
Similarly for delete functionality.
If we delete specifications from the start of the file or from anywhere in between, then EMF compare shows many differences than actual and
those are also not in proper sequence. It is very difficult to analyse the exact deletion from the file.
Is this related to some existing bug in EMF Compare? All kind of suggestions/solutions are welcomed.
|
|
| |
Re: EMF Compare - ADD / DELETE differences list [message #1816022 is a reply to message #1815990] |
Thu, 17 October 2019 09:17   |
Eclipse User |
|
|
|
Hello,
Thank you for your quick response.
I am not sure, if I have correctly understood the word "identifiers" you are referring to. I assume that identifiers are Ecore classes which are used/referred in resources while defining the specifications.
Here is the sample Ecore model and the resource file (runtime).
commands
{ set_gablo_8 8 [ hwId = 1 , cmdPkt = 2 , PrivilegeId= 2 , PrivilegeName= gab_engineer_write , PrivilegeId= 1 , PrivilegeName= lmc_engineer_write , long Lo_Freq_Ch_1 = 600000 , long Lo_Freq_Ch_2 = 600000 ]
set_gabconf_9 9 [ hwId = 101 , cmdPkt = 2 , PrivilegeId= 2 , PrivilegeName= gab_engineer_write , PrivilegeId= 1 , PrivilegeName= lmc_engineer_write , float Attn_Ch_1 = 10.0 , float Attn_Ch_2 = 10.0 ]
set_gabconf_10 10 [ hwId = 2 , cmdPkt = 1 , PrivilegeId= 2 , PrivilegeName= gab_engineer_write , PrivilegeId= 1 , PrivilegeName= lmc_engineer_write , long Lo_Freq_Ch_1 = 600000 , long Lo_Freq_Ch_2 = 600000 , float Attn_Ch_1 = 10.0 , float Attn_Ch_2 = 10.0 , short I_P_Mode1_Ch_1 = 0 ]
set_lo_51 51 [ hwId = 2 , cmdPkt = 1 , PrivilegeId= 2 , PrivilegeName= gab_engineer_write , PrivilegeId= 1 , PrivilegeName= lmc_engineer_write , long Lo_Freq_Ch_1 = 600000 , long Lo_Freq_Ch_2 = 600000 ]
set_noise_52 52 [ hwId = 2 , cmdPkt = 1 , PrivilegeId= 2 , PrivilegeName= gab_engineer_write , PrivilegeId= 1 , PrivilegeName= lmc_engineer_write , short I_P_Mode1_Ch_1 = 0 , short I_P_Mode1_Ch_2 = 0 ]
set_mixer_53 53 [ hwId = 2 , cmdPkt = 1 , PrivilegeId= 2 , PrivilegeName= gab_engineer_write , PrivilegeId= 1 , PrivilegeName= lmc_engineer_write , short Mixer_Direct_Path_Ch_1 = 0 , short Mixer_Direct_Path_Ch_2 = 0 ]
setShutdown_109 109 [ hwId = 0 , cmdPkt = 0 , PrivilegeId= 2 , PrivilegeName= gab_engineer_write ]
}
In the above code, if I add new command in between or at start then differences generated are more than actual. Similarly for delete as explained in above comment.
We are generating differences using below code snippet:
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("mpogo", new XMIResourceFactoryImpl());
var Notifier note1 = modelInst; / / current version of a file where we are adding or deleting the specifications
var Notifier note2 = modelInstOld; // older version of a same file
var IComparisonScope scope = new DefaultComparisonScope(note1, note2, note2); // EMFCompare.createDefaultScope(note1,note2)//
var Comparison comparison = EMFCompare.builder().build().compare(scope);
var List<Diff> differences = comparison.getDifferences();
Hope this is giving clear idea of the issue we are facing.
Attachment: Ecore.JPG
(Size: 61.56KB, Downloaded 107 times)
[Updated on: Thu, 17 October 2019 09:19] by Moderator
|
|
| | | | | | |
Goto Forum:
Current Time: Tue Jul 01 14:22:43 EDT 2025
Powered by FUDForum. Page generated in 0.03897 seconds
|