diff options
author | Eike Stepper | 2012-10-06 17:47:09 +0000 |
---|---|---|
committer | Eike Stepper | 2012-10-06 17:47:09 +0000 |
commit | f727f0af55dcef8951ea7c5b49de03e6de9da271 (patch) | |
tree | 514dfba9d9fd44c2fc4a34acaef51c1c5ce3888c /plugins/org.eclipse.emf.cdo.compare/src | |
parent | baafd5e3ffe4efaa8274b5cdcc9065eca683b493 (diff) | |
download | cdo-f727f0af55dcef8951ea7c5b49de03e6de9da271.tar.gz cdo-f727f0af55dcef8951ea7c5b49de03e6de9da271.tar.xz cdo-f727f0af55dcef8951ea7c5b49de03e6de9da271.zip |
[256624] [UI] Create a Commit History ViewPart
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256624
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.compare/src')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOCompareUtil.java | 47 | ||||
-rw-r--r-- | plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOComparison.java | 64 |
2 files changed, 64 insertions, 47 deletions
diff --git a/plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOCompareUtil.java b/plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOCompareUtil.java index 23a4b9095f..70831755a1 100644 --- a/plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOCompareUtil.java +++ b/plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOCompareUtil.java @@ -30,7 +30,6 @@ import org.eclipse.emf.cdo.util.CDOUtil; import org.eclipse.emf.cdo.util.ObjectNotFoundException; import org.eclipse.emf.cdo.view.CDOView; -import org.eclipse.net4j.util.lifecycle.LifecycleUtil; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; @@ -257,52 +256,6 @@ public final class CDOCompareUtil } /** - * A {@link Comparison comparison} that can be closed to dispose of used resources. - * - * @author Eike Stepper - */ - public static class CDOComparison extends DelegatingComparison implements CloseableComparison - { - private final IComparisonScope scope; - - private Set<Object> objectsToDeactivateOnClose; - - public CDOComparison(IComparisonScope scope, Comparison delegate, Set<Object> objectsToDeactivateOnClose) - { - super(delegate); - this.scope = scope; - this.objectsToDeactivateOnClose = objectsToDeactivateOnClose; - } - - public final IComparisonScope getScope() - { - return scope; - } - - public boolean isClosed() - { - return delegate == null; - } - - public void close() - { - if (delegate != null) - { - delegate = null; - if (objectsToDeactivateOnClose != null) - { - for (Object object : objectsToDeactivateOnClose) - { - LifecycleUtil.deactivate(object); - } - - objectsToDeactivateOnClose = null; - } - } - } - } - - /** * A CDO-specific base implementation of a {@link IComparisonScope comparison scope}. * * @author Eike Stepper diff --git a/plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOComparison.java b/plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOComparison.java new file mode 100644 index 0000000000..d7c72c57fa --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.compare/src/org/eclipse/emf/cdo/compare/CDOComparison.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.compare; + +import org.eclipse.net4j.util.lifecycle.LifecycleUtil; + +import org.eclipse.emf.compare.Comparison; +import org.eclipse.emf.compare.scope.IComparisonScope; + +import java.util.Set; + +/** + * A {@link Comparison comparison} that can be closed to dispose of used resources. + * + * @author Eike Stepper + */ +public class CDOComparison extends DelegatingComparison implements CloseableComparison +{ + private final IComparisonScope scope; + + private Set<Object> objectsToDeactivateOnClose; + + public CDOComparison(IComparisonScope scope, Comparison delegate, Set<Object> objectsToDeactivateOnClose) + { + super(delegate); + this.scope = scope; + this.objectsToDeactivateOnClose = objectsToDeactivateOnClose; + } + + public final IComparisonScope getScope() + { + return scope; + } + + public boolean isClosed() + { + return delegate == null; + } + + public void close() + { + if (delegate != null) + { + delegate = null; + if (objectsToDeactivateOnClose != null) + { + for (Object object : objectsToDeactivateOnClose) + { + LifecycleUtil.deactivate(object); + } + + objectsToDeactivateOnClose = null; + } + } + } +}
\ No newline at end of file |