diff options
author | Eike Stepper | 2015-02-20 13:46:54 +0000 |
---|---|---|
committer | Eike Stepper | 2015-02-20 15:12:02 +0000 |
commit | d44d28f6ed088053d74d0bb51280cfd961a7d870 (patch) | |
tree | 2a600798dcb587ebebd02ee2d2970c82887f788e /plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java | |
parent | 3ecac9ab191d0abea9dfb3a28c4d5803620465f4 (diff) | |
download | cdo-d44d28f6ed088053d74d0bb51280cfd961a7d870.tar.gz cdo-d44d28f6ed088053d74d0bb51280cfd961a7d870.tar.xz cdo-d44d28f6ed088053d74d0bb51280cfd961a7d870.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/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java | 29 |
1 files changed, 17 insertions, 12 deletions
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 de07d5a9c4..6c6e1aa747 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 @@ -53,6 +53,8 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec public static final String PROP_BRANCH_ID = "branchID"; + public static final String PROP_BRANCH_PATH = "branchPath"; + public static final String PROP_REPOSITORY = "repository"; public static final String EDITOR_PROPERTIES = "editor.properties"; @@ -78,6 +80,8 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec private int branchID; + private String branchPath; + private long timeStamp; private boolean readOnly; @@ -117,21 +121,16 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec public String getBranchPath() { - if (view == null) - { - return null; - } + return branchPath; + } - if (view != null) + public final void setBranchPath(String branchPath) + { + if (!ObjectUtil.equals(this.branchPath, branchPath)) { - CDOBranch branch = view.getBranch(); - if (branch != null) - { - return branch.getPathName(); - } + this.branchPath = branchPath; + save(); } - - return null; } public final long getTimeStamp() @@ -431,6 +430,7 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec super.init(folder, type, properties); repository = OM.getRepositoryManager().getElement(properties.getProperty(PROP_REPOSITORY)); branchID = Integer.parseInt(properties.getProperty(PROP_BRANCH_ID)); + branchPath = properties.getProperty(PROP_BRANCH_PATH); timeStamp = Long.parseLong(properties.getProperty(PROP_TIME_STAMP)); readOnly = Boolean.parseBoolean(properties.getProperty(PROP_READ_ONLY)); rootID = CDOIDUtil.read(properties.getProperty(PROP_ROOT_ID)); @@ -447,6 +447,11 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec properties.put(PROP_TIME_STAMP, Long.toString(timeStamp)); properties.put(PROP_READ_ONLY, Boolean.toString(readOnly)); + if (branchPath != null) + { + properties.put(PROP_BRANCH_PATH, branchPath); + } + String string = getCDOIDString(rootID); properties.put(PROP_ROOT_ID, string); } |