Bug 320672 - [WorkbenchParts] [Compatibility] SWTException when
activating an editor with stale content

This is the second part of the fix for bug 320672, the first one is
covered by bug 511873.

Remember if we are in the middle of the focus state change. During this
operation we should not attempt to call updatePartControl() from
sanityCheckState() (which is called on part activation) because it can
dispose widgets we are currently setting focus to.

In theory, this can happen from other protected methods here too, but
I'm trying to keep the patch as small as possible because this class is
a base class for MANY other text editors.

Change-Id: I86af3ed7463628f7476359f76be262ed2ddaf997
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Also-by: Vasili Gulevich <vasili.gulevich@xored.com>
4 files changed