Bug 540253 - Debug inactive after switching perspectives

The fix for bug 538548 introduces a regression as follows. Switch from
Java to Debug perspective, then back to Java perspective. Debug a
snippet until a breakpoint is hit. Choose yes when asked whether to
switch to the Debug perspective. Observe that debug controls are
inactive.

This is the case since LaunchView context provider no longer reacts to
debug events, after switching to the Java perspective. It misses the
breakpoint hit (which also triggers the Debug perspective switch-to
confirmation dialog).

This change removes the fix for bug 538548 and adds a local fix to
SourceLookupService. The added fix prevents an editor popping up in the
current perspective under the following conditions:

1. If the Debug View was not open in the current
perspective.
2. Preferences to switch to a debug perspective on a breakpoint hit or
on launch are set to "never".
3. Preference to activate the Debug View on a breakpoint hit is set to
"disabled".

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