diff options
author | Dani Megert | 2013-07-10 12:13:34 +0000 |
---|---|---|
committer | Dani Megert | 2013-07-10 12:13:34 +0000 |
commit | f743d2de7592e078b2fd7b49dc80a884c6106536 (patch) | |
tree | 4815bb4f48957418d44e9252247f28fe069b4f51 /bundles | |
parent | 2cb1a64966752e55e417b87c6235d2c189d1fc51 (diff) | |
download | eclipse.platform.team-f743d2de7592e078b2fd7b49dc80a884c6106536.tar.gz eclipse.platform.team-f743d2de7592e078b2fd7b49dc80a884c6106536.tar.xz eclipse.platform.team-f743d2de7592e078b2fd7b49dc80a884c6106536.zip |
Fixed bug 404873: [History View] Sporadic StackOverflowErrorI20130807-2000I20130807-0800I20130806-2000I20130806-0800I20130805-2000I20130805-0800I20130804-2300I20130730-0800I20130724-1600I20130723-0800I20130717-1600I20130716-0800
Diffstat (limited to 'bundles')
-rw-r--r-- | bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java index 29be3085b..68855930b 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2012 IBM Corporation and others. + * Copyright (c) 2006, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -302,22 +302,31 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP private ISelectionListener selectionListener = new ISelectionListener() { - public void selectionChanged(IWorkbenchPart part, ISelection selection) { + private boolean isUpdatingSelection = false; - if (GenericHistoryView.this == part) + public void selectionChanged(IWorkbenchPart part, ISelection selection) { + if (isUpdatingSelection) return; - if (selection instanceof IStructuredSelection) { - IStructuredSelection structSelection = (IStructuredSelection) selection; - //Always take the first element - this is not intended to work with multiple selection - //Also, hang on to this selection for future use in case the history view is not visible - lastSelectedElement = structSelection.getFirstElement(); - - if (!isLinkingEnabled() || !checkIfPageIsVisible()) { + try { + isUpdatingSelection = true; + if (GenericHistoryView.this == part) return; + + if (selection instanceof IStructuredSelection) { + IStructuredSelection structSelection = (IStructuredSelection) selection; + //Always take the first element - this is not intended to work with multiple selection + //Also, hang on to this selection for future use in case the history view is not visible + lastSelectedElement = structSelection.getFirstElement(); + + if (!isLinkingEnabled() || !checkIfPageIsVisible()) { + return; + } + + showLastSelectedElement(); } - - showLastSelectedElement(); + } finally { + isUpdatingSelection = false; } } |