| Summary: | NPE in TraceabilityMarkerNavigationProvider when no representation element exists | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Yvan Lussaud <yvan.lussaud> |
| Component: | Core | Assignee: | Project inbox <sirius.core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | Laurent Redor <laurent.redor> |
| Severity: | normal | ||
| Priority: | P3 | CC: | florian.barbin, laurent.redor |
| Version: | 3.1.0 | Keywords: | triaged |
| Target Milestone: | 4.0.0M5 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/64976 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d4ce5d750def671d3cee2de9ca410a1dc271bc32 https://git.eclipse.org/r/73468 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=81484fb9b62c8098572164f95e7a428da2d5d7fe |
||
| Whiteboard: | trivial | ||
|
Description
Yvan Lussaud
New Gerrit change created: https://git.eclipse.org/r/64976 Gerrit change https://git.eclipse.org/r/64976 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d4ce5d750def671d3cee2de9ca410a1dc271bc32 Merged on master Can you please add steps to reproduce? I try to validate with Sirius 4.0.0. I have no NPE with the scenario I used. But I have neither error with Sirius 3.1.5 so I'm not sure of the scenario. You should trigger this bug programmatically. DialectEditor editorPart = ...; // any opened Sirius editor final TraceabilityMarkerNavigationProvider navigationProvider = new TraceabilityMarkerNavigationProvider((DialectEditor)editorPart); EObject eObject = ...; // the root of the diagram or any EObject not represented on the diagram but present in the resource final URI resourceURI = eObject.eResource().getURI(); final String resourcePath = resourceURI.toPlatformString(true); final IResource resource = ResourcesPlugin.getWorkspace().getRoot().getFile( new Path(resourcePath)); final IMarker marker = resource.createMarker(EValidator.MARKER); marker.setAttribute(EValidator.URI_ATTRIBUTE, EcoreUtil.getURI(eObject).toString()); navigationProvider.gotoMarker(marker); // NPE here Yvan added the scenario. I set the ticket as resolved. New Gerrit change created: https://git.eclipse.org/r/73468 Verified on Sirius 4.0.0 RC1 (4.0.0.201605180923) A test auto will be added according to scenario of comment 5. Gerrit change https://git.eclipse.org/r/73468 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=81484fb9b62c8098572164f95e7a428da2d5d7fe Available in Sirius 4.0.0. |