Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-02-20 15:32:24 +0000
committerEike Stepper2015-02-20 17:45:07 +0000
commita24a72c2fde0681cc558adc0482d6d735f65d732 (patch)
treee4b41d00a269552ad0141962cdf38aac842b7dad /plugins/org.eclipse.emf.cdo.ui
parentd44d28f6ed088053d74d0bb51280cfd961a7d870 (diff)
downloadcdo-a24a72c2fde0681cc558adc0482d6d735f65d732.tar.gz
cdo-a24a72c2fde0681cc558adc0482d6d735f65d732.tar.xz
cdo-a24a72c2fde0681cc558adc0482d6d735f65d732.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/ui/widgets/CommitHistoryComposite.java16
1 files changed, 16 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 5b747844d0..85774a4423 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
@@ -42,6 +42,7 @@ import org.eclipse.net4j.util.lifecycle.LifecycleEvent;
import org.eclipse.net4j.util.lifecycle.LifecycleException;
import org.eclipse.net4j.util.lifecycle.LifecycleState;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.registry.IRegistry;
import org.eclipse.net4j.util.ui.StructuredContentProvider;
import org.eclipse.net4j.util.ui.TableLabelProvider;
@@ -310,6 +311,8 @@ public class CommitHistoryComposite extends Composite
if (sessionAdapter != null)
{
session = sessionAdapter;
+ assertNotWorkspace();
+
branch = null;
object = null;
session.addListener(lifecycleListener);
@@ -322,6 +325,8 @@ public class CommitHistoryComposite extends Composite
branch = branchAdapter;
session = (CDOSession)((CDOSessionProtocol)((InternalCDOBranchManager)branch.getBranchManager())
.getBranchLoader()).getSession();
+ assertNotWorkspace();
+
object = null;
session.addListener(lifecycleListener);
return;
@@ -332,6 +337,8 @@ public class CommitHistoryComposite extends Composite
{
CDOView view = viewAdapter;
session = view.getSession();
+ assertNotWorkspace();
+
branch = view.getBranch();
object = null;
view.addListener(lifecycleListener);
@@ -359,6 +366,15 @@ public class CommitHistoryComposite extends Composite
throw new IllegalStateException("Illegal input: " + delegate);
}
+ private void assertNotWorkspace()
+ {
+ IRegistry<String, Object> properties = session.properties();
+ if (properties.containsKey("org.eclipse.emf.cdo.workspace.CDOWorkspace"))
+ {
+ throw new IllegalStateException("Offline input: " + session);
+ }
+ }
+
public Input(CDOSession session, CDOBranch branch, CDOObject object)
{
this.session = session;

Back to the top