Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #473263 +++ Steps to reproduce: . Open a DTree/DTable . Open the aird a text editor, modify it (add a space) and save . The aird is reloaded . Set the focus to the DTable/DTree editor . Popup "The root element has been deleted, the editor will close." > KO The main issue seems to be the aird reload with an open Table or Tree editor: our Tree and Table editors are not able to resolve their proxy Viewpoint/Sirius element, see: . AbstractDTableEditor.table . DTreeEditor.treeModel . DDiagramEditor.setFocus: getDiagramGraphicalViewer().getRootEditPart().getChildren().get(0): DDiagramEditPart.resolveSemanticElement is able to resolve the proxy. Fast working DRAFT: > private void checkSemanticAssociation() { > if (tableModel != null && tableModel.eIsProxy()) { > URI uri = ((InternalEObject) tableModel).eProxyURI(); > tableModel = (DTable) session.getTransactionalEditingDomain().getResourceSet().getEObject(uri, false); > } > if (tableModel == null || tableModel.eResource() == null || tableModel.getTarget() == null || tableModel.getTarget().eResource() == null) { > ... Look for resolve/resolveSemanticeElement methods into GrapicalEditPart/ViewUiil/EMFCoreUtile/Util/EcoreUtil
New Gerrit change created: https://git.eclipse.org/r/52882
New Gerrit change created: https://git.eclipse.org/r/52881
The 52881 review is the cherry-pick of the correction done on 2.x and 3.0.x branches. We could improve this correction on master: . instead of doing the proxy resolution only in setFocus() for tree and table, we could call it from AbstractDTreeEditorSessionListenerDelegate as it detect the SessionListener.REPLACED event. . we could do the same from DDiagramEditorSessionListenerDelegate, but for diagram, if the aird has been replaced this means to at least detach and re-attach the editor to the ui session to make the DialectEditorClose "resolve" its notification filter key. . We could also update the dialect editor closer mechanism to display only one 'the root element has been deleted, representations will close" popup when there are several representtion targeting the same semantic element.
New Gerrit change created: https://git.eclipse.org/r/53085
New Gerrit change created: https://git.eclipse.org/r/53084
Gerrit change https://git.eclipse.org/r/52881 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=1679af720ff595b2a1ed57182946e861fd49a0f7
Gerrit change https://git.eclipse.org/r/52882 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=54c7d6e16d78cc43ce7fa368bc49ffd8dd87930d
New Gerrit change created: https://git.eclipse.org/r/53124
New Gerrit change created: https://git.eclipse.org/r/53133
Gerrit change https://git.eclipse.org/r/53133 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2641a2b6f10f597546086dd6cf18bd6b92b6fb37
Gerrit change https://git.eclipse.org/r/53124 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ce023bffb0d9069df99cb105e84e86d1b9dd40b6
Gerrit change https://git.eclipse.org/r/53084 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b533caeb497ecafd0aba0ccca57d0caeb574de02
Corrected on master.
Validated with Sirius 3.1.0.201509241504
Available in Sirius 3.1.0.