Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-12-18 10:21:04 +0000
committerEike Stepper2012-12-18 10:21:04 +0000
commit1237dbf76875a4c467c4701f7288431c86cdfd29 (patch)
tree64926239ac8422e80e2890884a0ebf07666d0e13
parent5794c870bd7746b6bd35014804599c0f6da961ec (diff)
downloadcdo-1237dbf76875a4c467c4701f7288431c86cdfd29.tar.gz
cdo-1237dbf76875a4c467c4701f7288431c86cdfd29.tar.xz
cdo-1237dbf76875a4c467c4701f7288431c86cdfd29.zip
[396819] CommitHistoryComposite does not call commitInfoChanged() drops/S20121218-0522
https://bugs.eclipse.org/bugs/show_bug.cgi?id=396819
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java
index 9fab18e7cc..de00186d93 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java
@@ -48,7 +48,9 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -90,6 +92,18 @@ public class CommitHistoryComposite extends Composite
tableViewer = new TableViewer(this, SWT.BORDER | SWT.FULL_SELECTION);
tableViewer.setContentProvider(new ContentProvider());
tableViewer.addDoubleClickListener(new DoubleClickListener());
+ tableViewer.addSelectionChangedListener(new ISelectionChangedListener()
+ {
+ public void selectionChanged(SelectionChangedEvent event)
+ {
+ IStructuredSelection selection = (IStructuredSelection)tableViewer.getSelection();
+ Object selectedElement = selection.getFirstElement();
+ if (selectedElement instanceof CDOCommitInfo)
+ {
+ commitInfoChanged((CDOCommitInfo)selectedElement);
+ }
+ }
+ });
labelProvider = new LabelProvider();
labelProvider.support(tableViewer);

Back to the top