Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Programmatically opening compare editor(How to programmatically open EMF Comparison editor)
Programmatically opening compare editor [message #1047753] Tue, 23 April 2013 15:54 Go to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Hi all!

I'm trying to update all my EMF Compare 1.3 API usage in favour of the new EMF compare 2.1. You guys took seriously breaking API Razz Jokes aside, the new API seems to solve much of the extensibility issues I had with 1.3. The effort is pretty much welcome!

So, to test how everything works, what's better than debugging the new code, right?
Well, I'm kinda stuck with the entry point. I use to had some code that launched comparisons over our models and opened the tree-based comparison editors.

According to:

http://wiki.eclipse.org/EMF_Compare/How_To_Open_Compare_Dialog_With_Comparison

There seems to exist a new ICompareEditingDomain, but for some reason I can't seem to find it.

BTW ComparisonEditorInput is internal, is there any legit way to get it?

I'm using EMF Compare 2.1M6, downloaded from
http://www.eclipse.org/downloads/download.php?file=/modeling/emf/compare/downloads/drops/2.1.0/S201303191750/emf-compare-update-2.1.0M6.zip&protocol=http

I'd appreciate any feedback!
Victor
Re: Programmatically opening compare editor [message #1048210 is a reply to message #1047753] Wed, 24 April 2013 07:07 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi Victor,

Quote:
You guys took seriously breaking API Razz


Yup, that was the main reason for 2.0 : to break everything apart Twisted Evil.

More seriously, though we did break everything, the goal was to get rid of the limitations of the previous architecture Wink. We hope that this will be your general feeling too as a client of the API Smile.

Do not hesitate to ask if you think some of compare's internals should be exposed : the new API is meant to be much more extensible, but may still be missing bits and pieces.

Quote:
There seems to exist a new ICompareEditingDomain, but for some reason I can't seem to find it.


ICompareEditingDomain is part of org.eclipse.emf.compare.edit.

Quote:
BTW ComparisonEditorInput is internal, is there any legit way to get it?


I am pretty sure this was meant to be public API. Mikaël, could you take a look?

Laurent Goubet
Obeo
Re: Programmatically opening compare editor [message #1048277 is a reply to message #1048210] Wed, 24 April 2013 08:47 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Laurent,

first of all, thanks for your prompt feedback

Quote:

Yup, that was the main reason for 2.0 : to break everything apart .

More seriously, though we did break everything, the goal was to get rid of the limitations of the previous architecture . We hope that this will be your general feeling too as a client of the API .

Do not hesitate to ask if you think some of compare's internals should be exposed : the new API is meant to be much more extensible, but may still be missing bits and pieces.


At first glance, things make much more sense now, cleaner and full of nice APIs to be extended / implemented. Previously, customizations of the comparison engines required some nasty hacks.
Now I'm trying to figure out how to migrate all that logic, hopefully I would be able to get rid of a big part of it.

Quote:

ICompareEditingDomain is part of org.eclipse.emf.compare.edit.


ha! so thats the reason I couldn't find it, missing ".edit" in the namespace. I thought best practices pushed us to use bundle namespace in the java packages too. My first though was that .edit bundle corresponded to old's 1.X emf's .edit framework generated bundle. I see this is something different now in 2.X.

Quote:

I am pretty sure this was meant to be public API. Mikaël, could you take a look?


Very much appreciated!

Cheers,
Víctor [Open Canarias]
Re: Programmatically opening compare editor [message #1048994 is a reply to message #1048277] Thu, 25 April 2013 08:03 Go to previous messageGo to next message
Mikael Barbero is currently offline Mikael BarberoFriend
Messages: 55
Registered: July 2009
Member
Hi Victor,

BTW ComparisonEditorInput is internal, is there any legit way to get it?


ComparisonEditorInput really is internal currently because we are not confident about its API yet. You may use it, but we may break its API sooner or later. Actually, I'm thinking of removing this EditorInput in favor of ComparisonScopeEditorInput which is more flexible and which let the UI know about the scope which is not possible from the Comparison's one.

My advice would be to duplicate the code for yourself if you need stability over the next release or to rely on ComparisonScopeEditorInput which I hope to be more stable.

Hope this helps.

Best regards,
Mikael


Best regards,

Mikael Barbero
Obeo
Re: Programmatically opening compare editor [message #1049044 is a reply to message #1048994] Thu, 25 April 2013 09:20 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Mikael,

thanks for the hint. I already moved to ComparisonScopeEditorInput. The downside (if im correct) is that comparison takes place upon editor open action, no big deal anyway.

Cheers,
Víctor [Open Canarias]
Re: Programmatically opening compare editor [message #1049110 is a reply to message #1049044] Thu, 25 April 2013 11:26 Go to previous messageGo to next message
Mikael Barbero is currently offline Mikael BarberoFriend
Messages: 55
Registered: July 2009
Member
The downside (if im correct) is that comparison takes place upon editor open action


Yes, it does take place after the open action. The upside is that it sticks a little bit more to the behavior of the Eclipse Team/Compare framework.


Best regards,

Mikael Barbero
Obeo
Re: Programmatically opening compare editor [message #1049178 is a reply to message #1049110] Thu, 25 April 2013 13:26 Go to previous message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
I see, I guess you are right: if post processing between comparison and opening the editor is necessary, it's IPostProcessor responsibility to do such thing Smile

Thanks!
Previous Topic:[EMF Compare] Compute degree of similarity
Next Topic:MOVE DifferenceKind semantics
Goto Forum:
  


Current Time: Thu Apr 25 00:14:56 GMT 2024

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

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

Back to the top