]> gerrit.simantics Code Review - simantics/sysdyn.git/commit
Added org.simantics.ui.workbench.editor.input.ResourceEditorInputMatchingStrategy
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 8 Feb 2012 22:31:00 +0000 (22:31 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 8 Feb 2012 22:31:00 +0000 (22:31 +0000)
commit2f92d2bee87a5d707aae9157ff53395bbd9f56ca
tree4cd8fb4074eb66fb7150dde851c8e656cbddb884
parentf2ba9490aee0b8754a5ff40918dff7af1c13a869
Added org.simantics.ui.workbench.editor.input.ResourceEditorInputMatchingStrategy
to customize the comparisons performed by Eclipse's EditorManager when looking
for editor input matches in existing editor tabs.

Normally EditorManager matches the following data:
* IEditorInput.getName()
* IEditorInput.getPersistable().getFactoryId()
* IEditorInput.equals

With ResourceEditorInput and ResourceEditorInput2 it is not necessary to compare IEditorInput.getName, which currently causes problems since initializing a ResourceEditorInput will not initialize its name properly immediately. And anyway, it is better simply to match against input.equals since the a single resource
can only have a single name and the name stored in the editor is just redundant information. Only the input resource identification is important.

fixes #3207

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@24182 ac1ea38d-2e2b-0410-8846-a27921b304fc
org.simantics.sysdyn.ui/plugin.xml