*/
private static IEditorPart open(final IEditorInput input,
final String editorId) throws PartInitException {
- return getActivePage().openEditor(input, editorId);
+ IEditorPart editor = getActivePage().openEditor(input, editorId);
+ if(input != null &&
+ editor.getEditorInput() != null &&
+ input != editor.getEditorInput() &&
+ input instanceof CdmEntitySessionInput) {
+ ((CdmEntitySessionInput)input).dispose();
+ }
+ return editor;
}
/**