Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-03-11 20:20:13 +0000
committerEike Stepper2015-03-11 20:20:13 +0000
commite5a26c533bb3bcef2a8dced57a10ea61a3ada2f3 (patch)
tree8cb80cdb8274fb8b6f4a1543ed315c5249e8a8b8 /plugins/org.eclipse.emf.cdo.ui
parenta9907ed2d727f3555b39df98df0c475b5f21403a (diff)
downloadcdo-e5a26c533bb3bcef2a8dced57a10ea61a3ada2f3.tar.gz
cdo-e5a26c533bb3bcef2a8dced57a10ea61a3ada2f3.tar.xz
cdo-e5a26c533bb3bcef2a8dced57a10ea61a3ada2f3.zip
[458349] Consolidate UI
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458349
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/plugin.xml8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/AbstractBranchPointDialog.java123
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/ComposeBranchPointComposite.java245
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectTimeStampComposite.java42
6 files changed, 268 insertions, 154 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/plugin.xml b/plugins/org.eclipse.emf.cdo.ui/plugin.xml
index 8ffee77ecb..306fae6a6c 100644
--- a/plugins/org.eclipse.emf.cdo.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.ui/plugin.xml
@@ -88,6 +88,14 @@
</editor>
</extension>
+ <extension
+ point="org.eclipse.ui.importWizards">
+ <category
+ id="org.eclipse.emf.cdo.category"
+ name="CDO">
+ </category>
+ </extension>
+
<extension
point="org.eclipse.ui.newWizards">
<category
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/AbstractBranchPointDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/AbstractBranchPointDialog.java
index 04bcc508d6..59fd81649b 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/AbstractBranchPointDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/AbstractBranchPointDialog.java
@@ -12,19 +12,10 @@ package org.eclipse.emf.cdo.internal.ui.dialogs;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
-import org.eclipse.emf.cdo.ui.CDOItemProvider;
-import org.eclipse.emf.cdo.ui.widgets.SelectTimeStampComposite;
-
-import org.eclipse.net4j.util.ObjectUtil;
-import org.eclipse.net4j.util.ui.ValidationContext;
+import org.eclipse.emf.cdo.ui.widgets.ComposeBranchPointComposite;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TitleAreaDialog;
-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.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
@@ -34,7 +25,6 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Shell;
/**
@@ -44,11 +34,9 @@ public abstract class AbstractBranchPointDialog extends TitleAreaDialog
{
private final boolean allowTimeStamp;
- private CDOBranchPoint branchPoint;
-
- private TreeViewer branchViewer;
+ private final CDOBranchPoint branchPoint;
- private SelectTimeStampComposite timeStampComposite;
+ private ComposeBranchPointComposite branchPointComposite;
private String timeStampError;
@@ -68,6 +56,11 @@ public abstract class AbstractBranchPointDialog extends TitleAreaDialog
public final CDOBranchPoint getBranchPoint()
{
+ if (branchPointComposite != null)
+ {
+ return branchPointComposite.getBranchPoint();
+ }
+
return branchPoint;
}
@@ -99,72 +92,40 @@ public abstract class AbstractBranchPointDialog extends TitleAreaDialog
protected void createUI(Composite container)
{
- CDOBranch branch = branchPoint.getBranch();
- CDOItemProvider itemProvider = new CDOItemProvider(null);
-
- branchViewer = new TreeViewer(container, SWT.BORDER | SWT.SINGLE);
- branchViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
- branchViewer.setLabelProvider(itemProvider);
- branchViewer.setContentProvider(itemProvider);
- branchViewer.setInput(branch.getBranchManager());
- branchViewer.addSelectionChangedListener(new ISelectionChangedListener()
+ branchPointComposite = new ComposeBranchPointComposite(container, allowTimeStamp, branchPoint)
{
- public void selectionChanged(SelectionChangedEvent event)
+ @Override
+ protected void timeStampError(String message)
{
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- CDOBranch branch = (CDOBranch)selection.getFirstElement();
+ timeStampError = message;
+ validate();
+ }
- if (timeStampComposite != null)
+ @Override
+ protected void branchPointChanged(CDOBranchPoint branchPoint)
+ {
+ if (validate())
{
- timeStampComposite.setBranch(branch);
+ AbstractBranchPointDialog.this.branchPointChanged(branchPoint);
}
-
- composeBranchPoint();
- validate();
}
- });
- branchViewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
+ @Override
+ protected void doubleClicked()
{
- doubleClicked();
+ AbstractBranchPointDialog.this.doubleClicked();
}
- });
+ };
+
+ branchPointComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+ CDOBranch branch = branchPoint.getBranch();
+ TreeViewer branchViewer = branchPointComposite.getBranchViewer();
branchViewer.setSelection(new StructuredSelection(branch));
branchViewer.setExpandedState(branch, true);
-
- if (allowTimeStamp)
- {
- Group timeStampGroup = new Group(container, SWT.NONE);
- timeStampGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- timeStampGroup.setLayout(new GridLayout(1, false));
- timeStampGroup.setText("Time Stamp:");
-
- timeStampComposite = new SelectTimeStampComposite(timeStampGroup, SWT.NONE, branch, branchPoint.getTimeStamp())
- {
- @Override
- protected void timeStampChanged(long timeStamp)
- {
- composeBranchPoint();
- }
- };
-
- timeStampComposite.getTimeBrowseButton().setVisible(false);
- timeStampComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- timeStampComposite.setValidationContext(new ValidationContext()
- {
- public void setValidationError(Object source, String message)
- {
- timeStampError = message;
- validate();
- }
- });
- }
}
- protected final void validate()
+ protected final boolean validate()
{
String error = timeStampError;
@@ -187,6 +148,8 @@ public abstract class AbstractBranchPointDialog extends TitleAreaDialog
{
button.setEnabled(error == null);
}
+
+ return error == null;
}
protected void doValidate() throws Exception
@@ -194,33 +157,9 @@ public abstract class AbstractBranchPointDialog extends TitleAreaDialog
// Do nothing.
}
- private void composeBranchPoint()
- {
- if (branchViewer == null)
- {
- return;
- }
-
- CDOBranchPoint oldBranchPoint = branchPoint;
-
- IStructuredSelection selection = (IStructuredSelection)branchViewer.getSelection();
- CDOBranch branch = (CDOBranch)selection.getFirstElement();
-
- long timeStamp = CDOBranchPoint.UNSPECIFIED_DATE;
- if (timeStampComposite != null)
- {
- timeStamp = timeStampComposite.getTimeStamp();
- }
-
- branchPoint = branch.getPoint(timeStamp);
- if (!ObjectUtil.equals(branchPoint, oldBranchPoint))
- {
- branchPointChanged(branchPoint);
- }
- }
-
protected void branchPointChanged(CDOBranchPoint branchPoint)
{
+ // Do nothing.
}
protected void doubleClicked()
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java
index e0b92a2496..1124746111 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java
@@ -95,7 +95,7 @@ public class CreateBranchDialog extends AbstractBranchPointDialog
if (name.contains("/") || name.contains("\\"))
{
- throw new Exception("Name constains a path separator.");
+ throw new Exception("Name contains a path separator.");
}
CDOBranch baseBranch = getBranchPoint().getBranch();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/ComposeBranchPointComposite.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/ComposeBranchPointComposite.java
index bca62d669b..2f63457ae6 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/ComposeBranchPointComposite.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/ComposeBranchPointComposite.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2012 Eike Stepper (Berlin, Germany) 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
@@ -13,83 +13,207 @@ package org.eclipse.emf.cdo.ui.widgets;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.ui.CDOItemProvider;
import org.eclipse.net4j.util.ObjectUtil;
-import org.eclipse.net4j.util.ui.UIUtil;
+import org.eclipse.net4j.util.ui.ValidationContext;
+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.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
/**
* Composed UI widget offering functionality for users to select {@link org.eclipse.emf.cdo.common.branch.CDOBranch
* branches} and a {@link org.eclipse.emf.cdo.common.branch.CDOBranchPoint timestamp} within a branch for a particular
* {@link org.eclipse.emf.cdo.session.CDOSession CDOSession}
- *
+ *
* @author Eike Stepper
* @since 4.0
*/
public class ComposeBranchPointComposite extends Composite
{
- private CDOSession session;
+ private final boolean allowTimeStamp;
private CDOBranchPoint branchPoint;
- private SelectBranchComposite selectBranchComposite;
+ private TreeViewer branchViewer;
- private SelectTimeStampComposite selectTimeStampComposite;
+ private SelectTimeStampComposite timeStampComposite;
+ /**
+ * @since 4.4
+ */
+ public ComposeBranchPointComposite(Composite parent, boolean allowTimeStamp, CDOBranchPoint branchPoint)
+ {
+ this(parent, SWT.NONE, null, branchPoint, allowTimeStamp);
+ }
+
+ /**
+ * @deprecated as of 4.4 use {@link #ComposeBranchPointComposite(Composite, boolean, CDOBranchPoint)}.
+ */
+ @Deprecated
public ComposeBranchPointComposite(Composite parent, int style, CDOSession session, CDOBranchPoint branchPoint,
boolean allowTimeStamp)
{
super(parent, style);
- this.session = session;
+ this.allowTimeStamp = allowTimeStamp;
this.branchPoint = branchPoint;
- GridLayout gridLayout = UIUtil.createGridLayout(1);
- gridLayout.verticalSpacing = 5;
+ GridLayout containerGridLayout = new GridLayout(1, false);
+ containerGridLayout.marginWidth = 0;
+ containerGridLayout.marginHeight = 0;
+ containerGridLayout.verticalSpacing = 10;
- setLayout(gridLayout);
+ setLayout(containerGridLayout);
+ createUI();
+ }
- CDOBranch branch = branchPoint == null ? session.getBranchManager().getMainBranch() : branchPoint.getBranch();
- if (session.getRepositoryInfo().isSupportingBranches())
- {
- selectBranchComposite = createSelectBranchComposite(session, branch);
- selectBranchComposite.setLayoutData(UIUtil.createGridData());
- selectBranchComposite.getBranchViewer().expandAll();
- }
+ /**
+ * @since 4.4
+ */
+ public boolean isAllowTimeStamp()
+ {
+ return allowTimeStamp;
+ }
- if (allowTimeStamp)
+ public CDOBranchPoint getBranchPoint()
+ {
+ return branchPoint;
+ }
+
+ /**
+ * @since 4.4
+ */
+ public void setBranchPoint(CDOBranchPoint branchPoint)
+ {
+ this.branchPoint = branchPoint;
+ if (branchPoint != null)
{
- long timeStamp = branchPoint == null ? CDOBranchPoint.UNSPECIFIED_DATE : branchPoint.getTimeStamp();
- selectTimeStampComposite = createSelectTimeStampComposite(branch, timeStamp);
- selectTimeStampComposite.setLayoutData(UIUtil.createGridData(true, false));
+ CDOBranch branch = branchPoint.getBranch();
+ long timeStamp = branchPoint.getTimeStamp();
+
+ if (branchViewer != null)
+ {
+ branchViewer.setSelection(new StructuredSelection(branch));
+ }
+
+ if (timeStampComposite != null)
+ {
+ timeStampComposite.setBranch(branch);
+ timeStampComposite.setTimeStamp(timeStamp);
+ }
}
}
- public CDOSession getSession()
+ /**
+ * @since 4.4
+ */
+ public TreeViewer getBranchViewer()
{
- return session;
+ return branchViewer;
}
- public CDOBranchPoint getBranchPoint()
+ public SelectTimeStampComposite getSelectTimeComposite()
{
- return branchPoint;
+ return timeStampComposite;
}
+ /**
+ * @deprecated as of 4.4 use {@link #getBranchViewer()}.
+ */
+ @Deprecated
public SelectBranchComposite getSelectBranchComposite()
{
- return selectBranchComposite;
+ throw new UnsupportedOperationException();
}
- public SelectTimeStampComposite getSelectTimeComposite()
+ /**
+ * @deprecated as of 4.4 no longer supported.
+ */
+ @Deprecated
+ public CDOSession getSession()
{
- return selectTimeStampComposite;
+ return null;
}
- protected SelectTimeStampComposite createSelectTimeStampComposite(CDOBranch branch, long timeStamp)
+ /**
+ * @since 4.4
+ */
+ protected void createUI()
+ {
+ branchViewer = createBranchViewer();
+ branchViewer.addSelectionChangedListener(new ISelectionChangedListener()
+ {
+ public void selectionChanged(SelectionChangedEvent event)
+ {
+ IStructuredSelection selection = (IStructuredSelection)event.getSelection();
+ CDOBranch branch = (CDOBranch)selection.getFirstElement();
+
+ if (timeStampComposite != null)
+ {
+ timeStampComposite.setBranch(branch);
+ }
+
+ composeBranchPoint();
+ }
+ });
+
+ if (allowTimeStamp)
+ {
+ timeStampComposite = createSelectTimeStampComposite();
+ timeStampComposite.setValidationContext(new ValidationContext()
+ {
+ public void setValidationError(Object source, String message)
+ {
+ timeStampError(message);
+ }
+ });
+ }
+ }
+
+ /**
+ * @since 4.4
+ */
+ protected TreeViewer createBranchViewer()
+ {
+ CDOItemProvider itemProvider = new CDOItemProvider(null);
+
+ TreeViewer branchViewer = new TreeViewer(this, SWT.BORDER | SWT.SINGLE);
+ branchViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ branchViewer.setLabelProvider(itemProvider);
+ branchViewer.setContentProvider(itemProvider);
+
+ branchViewer.addDoubleClickListener(new IDoubleClickListener()
+ {
+ public void doubleClick(DoubleClickEvent event)
+ {
+ doubleClicked();
+ }
+ });
+
+ return branchViewer;
+ }
+
+ /**
+ * @since 4.4
+ */
+ protected SelectTimeStampComposite createSelectTimeStampComposite()
{
- return new SelectTimeStampComposite(this, SWT.NONE, branch, timeStamp)
+ Group timeStampGroup = new Group(this, SWT.NONE);
+ timeStampGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ timeStampGroup.setLayout(new GridLayout(1, false));
+ timeStampGroup.setText("Time Stamp:");
+
+ SelectTimeStampComposite timeStampComposite = new SelectTimeStampComposite(timeStampGroup, SWT.NONE)
{
@Override
protected void timeStampChanged(long timeStamp)
@@ -97,8 +221,25 @@ public class ComposeBranchPointComposite extends Composite
composeBranchPoint();
}
};
+
+ timeStampComposite.getTimeBrowseButton().setVisible(false);
+ timeStampComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ return timeStampComposite;
+ }
+
+ /**
+ * @deprecated as of 4.4 use {@link #createSelectTimeStampComposite()}.
+ */
+ @Deprecated
+ protected SelectTimeStampComposite createSelectTimeStampComposite(CDOBranch branch, long timeStamp)
+ {
+ return createSelectTimeStampComposite();
}
+ /**
+ * @deprecated as of 4.4 use {@link #createSelectBranchComposite(Composite)}.
+ */
+ @Deprecated
protected SelectBranchComposite createSelectBranchComposite(CDOSession session, CDOBranch branch)
{
return new SelectBranchComposite(this, SWT.NONE, session, branch)
@@ -106,9 +247,9 @@ public class ComposeBranchPointComposite extends Composite
@Override
protected void branchChanged(CDOBranch newBranch)
{
- if (selectTimeStampComposite != null)
+ if (timeStampComposite != null)
{
- selectTimeStampComposite.setBranch(newBranch);
+ timeStampComposite.setBranch(newBranch);
}
composeBranchPoint();
@@ -116,30 +257,46 @@ public class ComposeBranchPointComposite extends Composite
};
}
- protected void branchPointChanged(CDOBranchPoint newBranchPoint)
- {
- }
-
private void composeBranchPoint()
{
- CDOBranchPoint oldBranchPoint = branchPoint;
-
- CDOBranch branch = session.getBranchManager().getMainBranch();
- if (selectBranchComposite != null)
+ if (branchViewer == null)
{
- branch = selectBranchComposite.getBranch();
+ return;
}
+ CDOBranchPoint oldBranchPoint = branchPoint;
+
+ IStructuredSelection selection = (IStructuredSelection)branchViewer.getSelection();
+ CDOBranch branch = (CDOBranch)selection.getFirstElement();
+
long timeStamp = CDOBranchPoint.UNSPECIFIED_DATE;
- if (selectTimeStampComposite != null)
+ if (timeStampComposite != null)
{
- timeStamp = selectTimeStampComposite.getTimeStamp();
+ timeStamp = timeStampComposite.getTimeStamp();
}
- branchPoint = branch == null ? null : branch.getPoint(timeStamp);
+ branchPoint = branch.getPoint(timeStamp);
if (!ObjectUtil.equals(branchPoint, oldBranchPoint))
{
branchPointChanged(branchPoint);
}
}
+
+ /**
+ * @since 4.4
+ */
+ protected void timeStampError(String message)
+ {
+ }
+
+ protected void branchPointChanged(CDOBranchPoint branchPoint)
+ {
+ }
+
+ /**
+ * @since 4.4
+ */
+ protected void doubleClicked()
+ {
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java
index dad1a86107..d1a3ea73fd 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java
@@ -42,7 +42,9 @@ import org.eclipse.swt.widgets.Listener;
*
* @author Eike Stepper
* @since 4.0
+ * @deprecated as of 4.4 no longer supported.
*/
+@Deprecated
public class SelectBranchComposite extends Composite implements ValidationParticipant
{
private ValidationContext validationContext;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectTimeStampComposite.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectTimeStampComposite.java
index ed23e5ca74..9657f1e827 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectTimeStampComposite.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectTimeStampComposite.java
@@ -68,6 +68,14 @@ public class SelectTimeStampComposite extends Composite implements ValidationPar
private Button timeBrowseButton;
+ /**
+ * @since 4.4
+ */
+ public SelectTimeStampComposite(Composite parent, int style)
+ {
+ this(parent, style, null, CDOBranchPoint.UNSPECIFIED_DATE);
+ }
+
public SelectTimeStampComposite(Composite parent, int style, CDOBranch branch, long timeStamp)
{
super(parent, style);
@@ -80,23 +88,6 @@ public class SelectTimeStampComposite extends Composite implements ValidationPar
pointGroup = new Composite(this, SWT.NONE);
pointGroup.setLayout(layout);
- headRadio = new Button(pointGroup, SWT.RADIO);
- headRadio.setText(Messages.getString("BranchSelectionDialog.1")); //$NON-NLS-1$
- headRadio.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- if (headRadio.getSelection())
- {
- setTimeStamp(CDOBranchPoint.UNSPECIFIED_DATE);
- }
- }
- });
-
- new Label(pointGroup, SWT.NONE);
- new Label(pointGroup, SWT.NONE);
-
baseRadio = new Button(pointGroup, SWT.RADIO);
baseRadio.setText(Messages.getString("BranchSelectionDialog.2")); //$NON-NLS-1$
baseRadio.addSelectionListener(new SelectionAdapter()
@@ -166,6 +157,23 @@ public class SelectTimeStampComposite extends Composite implements ValidationPar
}
});
+ headRadio = new Button(pointGroup, SWT.RADIO);
+ headRadio.setText(Messages.getString("BranchSelectionDialog.1")); //$NON-NLS-1$
+ headRadio.addSelectionListener(new SelectionAdapter()
+ {
+ @Override
+ public void widgetSelected(SelectionEvent e)
+ {
+ if (headRadio.getSelection())
+ {
+ setTimeStamp(CDOBranchPoint.UNSPECIFIED_DATE);
+ }
+ }
+ });
+
+ new Label(pointGroup, SWT.NONE);
+ new Label(pointGroup, SWT.NONE);
+
setBranch(branch);
setTimeStamp(timeStamp);
}

Back to the top