Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-19 04:49:35 -0400
committerEike Stepper2013-03-19 04:49:35 -0400
commitac7fc9579e8ab4af50bf6c80151e8989cf31fb81 (patch)
treeafe140d8bb1adda5bf782f13783366f552edb391
parent91cb657a942da02218e5fe202b1539a421a4a5a9 (diff)
downloadcdo-ac7fc9579e8ab4af50bf6c80151e8989cf31fb81.tar.gz
cdo-ac7fc9579e8ab4af50bf6c80151e8989cf31fb81.tar.xz
cdo-ac7fc9579e8ab4af50bf6c80151e8989cf31fb81.zip
[402366] CommitHistoryComposite should allow customization
https://bugs.eclipse.org/bugs/show_bug.cgi?id=402366
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java22
1 files changed, 18 insertions, 4 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 de00186d93..c1afd2fb53 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
@@ -86,11 +86,10 @@ public class CommitHistoryComposite extends Composite
public CommitHistoryComposite(Composite parent, int style)
{
super(parent, style);
-
setLayout(new FillLayout(SWT.HORIZONTAL));
- tableViewer = new TableViewer(this, SWT.BORDER | SWT.FULL_SELECTION);
- tableViewer.setContentProvider(new ContentProvider());
+ tableViewer = createTableViewer();
+ tableViewer.setContentProvider(createContentProvider());
tableViewer.addDoubleClickListener(new DoubleClickListener());
tableViewer.addSelectionChangedListener(new ISelectionChangedListener()
{
@@ -105,7 +104,7 @@ public class CommitHistoryComposite extends Composite
}
});
- labelProvider = new LabelProvider();
+ labelProvider = createLabelProvider();
labelProvider.support(tableViewer);
netRenderer = new NetRenderer(tableViewer);
@@ -196,6 +195,21 @@ public class CommitHistoryComposite extends Composite
super.dispose();
}
+ protected TableViewer createTableViewer()
+ {
+ return new TableViewer(this, SWT.BORDER | SWT.FULL_SELECTION);
+ }
+
+ protected ContentProvider createContentProvider()
+ {
+ return new ContentProvider();
+ }
+
+ protected LabelProvider createLabelProvider()
+ {
+ return new LabelProvider();
+ }
+
protected CDOCommitHistory createHistory(CDOSession session, CDOBranch branch, CDOObject object)
{
if (object == null)

Back to the top