Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-08-05 15:05:38 +0000
committerEike Stepper2015-08-05 15:05:38 +0000
commit3f1315d703eee0f99cb24c2d25433587bf6aa8af (patch)
treebea7710eb4eba7c31cf5b727134ccbc7c39df05f /plugins/org.eclipse.emf.cdo.explorer
parent1682d9c3d1259173445650c4b90b07d3b8b393e6 (diff)
downloadcdo-3f1315d703eee0f99cb24c2d25433587bf6aa8af.tar.gz
cdo-3f1315d703eee0f99cb24c2d25433587bf6aa8af.tar.xz
cdo-3f1315d703eee0f99cb24c2d25433587bf6aa8af.zip
[458349] Consolidate UI
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458349
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.explorer')
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/OfflineCDOCheckout.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/OfflineCDOCheckout.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/OfflineCDOCheckout.java
index 117559e5b8..b01a1b018e 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/OfflineCDOCheckout.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/OfflineCDOCheckout.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranchManager;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.id.CDOIDGenerator;
import org.eclipse.emf.cdo.explorer.CDOExplorerManager.ElementsChangedEvent;
+import org.eclipse.emf.cdo.explorer.CDOExplorerManager.ElementsChangedEvent.StructuralImpact;
import org.eclipse.emf.cdo.explorer.repositories.CDORepository;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.server.db.CDODBUtil;
@@ -49,7 +50,9 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
import org.h2.jdbcx.JdbcDataSource;
import java.io.File;
+import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
import java.util.Properties;
import java.util.Set;
@@ -154,6 +157,11 @@ public class OfflineCDOCheckout extends CDOCheckoutImpl
return null;
}
+ public void refresh()
+ {
+ fireElementChangedEvent(StructuralImpact.ELEMENT);
+ }
+
@Override
public String getBranchPath()
{
@@ -221,7 +229,12 @@ public class OfflineCDOCheckout extends CDOCheckoutImpl
JdbcDataSource dataSource = new JdbcDataSource();
dataSource.setURL("jdbc:h2:" + dbPrefix);
+ Map<String, String> props = new HashMap<String, String>();
+ props.put(IMappingStrategy.PROP_QUALIFIED_NAMES, "true");
+
IMappingStrategy mappingStrategy = CDODBUtil.createHorizontalMappingStrategy(true, true, false);
+ mappingStrategy.setProperties(props);
+
IDBAdapter dbAdapter = DBUtil.getDBAdapter("h2");
IDBConnectionProvider connectionProvider = DBUtil.createConnectionProvider(dataSource);
IStore store = CDODBUtil.createStore(mappingStrategy, dbAdapter, connectionProvider);

Back to the top