Bug 537661 - Empty shell when calling validateEdit from non-UI thread

A dialog is shown when validating a read-only file, which has a pending
modification in an editor. The dialog states that the file is read-only
and asks whether the file should be made writable.

When running the validation code
(DefaultUIFileModificationValidator.validateEdit()) from a non-UI
thread, an extra shell is created. This shell is seen as an additional
empty window.

This change avoids the extra window by using the workbench display to
run the necessary UI code, if validation is done from a non-UI thread.
It also passes down a null parent shell to the dialog, which is handled
by the jface dialog.

Change-Id: Ie16286f1d51d2282593fdb4c6dc5d4d6ec914249
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
1 file changed
tree: b41ce77a1bb49087cf003b16046ba51a5eafc4ea
  1. bundles/
  2. examples/
  3. features/
  4. tests/
  5. .gitignore
  6. CONTRIBUTING.md
  7. pom.xml