| Summary: | [Core] Problem in the build of context menu | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Patrick Tessier <Patrick.Tessier> | ||||
| Component: | Core | Assignee: | Patrick Tessier <Patrick.Tessier> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | Keywords: | plan | ||||
| Version: | 0.7.0 | ||||||
| Target Milestone: | M1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Patrick Tessier
Created attachment 126713 [details]
mylyn/context/zip
change in the editor to allow click right
The problem was not due to the ActionBar contributor. This problem xas raised by a bad editing domain.
In order to create a request of destruction, a transactionnal editing domain has to be used.
Somewhere in the code of GMF, the current editor is adapted to IEditingDomainProvider. The code in the backbone was:
return (IEditingDomainProvider) defaultContext.getTransactionalEditingDomain().getResourceSet();
But the provider of a transactionalEditingDomain obtained by getResourceSet return a AdapterFactoryEditingDomainResourceSet.
But this resourceSet has teh following code:
public EditingDomain getEditingDomain()
{
return AdapterFactoryEditingDomain.this;
}
In some words, if you ask to a transactionalEditingDomain his provider, the obtained provider can not give you the transactional editong domain.
To solve it, I have done the same things as GMF editor:
- I have created an inner class :
/**
* My editing domain provider.
*/
private IEditingDomainProvider domainProvider = new IEditingDomainProvider() {
public EditingDomain getEditingDomain() {
return CoreMultiDiagramEditor.this.defaultContext.getTransactionalEditingDomain();
}
};
-In the method getAdapter(), I return the local variable domainProvider.
In this maner, this domain provider can return a TransactionalEditDomain and not an EditingDomain
|