Project

General

Profile

« Previous | Next » 

Revision e3970b49

Added by Cherian Mathew over 8 years ago

#5420 Add check to dispose input if duplicate editor is already open

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
76 76
	 */
77 77
	private static IEditorPart open(final IEditorInput input,
78 78
			final String editorId) throws PartInitException {
79
		return getActivePage().openEditor(input, editorId);
79
		IEditorPart editor = getActivePage().openEditor(input, editorId);
80
		if(input != null &&
81
		        editor.getEditorInput() != null &&
82
		        input != editor.getEditorInput() &&
83
		        input instanceof CdmEntitySessionInput) {
84
		    ((CdmEntitySessionInput)input).dispose();
85
		}
86
		return editor;
80 87
	}
81 88

  
82 89
	/**

Also available in: Unified diff