Bug 578760 - NPE and error dialog when "unexpected" editor type is
opened on breakpoint

- Don't fail with NPE if editor doesn't have document provider
installed.

- Don't close previous editor if the same was opened by the page.

- Try to reuse the editor if either the id OR the input are equal. This
avoids closing & reopening same editor that was opened via "Large File
Associations" preferences with different id.

E.g. request to open a compilation unit editor for a file size > 8 MB
will re-use already opened plain text editor, which has different editor
id  but is opened on same file input (and would not crash/hang).

Change-Id: Ie8c9fd01aff356d1a2eff0b0d373026b391a29b2
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/190832
Reviewed-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
Tested-by: Andrey Loskutov <loskutov@gmx.de>
2 files changed