Skip to content

I20181023-1200

@trancexpress trancexpress tagged this 23 Oct 12:10
Whenever a view is open in an inactive perspective, if that view is
opened and then closed in the active perspective,
IWorkbenchPage.findView(String) is able to find the view. This should
not be the case.

The undesired behavior is due to IWorkbenchPage.hideView() setting the
"to be rendered flag" on a placeholder which is not asked for the flag
during IWorkbenchPage.findView().

This change builds on the fix for bug 466230 by also asking the
placeholder reported by EModelService.findPlaceholderFor(). Only if both
the current shared reference (asked with fix for bug 466230) and that
placeholder are to be rendered, will the view be used as a result of
IWorkbenchPage.findView().

This change also adds a test which shows bad behavior when a view is
open in another perspective of a workbench window. The test will open a
test view in one of two test perspectives in resp. one of two test
windows. The test then validates the output of IWorkbenchPage.findView()
to ensure it returns non-null only if the view is actually open in that
page.

Change-Id: Ia0151e9a3ade70d541af41963b275f7ca83da8a9
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Assets 2
Loading