Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java41
1 files changed, 19 insertions, 22 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
index 6368a43df..e3ee51ae1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
@@ -285,28 +285,25 @@ class ViewerStateTracker {
// Process start of restore in an async cycle because we may still be inside inputChanged()
// call. I.e. the "input.equals(fContentProvider.getViewer().getInput())" test may fail.
- fContentProvider.getViewer().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- if (!fContentProvider.isDisposed() && input.equals(fContentProvider.getViewer().getInput())) {
- ModelDelta stateDelta2 = fViewerStates.remove(keyMementoString);
- if (stateDelta2 != null) {
- if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
- DebugUIPlugin.trace("STATE RESTORE BEGINS"); //$NON-NLS-1$
- DebugUIPlugin.trace("\tRESTORE: " + stateDelta2.toString()); //$NON-NLS-1$
- notifyStateUpdate(input, STATE_RESTORE_SEQUENCE_BEGINS, null);
- }
- stateDelta2.setElement(input);
- fPendingState = stateDelta2;
- doInitialRestore(fPendingState);
- }
- } else {
- if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
- DebugUIPlugin.trace("STATE RESTORE CANCELED."); //$NON-NLS-1$
- }
- }
- }
- });
+ fContentProvider.getViewer().getDisplay().asyncExec(() -> {
+ if (!fContentProvider.isDisposed() && input.equals(fContentProvider.getViewer().getInput())) {
+ ModelDelta stateDelta2 = fViewerStates.remove(keyMementoString);
+ if (stateDelta2 != null) {
+ if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
+ DebugUIPlugin.trace("STATE RESTORE BEGINS"); //$NON-NLS-1$
+ DebugUIPlugin.trace("\tRESTORE: " + stateDelta2.toString()); //$NON-NLS-1$
+ notifyStateUpdate(input, STATE_RESTORE_SEQUENCE_BEGINS, null);
+ }
+ stateDelta2.setElement(input);
+ fPendingState = stateDelta2;
+ doInitialRestore(fPendingState);
+ }
+ } else {
+ if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
+ DebugUIPlugin.trace("STATE RESTORE CANCELED."); //$NON-NLS-1$
+ }
+ }
+ });
} else {
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
DebugUIPlugin.trace("STATE RESTORE INPUT COMARE ENDED : " + fRequest + " - NO MATCHING STATE"); //$NON-NLS-1$ //$NON-NLS-2$

Back to the top