Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-06-10 19:15:57 +0000
committerEike Stepper2015-06-10 19:15:57 +0000
commite63e81f329fa0ee2a78b53bfe080966e752f010c (patch)
tree1864ee0afa68dcc8d4e9acfb52c6ddacb822a7fd /plugins/org.eclipse.emf.cdo.ui
parentbf85c1c0af74c82fcdc98cc136ece5d4489fbfd2 (diff)
downloadcdo-e63e81f329fa0ee2a78b53bfe080966e752f010c.tar.gz
cdo-e63e81f329fa0ee2a78b53bfe080966e752f010c.tar.xz
cdo-e63e81f329fa0ee2a78b53bfe080966e752f010c.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/src/org/eclipse/emf/cdo/internal/ui/InteractiveConflictHandlerSelector.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/ComposeBranchPointComposite.java19
2 files changed, 17 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/InteractiveConflictHandlerSelector.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/InteractiveConflictHandlerSelector.java
index 1c9dd43585..2ebc22b025 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/InteractiveConflictHandlerSelector.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/InteractiveConflictHandlerSelector.java
@@ -25,7 +25,6 @@ import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPage;
import java.util.List;
@@ -43,14 +42,13 @@ public class InteractiveConflictHandlerSelector implements ConflictHandlerSelect
{
final ConflictHandler[] result = { null };
- final IWorkbenchPage workbenchPage = UIUtil.getActiveWorkbenchPage();
-
- Display display = workbenchPage.getWorkbenchWindow().getShell().getDisplay();
- display.syncExec(new Runnable()
+ UIUtil.getDisplay().syncExec(new Runnable()
{
public void run()
{
+ IWorkbenchPage workbenchPage = UIUtil.getActiveWorkbenchPage();
String title = "Conflict Error";
+
new RollbackTransactionDialog(workbenchPage, title, title, transaction)
{
@Override
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 f8d09046c2..23de4a5d6b 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
@@ -191,14 +191,23 @@ public class ComposeBranchPointComposite extends Composite
public void selectionChanged(SelectionChangedEvent event)
{
IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- CDOBranch branch = (CDOBranch)selection.getFirstElement();
-
- if (timeStampComposite != null)
+ Object element = selection.getFirstElement();
+ if (element == null)
{
- timeStampComposite.setBranch(branch);
+ return;
}
- composeBranchPoint();
+ if (element instanceof CDOBranch)
+ {
+ CDOBranch branch = (CDOBranch)element;
+
+ if (timeStampComposite != null)
+ {
+ timeStampComposite.setBranch(branch);
+ }
+
+ composeBranchPoint();
+ }
}
});

Back to the top