eclipse-capella / capella

Open Source Solution for Model-Based Systems Engineering
https://mbse-capella.org
Eclipse Public License 2.0
222 stars 91 forks source link

Closing a session with a "vpd" editor opened will throw a ClassCastException #2886

Open Kellindil opened 2 weeks ago

Kellindil commented 2 weeks ago

Capella 6.1.0

The following dialog pops up. The session is not closed. There is no associated stack trace, only that dialog.

image

etraisnel2 commented 2 weeks ago

Seems like cases where VPDEditor is opened on a .vpd file isn't properly handled

in VirtualPvdEditor.notifySessionClosing (and more globally, all across PVMT code) , cases where input would be a FileEditorInput (editor opened on .vpd file) should be handled

In that specific case, there shouldn't even be session notification, as it's a file. VPDEditor (or VirtualEditorInput) should track the session if was opened on, and only react to its closure

So this is 100% a PVMT bug