[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: Update/Synchronize diagram after execute EMF operations
|
Alex, thank you very much for your answer but I probably didn't explain myself clearly.
I think my problem is not a refresh one. If I'm not wrong, the handler that you suggest me as an example (F5 handler) refreshes diagrams elements, but it does not delete graphical elements, automatically, for which the semantic element has also been deleted or it does not create graphical elements, automatically, when a semantic element is created.
I will try to explain my problem better. With my GMF customized commands, which only invoke my EMF customized operations (using only EMF api), I only create or delete semantic elements. In a customized dialog, I execute a customized command directly and I do not execute any other command to create or delete the corresponding graphical elements for the created/deleted semantic element.
For example, when I want to delete a semantic element mapped to a PolilyneConnection and I get the ICommand from the AbstractEditHelper (getEditCommand) then the ICommand returned is composed of several commands: 1 command to destroy the semantic element and 5 other commands to destroy the corresponding graphical elements (2 DecorationNodeImpl, 2 ConnectorImpl and 1 RelativeBendpointsImpl). When I execute this editHelper composite command then semantic and graphical elements are correctly deleted. If I only execute my customized command, which inherits from the basic DestroyElementCommand but it only invokes the EMF method to destroy the semantic element, the corresponding graphical elements are not deleted and still remain in the diagram. This seems quite logic because destroy commands for graphical elements are not executed but I thought that, someway, semantic elements would notify graphic elements in order to be automatically updated in accordance.
Is it possible to do what I am trying to do?
Haven't I invoked correctly the F5 handler?
Are GMF bugs generating this incorrect situation?
Is GMF designed to be synchronized with EMF by means of the editHelper classes and it is the "only" way to proceed?