Bug 476443 - Model fragmentation leads to a NullPointerException
Summary: Model fragmentation leads to a NullPointerException
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.5   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard: backport
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-09-02 09:47 EDT by Stéphane Thibaudeau CLA
Modified: 2015-09-03 10:21 EDT (History)
1 user (show)

See Also:


Attachments
Example project (2.75 KB, application/x-zip-compressed)
2015-09-02 09:47 EDT, Stéphane Thibaudeau CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Thibaudeau CLA 2015-09-02 09:47:42 EDT
Created attachment 256324 [details]
Example project

Given an ecore model containing 3 EPackages :

A <>-- B <>-- C
A class diagram is defined on each package.
B has been controlled (only semantic).

(provided project corresponds to this starting state).

When I try to control the C package, a NullPointerException occurs and no file has been created.


Steps to reproduce :
1) import provided project
2) try to control "C" (both semantic and graphics) => NullPointerException
Comment 1 Stéphane Thibaudeau CLA 2015-09-02 10:07:16 EDT
The problem seems to be with SiriusUncontrolCommand.

getParentAirdResource() calls getAirdResourceWithAnalysisOn(EObject) giving the "B" package as a parameter. This method then returns null.
Comment 2 Maxime Porhel CLA 2015-09-03 08:50:47 EDT
The getAirdResourceWithAnalysisOn(EObject) should never return null: it should recursively fall back to the parent fragment. In the worst case it will return the main session resource found from the resource of the semantic root.
Comment 3 Eclipse Genie CLA 2015-09-03 09:58:22 EDT
New Gerrit change created: https://git.eclipse.org/r/55207