Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-03-18 13:06:34 -0400
committerEike Stepper2015-03-19 03:40:50 -0400
commit6f45700d6655330bdec97d48683ec38b52ceacd9 (patch)
tree1488f82f45514b8c94247dcfe51168b9e2640388 /plugins/org.eclipse.emf.cdo.explorer
parent4db261fcbf7ea2e0911472eea0930fb326ef255c (diff)
downloadcdo-6f45700d6655330bdec97d48683ec38b52ceacd9.tar.gz
cdo-6f45700d6655330bdec97d48683ec38b52ceacd9.tar.xz
cdo-6f45700d6655330bdec97d48683ec38b52ceacd9.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/AbstractElement.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/CDOExplorerAdapterFactory.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java2
4 files changed, 23 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java
index c2e0fd83f6..9c2702ef1e 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java
@@ -38,6 +38,8 @@ import java.util.Properties;
*/
public abstract class AbstractElement extends Notifier implements CDOExplorerElement, Adapter.Internal
{
+ public static final String ILLEGAL_LABEL_CHARACTERS = "/\\:;,";
+
public static final String PROP_TYPE = "type";
public static final String PROP_LABEL = "label";
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/CDOExplorerAdapterFactory.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/CDOExplorerAdapterFactory.java
index 82d4715e0a..beeb914f9d 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/CDOExplorerAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/CDOExplorerAdapterFactory.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.cdo.explorer.repositories.CDORepository;
import org.eclipse.emf.cdo.explorer.repositories.CDORepositoryElement;
import org.eclipse.emf.cdo.internal.explorer.repositories.CDORepositoryManagerImpl;
import org.eclipse.emf.cdo.session.CDORepositoryInfo;
-import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.core.runtime.IAdapterFactory;
@@ -46,28 +45,25 @@ public class CDOExplorerAdapterFactory implements IAdapterFactory
{
if (adapterType == CLASS_CDOREPOSITORYELEMENT)
{
- boolean head = false;
if (adaptableObject instanceof CDOBranch)
{
- head = true;
+ adaptableObject = ((CDOBranch)adaptableObject).getHead();
}
if (adaptableObject instanceof CDOBranchPoint)
{
final CDOBranchPoint branchPoint = (CDOBranchPoint)adaptableObject;
final CDOBranch branch = branchPoint.getBranch();
- final long timeStamp = head ? CDOBranchPoint.UNSPECIFIED_DATE : branchPoint.getTimeStamp();
+ final long timeStamp = branchPoint.getTimeStamp();
CDOCommonRepository commonRepository = branch.getBranchManager().getRepository();
if (commonRepository instanceof CDORepositoryInfo)
{
final CDORepositoryInfo repositoryInfo = (CDORepositoryInfo)commonRepository;
final CDOID objectID = repositoryInfo.getRootResourceID();
- CDOSession session = repositoryInfo.getSession();
CDORepositoryManagerImpl repositoryManager = (CDORepositoryManagerImpl)CDOExplorerUtil.getRepositoryManager();
- final CDORepository repository = repositoryManager.getRepository(session);
-
+ final CDORepository repository = repositoryManager.getRepository(repositoryInfo.getSession());
if (repository != null)
{
return new CDORepositoryElement()
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java
index feaaecc14c..6c7fede8b8 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java
@@ -727,7 +727,12 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec
branchPoints = properties.getProperty(PROP_BRANCH_POINTS);
timeStamp = Long.parseLong(properties.getProperty(PROP_TIME_STAMP));
readOnly = isOnline() ? Boolean.parseBoolean(properties.getProperty(PROP_READ_ONLY)) : false;
- rootID = CDOIDUtil.read(properties.getProperty(PROP_ROOT_ID));
+
+ String property = properties.getProperty(PROP_ROOT_ID);
+ if (property != null)
+ {
+ rootID = CDOIDUtil.read(property);
+ }
((CDORepositoryImpl)repository).addCheckout(this);
}
@@ -751,8 +756,11 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec
properties.setProperty(PROP_BRANCH_POINTS, branchPoints);
}
- String string = getCDOIDString(rootID);
- properties.setProperty(PROP_ROOT_ID, string);
+ if (!CDOIDUtil.isNull(rootID))
+ {
+ String string = getCDOIDString(rootID);
+ properties.setProperty(PROP_ROOT_ID, string);
+ }
}
protected IManagedContainer getContainer()
@@ -762,6 +770,11 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec
protected EObject loadRootObject()
{
+ if (CDOIDUtil.isNull(rootID))
+ {
+ rootID = view.getSession().getRepositoryInfo().getRootResourceID();
+ }
+
return view.getObject(rootID);
}
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
index 92515305f1..96c5d92400 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
@@ -377,6 +377,8 @@ public abstract class CDORepositoryImpl extends AbstractElement implements CDORe
public final CDOSession openCheckout(CDOCheckout checkout)
{
+ connect();
+
synchronized (checkouts)
{
openCheckouts.add(checkout);

Back to the top