| Summary: | ClassCastException in org.eclipse.sirius.diagram.ui.internal.refresh.GMFHelper getGraphicalEditPart(View) method | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Adam Lengyel <lengyela89> |
| Component: | Diagram | Assignee: | Project Inbox <sirius.diagram-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | pierre-charles.david |
| Version: | 3.1.0 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: | https://git.eclipse.org/r/69321 | ||
| Whiteboard: | |||
Hi, thanks for the feedback. This looks like the issue which was already reported in bug #485426, but we did not have any reproduction scenario. Do you know how you got in a situation where "editor contained a non DiagramEditor instance", in terms of end-user actions? That would help reproduce and confirm a fix. I'm closing this one as duplicate of the other, but that's only because #485426 was reported before. *** This bug has been marked as a duplicate of bug 485426 *** New Gerrit change created: https://git.eclipse.org/r/69321 |
- plugin: org.eclipse.sirius.diagram.ui (3.1.2.201511030845) - package: org.eclipse.sirius.diagram.ui.internal.refresh - class: GMFHelper - method: getGraphicalEditPart(View) In this method please check this part (line 646-648): if (dialectEditor instanceof DiagramEditor && ((DiagramEditor) editor).getDiagram() != diagram) { diagramEditor = (DiagramEditor) dialectEditor; } Maybe instead of editor, you should use dialectEditor and instead of != you should use ==, like below: if (dialectEditor instanceof DiagramEditor && ((DiagramEditor) dialectEditor).getDiagram() == diagram) { diagramEditor = (DiagramEditor) dialectEditor; } I ran into a situation, where editor contained a non DiagramEditor instance, and in that case the line 646 led to a ClassCastException.