| Summary: | Only one instance of an Graphiti editor may exist, for each editor input | ||
|---|---|---|---|
| Product: | [Modeling] Graphiti | Reporter: | Juergen Pasch <juergen.pasch> |
| Component: | Core | Assignee: | Tim Kaiser <tim.kaiser> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | michael.wenz, rhett.hudson, tim.kaiser |
| Version: | 0.8.0 | Flags: | tim.kaiser:
indigo+
|
| Target Milestone: | 0.8.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | Indigo M7 theme_round_offs | ||
|
Description
Juergen Pasch
I think the issue may be in DiagramEditorFactory.DiagramEditorMatchingStrategy. The matches() implementation gets called as part of the IDE's determination of whether it can use an existing editor or whether it needs to open a new one. I've been working with markers and the Problem View. In this case, matches compares the URI from the editor's EditorInput with a URI created based on the IFile that was specified by the marker. But, the code used to create the URI based on the IFile held by the marker returns the URI to the Diagram in the file, not the Resource. So, it ends up comparing something that looks like 'platform:/resource/test/test.diagram#/' to something like 'platform:/resource/test/test.diagram#/0' and failing. I've tried adding .trimFragment() to both URI's before comparison and that addresses the multiple editor issue for my case. The problem was that we used the URI x/ to identify the first root object in the file, while the resolver produced the uri x/0 to identify the first diagram in the file. URI.equals returns false since components are compared, even if both URIs specify the same referent. The fix is to use always x/0 to refer to the first root object in the diagram file. fixed in EmfService Part of 0.8.0 Part of Graphiti Indigo 0.8.0 |