viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

Magic green button doesn't work with Papyrus UML editor #318

Closed abelhegedus closed 11 years ago

abelhegedus commented 11 years ago

I installed the latest Papyrus and have tried to load a model from their "PapyrusMultiDiagramEditor" but it seems that neither of our handlers match it.

istvanrath commented 11 years ago

@szabta89 please take a look at this issue.

szabta89 commented 11 years ago

@abelhegedus Can you give me some hints on how to extract the domain model from a papyrus editor? I googled it a lot but did not find any proper solution, as it seems the EditingDomain's ResourceSet also contains GMF elements.

bergmanngabor commented 11 years ago

EditingDomain's ResourceSet also contains GMF elements Isn't that always the case with GMF editors?

Anyways, we can always extract the whole ResourceSet, right? So the real question is the resource-scoped loading. I think if we, at long last, still cannot find a reliable way to determine which resource corresponds to the domain model, then it would be acceptable to omit this scope limitation functionality in case of Papyrus.

Then again, isn't there a generic GMF solution for finding the domain model? Or if all else fails, can we not make a good Papyrus-specific guess based on the resource URI, e.g. find the one that ends in .uml or something similar?

ujhelyiz commented 11 years ago

As I was thinking about using UML models as example, I looked into this issue, and found, that the Papyrus editor uses the IDiagramWorkbenchPart interface for its multipage editor.

I updated the code and it seems working for me.