Bug 473943 - Table/Tree editor are not able to resolve their proxy input after reload
Summary: Table/Tree editor are not able to resolve their proxy input after reload
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.5   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 3.0.1   Edit
Assignee: Maxime Porhel CLA
QA Contact: Pierre-Charles David CLA
URL:
Whiteboard:
Keywords: triaged
Depends on: 473263 473944
Blocks:
  Show dependency tree
 
Reported: 2015-07-30 11:50 EDT by Maxime Porhel CLA
Modified: 2015-12-15 05:22 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Porhel CLA 2015-07-30 11:50:06 EDT
+++ 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
Comment 1 Eclipse Genie CLA 2015-08-03 09:49:25 EDT
New Gerrit change created: https://git.eclipse.org/r/53072
Comment 4 Eclipse Genie CLA 2015-08-04 06:25:39 EDT
New Gerrit change created: https://git.eclipse.org/r/53137
Comment 6 Maxime Porhel CLA 2015-08-04 09:57:11 EDT
Corrected on 3.0.x branch.
Comment 7 Pierre-Charles David CLA 2015-09-07 03:56:11 EDT
Verified in 3.0.1.201509020834 (part of Mars.1 RC2 modeling package).
Comment 8 Pierre-Charles David CLA 2015-12-15 05:22:10 EST
Available in Sirius 3.0.1 released on 2015-09-10.