Class cast while saving changes - before closing editor

Description

1. Open the Activiti Diagram Editor
2. Change the process (DO NOT SAVE the changes)
3. Open different editor (for example Text Editor)
4. While the Text Editor is active - close the Activiti Diagram Editor - by clicking on the 'x' on Activiti Editor Tab
5. Click 'Yes' on dialog: 'MyProcess.activiti has been modified. Save changes?'
6. Exception occurs:

java.lang.ClassCastException: org.eclipse.ui.part.FileEditorInput cannot be cast to org.eclipse.graphiti.ui.editor.DiagramEditorInput
at org.activiti.designer.eclipse.editor.ActivitiDiagramEditor.doSave(ActivitiDiagramEditor.java:86)
at org.eclipse.ui.internal.DefaultSaveable.doSave(DefaultSaveable.java:54)
at org.eclipse.ui.Saveable.doSave(Saveable.java:214)
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:349)
at org.eclipse.ui.internal.SaveablesList$4.run(SaveablesList.java:621)
at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:277)

Environment

None

Assignee

Tijs Rademakers

Reporter

Marek Baginski

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure