Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-10-05 07:42:52 -0400
committerEike Stepper2012-10-05 07:42:52 -0400
commitbd3e3935ef223f341b10072f13427d5e124ff760 (patch)
tree5c9b70c19df185c6f70e4e8a07add966f2e373e9
parent9699c005e9832e03bf0d150f881a72df71b69880 (diff)
downloadcdo-drops/I20121005-0745.tar.gz
cdo-drops/I20121005-0745.tar.xz
cdo-drops/I20121005-0745.zip
[256624] [UI] Create a Commit History ViewPart drops/I20121005-0745
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256624
-rw-r--r--features/org.eclipse.emf.cdo-feature/feature.xml7
-rw-r--r--plugins/org.eclipse.emf.cdo.admin/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonSession.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonView.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchManager.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitHistory.java127
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointRangeImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java39
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/CDOBranchUtil.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/CDOCommitInfoUtil.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.compare/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.efs/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.security/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server/.settings/.api_filters9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java175
-rw-r--r--plugins/org.eclipse.emf.cdo.team/META-INF/MANIFEST.MF11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java98
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java160
-rw-r--r--plugins/org.eclipse.emf.cdo.transfer.repository/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/TransferDialog.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/commit.gifbin0 -> 596 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/person-me.gifbin0 -> 307 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/person.gifbin0 -> 308 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.shared/src/org/eclipse/emf/cdo/ui/shared/SharedIcons.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.options3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.project39
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.core.prefs395
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.launching.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.ui.prefs119
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.pde.prefs31
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/about.html28
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/build.properties26
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/copyright.txt8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/plugin.properties11
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/plugin.xml42
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/actions/AbstractContainerAction.java38
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/bundle/EarlyStartup.java24
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/bundle/OM.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryAdapterFactory.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java110
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPageSource.java38
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/build.properties3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateBranchAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java88
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectBranchPointDialog.java97
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java53
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java230
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOLabelProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java353
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java112
-rw-r--r--plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDORepositoryInfo.java11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java15
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionContainer.java30
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java15
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewContainer.java31
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewTargetChangedEvent.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOTransactionContainerImpl.java18
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOViewContainerImpl.java31
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java23
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java6
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/ManagedLabelProvider.java63
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/TableLabelProvider.java300
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractFilteredIterator.java46
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractIterator.java13
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractListIterator.java67
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/BidirectionalIterator.java66
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/LimitedIterator.java46
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java20
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/PredicateIterator.java39
106 files changed, 3442 insertions, 451 deletions
diff --git a/features/org.eclipse.emf.cdo-feature/feature.xml b/features/org.eclipse.emf.cdo-feature/feature.xml
index 134484a3e4..7168068070 100644
--- a/features/org.eclipse.emf.cdo-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo-feature/feature.xml
@@ -98,6 +98,13 @@
unpack="false"/>
<plugin
+ id="org.eclipse.emf.cdo.ui.team"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.eclipse.emf.cdo.net4j"
download-size="0"
install-size="0"
diff --git a/plugins/org.eclipse.emf.cdo.admin/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.admin/META-INF/MANIFEST.MF
index e37cee9417..38eb2771b4 100644
--- a/plugins/org.eclipse.emf.cdo.admin/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.admin/META-INF/MANIFEST.MF
@@ -8,8 +8,7 @@ Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.emf.cdo.internal.admin.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+Require-Bundle: org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.net4j;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.admin;version="4.1.100",
diff --git a/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java b/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java
index 931cdbb67b..fe44ca02e9 100644
--- a/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java
@@ -26,6 +26,8 @@ import org.eclipse.net4j.util.event.Notifier;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.om.monitor.NotifyingMonitor;
+import org.eclipse.core.runtime.Platform;
+
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
@@ -202,6 +204,11 @@ public class CDOAdminClientRepositoryImpl extends Notifier implements CDOAdminCl
return configuration.openNet4jSession();
}
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
@Override
public String toString()
{
diff --git a/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF
index e8518e4223..88b7caef10 100644
--- a/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF
@@ -9,7 +9,7 @@ Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.emf.cdo.internal.common.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.change;bundle-version="[2.4.0,3.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.4.0,3.0.0)",
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java
index 477bb06cae..694c437292 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java
@@ -15,6 +15,8 @@ import org.eclipse.emf.cdo.common.util.CDOTimeProvider;
import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.core.runtime.IAdaptable;
+
import java.util.Set;
/**
@@ -37,7 +39,7 @@ import java.util.Set;
* @apiviz.uses {@link CDOCommonRepository.TypeChangedEvent} - - fires
* @apiviz.uses {@link CDOCommonRepository.StateChangedEvent} - - fires
*/
-public interface CDOCommonRepository extends CDOTimeProvider
+public interface CDOCommonRepository extends CDOTimeProvider, IAdaptable
{
/**
* Returns the name of this repository.
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonSession.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonSession.java
index 5a76dadf5e..2a3cee612d 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonSession.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonSession.java
@@ -16,9 +16,11 @@ import org.eclipse.net4j.util.options.IOptionsContainer;
import org.eclipse.net4j.util.options.IOptionsEvent;
import org.eclipse.net4j.util.security.IUserAware;
+import org.eclipse.core.runtime.IAdaptable;
+
/**
* Abstracts the information about CDO sessions that is common to both client and server side.
- *
+ *
* @author Eike Stepper
* @since 2.0
* @noextend This interface is not intended to be extended by clients.
@@ -28,7 +30,7 @@ import org.eclipse.net4j.util.security.IUserAware;
* @apiviz.has {@link CDOCommonSession.Options}
* @apiviz.uses {@link CDOCommonRepository} - - connectsTo
*/
-public interface CDOCommonSession extends IUserAware, IOptionsContainer, Closeable
+public interface CDOCommonSession extends IAdaptable, IUserAware, IOptionsContainer, Closeable
{
public int getSessionID();
@@ -43,7 +45,7 @@ public interface CDOCommonSession extends IUserAware, IOptionsContainer, Closeab
/**
* Encapsulates the configuration options of CDO sessions that are common to both client and server side.
- *
+ *
* @author Simon McDuff
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
@@ -54,7 +56,7 @@ public interface CDOCommonSession extends IUserAware, IOptionsContainer, Closeab
{
/**
* Returns the {@link CDOCommonSession session} of this options object.
- *
+ *
* @since 4.0
*/
public CDOCommonSession getContainer();
@@ -75,7 +77,7 @@ public interface CDOCommonSession extends IUserAware, IOptionsContainer, Closeab
* will be refreshed.
* <p>
* When enabled again, a refresh will be automatically performed to be in sync with the server.
- *
+ *
* @since 3.0
*/
public void setPassiveUpdateEnabled(boolean enabled);
@@ -103,7 +105,7 @@ public interface CDOCommonSession extends IUserAware, IOptionsContainer, Closeab
/**
* Enumerates the possible {@link CDOCommonSession.Options#getPassiveUpdateMode() passive update modes} of a CDO
* session.
- *
+ *
* @author Eike Stepper
* @since 3.0
*/
@@ -130,7 +132,7 @@ public interface CDOCommonSession extends IUserAware, IOptionsContainer, Closeab
/**
* Enumerates the possible {@link CDOCommonSession.Options#getLockNotificationMode() lock notification modes} of a
* CDO session.
- *
+ *
* @since 4.1
*/
public enum LockNotificationMode
@@ -155,7 +157,7 @@ public interface CDOCommonSession extends IUserAware, IOptionsContainer, Closeab
/**
* An {@link IOptionsEvent options event} fired when the {@link PassiveUpdateMode passive update mode} of a CDO
* session has changed.
- *
+ *
* @author Eike Stepper
* @since 3.0
*/
@@ -173,7 +175,7 @@ public interface CDOCommonSession extends IUserAware, IOptionsContainer, Closeab
/**
* An {@link IOptionsEvent options event} fired when the {@link LockNotificationMode lock notification mode} of a
* CDO session has changed.
- *
+ *
* @author Caspar De Groot
* @since 4.1
*/
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonView.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonView.java
index df15ee87a6..3783a1ace2 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonView.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonView.java
@@ -21,9 +21,11 @@ import org.eclipse.net4j.util.options.IOptions;
import org.eclipse.net4j.util.options.IOptionsContainer;
import org.eclipse.net4j.util.options.IOptionsEvent;
+import org.eclipse.core.runtime.IAdaptable;
+
/**
* Abstracts the information about CDO views that is common to both client and server side.
- *
+ *
* @author Eike Stepper
* @since 2.0
* @noextend This interface is not intended to be extended by clients.
@@ -31,7 +33,8 @@ import org.eclipse.net4j.util.options.IOptionsEvent;
* @apiviz.landmark
* @apiviz.has {@link CDOCommonView.Options}
*/
-public interface CDOCommonView extends CDOLockOwner, CDOBranchPoint, CDORevisionProvider, IOptionsContainer, Closeable
+public interface CDOCommonView extends CDOLockOwner, CDOBranchPoint, CDORevisionProvider, IOptionsContainer,
+ IAdaptable, Closeable
{
public int getViewID();
@@ -49,14 +52,14 @@ public interface CDOCommonView extends CDOLockOwner, CDOBranchPoint, CDORevision
/**
* Returns the {@link Options options} of this view.
- *
+ *
* @since 4.1
*/
public Options options();
/**
* Encapsulates the configuration options of CDO views that are common to both client and server side.
- *
+ *
* @author Eike Stepper
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
@@ -69,7 +72,7 @@ public interface CDOCommonView extends CDOLockOwner, CDOBranchPoint, CDORevision
* Returns <code>true</code> if this view will notify its {@link IListener listeners} about changes to the
* {@link CDOLockState lock states} of the objects in this view (due to lock operations in <i>other</i> views),
* <code>false</code> otherwise.
- *
+ *
* @see CDOLockState
*/
public boolean isLockNotificationEnabled();
@@ -77,7 +80,7 @@ public interface CDOCommonView extends CDOLockOwner, CDOBranchPoint, CDORevision
/**
* Specifies whether this view will notify its {@link IListener listeners} about changes to the {@link CDOLockState
* lock states} of the objects in this view (due to lock operations in <i>other</i> views), or not.
- *
+ *
* @see CDOLockState
*/
public void setLockNotificationEnabled(boolean enabled);
@@ -85,7 +88,7 @@ public interface CDOCommonView extends CDOLockOwner, CDOBranchPoint, CDORevision
/**
* An {@link IOptionsEvent options event} fired from common view {@link CDOCommonView#options() options} when the
* {@link Options#setLockNotificationEnabled(boolean) lock notification enabled} option has changed.
- *
+ *
* @author Caspar De Groot
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchManager.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchManager.java
index fadf832806..f74dd70adb 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchManager.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchManager.java
@@ -10,6 +10,8 @@
*/
package org.eclipse.emf.cdo.common.branch;
+import org.eclipse.emf.cdo.common.CDOCommonRepository;
+
import org.eclipse.net4j.util.event.INotifier;
/**
@@ -30,7 +32,7 @@ import org.eclipse.net4j.util.event.INotifier;
* <li> <code>org.eclipse.emf.cdo.session.CDOSession</code>
* <li> <code>org.eclipse.emf.cdo.server.IRepository</code>
* </ul>
- *
+ *
* @author Eike Stepper
* @since 3.0
* @noextend This interface is not intended to be extended by clients.
@@ -42,6 +44,13 @@ import org.eclipse.net4j.util.event.INotifier;
public interface CDOBranchManager extends INotifier
{
/**
+ * Returns the repository this branch manager is associated with.
+ *
+ * @since 4.2
+ */
+ public CDOCommonRepository getRepository();
+
+ /**
* Returns the main branch of the branch tree managed by this branch manager.
* <p>
* The main branch has the fixed {@link CDOBranch#MAIN_BRANCH_NAME name} "MAIN" and the fixed
@@ -61,7 +70,7 @@ public interface CDOBranchManager extends INotifier
/**
* Returns the branch with the given absolute path.
- *
+ *
* @param path
* A concatenation of the names of all branches from the {@link #getMainBranch() main branch} to the
* requested branch, separated by {@link CDOBranch#PATH_SEPARATOR slashes} ("/" characters). Example:
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.java
index 639597a9d6..b3fc588e60 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.java
@@ -11,11 +11,12 @@
package org.eclipse.emf.cdo.common.branch;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.util.CDOTimeProvider;
import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
/**
* A {@link #getTimeStamp() point in time} in a particular {@link #getBranch() branch}.
- *
+ *
* @see CDOCommitInfo
* @see CDOBranchTag
* @see CDOBranch#getBase()
@@ -28,18 +29,18 @@ import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
* @noimplement This interface is not intended to be implemented by clients.
* @apiviz.has {@link CDOBranch}
*/
-public interface CDOBranchPoint
+public interface CDOBranchPoint extends CDOTimeProvider
{
/**
* The fixed special time stamp <i>unspecified</i>.
- *
+ *
* @see CDOBranch#getHead()
*/
public static final long UNSPECIFIED_DATE = 0;
/**
* The fixed special time stamp <i>invalid</i>.
- *
+ *
* @since 4.0
*/
public static final long INVALID_DATE = -1;
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitHistory.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitHistory.java
new file mode 100644
index 0000000000..5d77579934
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitHistory.java
@@ -0,0 +1,127 @@
+/*
+ * 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.common.commit;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+
+import org.eclipse.net4j.util.container.Container;
+
+import java.util.LinkedList;
+
+/**
+ * A cache for the {@link CDOCommitInfo commit infos} of a branch or of an entire repository.
+ *
+ * @author Eike Stepper
+ * @since 4.2
+ */
+public class CDOCommitHistory extends Container<CDOCommitInfo>
+{
+ private final CDOCommitInfoManager manager;
+
+ private final CDOBranch branch;
+
+ private LinkedList<CDOCommitInfo> commitInfos = new LinkedList<CDOCommitInfo>();
+
+ private CDOCommitInfo[] elements;
+
+ private Thread loaderThread;
+
+ private Object loaderThreadLock = new Object();
+
+ public CDOCommitHistory(CDOCommitInfoManager manager, CDOBranch branch)
+ {
+ this.manager = manager;
+ this.branch = branch;
+ }
+
+ public final CDOCommitInfoManager getManager()
+ {
+ return manager;
+ }
+
+ public final CDOBranch getBranch()
+ {
+ return branch;
+ }
+
+ public CDOCommitInfo[] getElements()
+ {
+ synchronized (commitInfos)
+ {
+ if (elements == null)
+ {
+ elements = commitInfos.toArray(new CDOCommitInfo[commitInfos.size()]);
+ }
+
+ return elements;
+ }
+ }
+
+ public boolean loadCommitInfos(final int count)
+ {
+ synchronized (loaderThreadLock)
+ {
+ if (loaderThread != null)
+ {
+ return false;
+ }
+
+ loaderThread = new Thread("CDOCommitHistoryLoader")
+ {
+ @Override
+ public void run()
+ {
+ doLoadCommitInfos(count);
+
+ synchronized (loaderThreadLock)
+ {
+ loaderThread = null;
+ }
+ }
+ };
+ }
+
+ loaderThread.start();
+ return true;
+ }
+
+ protected void doLoadCommitInfos(int count)
+ {
+ final long startTime;
+ synchronized (commitInfos)
+ {
+ startTime = commitInfos.isEmpty() ? CDOBranchPoint.UNSPECIFIED_DATE : commitInfos.getLast().getTimeStamp();
+ }
+
+ manager.getCommitInfos(branch, startTime, null, null, -count, new CDOCommitInfoHandler()
+ {
+ private boolean ignore = startTime != CDOBranchPoint.UNSPECIFIED_DATE;
+
+ public void handleCommitInfo(CDOCommitInfo commitInfo)
+ {
+ if (ignore)
+ {
+ ignore = false;
+ return;
+ }
+
+ synchronized (commitInfos)
+ {
+ commitInfos.addLast(commitInfo);
+ elements = null;
+ }
+
+ fireElementAddedEvent(commitInfo);
+ }
+ });
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
index 101c6f1768..f3c16c7d38 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
/**
* {@link CDOCommitData Commit data} in the context of a {@link CDOCommitInfoManager commit info manager} with
* additional commit informations.
- *
+ *
* @author Eike Stepper
* @since 3.0
* @noextend This interface is not intended to be extended by clients.
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java
index c895f81d7d..9ca8039528 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java
@@ -14,7 +14,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
/**
* Loads, provides and possible manages {@link CDOCommitInfo commit info} objects.
- *
+ *
* @author Andre Dietisheim
* @since 3.0
* @noextend This interface is not intended to be extended by clients.
@@ -25,6 +25,16 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
public interface CDOCommitInfoManager
{
/**
+ * @since 4.2
+ */
+ public CDOCommitHistory getHistory();
+
+ /**
+ * @since 4.2
+ */
+ public CDOCommitHistory getHistory(CDOBranch branch);
+
+ /**
* @since 4.0
*/
public CDOCommitInfo getCommitInfo(long timeStamp);
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java
index f472cd653f..edac0d9832 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.internal.common.branch;
+import org.eclipse.emf.cdo.common.CDOCommonRepository;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchCreatedEvent;
import org.eclipse.emf.cdo.common.branch.CDOBranchHandler;
@@ -33,9 +34,9 @@ import java.util.Map;
*/
public class CDOBranchManagerImpl extends Container<CDOBranch> implements InternalCDOBranchManager
{
- private BranchLoader branchLoader;
+ private CDOCommonRepository repository;
- private CDOTimeProvider timeProvider;
+ private BranchLoader branchLoader;
private InternalCDOBranch mainBranch;
@@ -45,6 +46,16 @@ public class CDOBranchManagerImpl extends Container<CDOBranch> implements Intern
{
}
+ public CDOCommonRepository getRepository()
+ {
+ return repository;
+ }
+
+ public void setRepository(CDOCommonRepository repository)
+ {
+ this.repository = repository;
+ }
+
public BranchLoader getBranchLoader()
{
return branchLoader;
@@ -58,12 +69,13 @@ public class CDOBranchManagerImpl extends Container<CDOBranch> implements Intern
public CDOTimeProvider getTimeProvider()
{
- return timeProvider;
+ return repository;
}
+ @Deprecated
public void setTimeProvider(CDOTimeProvider timeProvider)
{
- this.timeProvider = timeProvider;
+ throw new UnsupportedOperationException();
}
public void initMainBranch(boolean local, long timeStamp)
@@ -218,8 +230,8 @@ public class CDOBranchManagerImpl extends Container<CDOBranch> implements Intern
protected void doBeforeActivate() throws Exception
{
super.doBeforeActivate();
+ checkState(repository, "repository"); //$NON-NLS-1$
checkState(branchLoader, "branchLoader"); //$NON-NLS-1$
- checkState(timeProvider, "timeProvider"); //$NON-NLS-1$
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointImpl.java
index b7bb7ffea6..93bc6909e7 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointImpl.java
@@ -23,9 +23,9 @@ import java.text.MessageFormat;
*/
public class CDOBranchPointImpl implements CDOBranchPoint, Comparable<CDOBranchPoint>
{
- private CDOBranch branch;
+ private final CDOBranch branch;
- private long timeStamp;
+ private final long timeStamp;
public CDOBranchPointImpl(CDOBranch branch, long timeStamp)
{
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointRangeImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointRangeImpl.java
index 900396851a..7356c5fb77 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointRangeImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchPointRangeImpl.java
@@ -20,9 +20,9 @@ import java.text.MessageFormat;
*/
public class CDOBranchPointRangeImpl implements CDOBranchPointRange
{
- private CDOBranchPoint startPoint;
+ private final CDOBranchPoint startPoint;
- private CDOBranchPoint endPoint;
+ private final CDOBranchPoint endPoint;
public CDOBranchPointRangeImpl(CDOBranchPoint startPoint, CDOBranchPoint endPoint)
{
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java
index e5e3c10610..bce1515e68 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java
@@ -13,12 +13,17 @@ package org.eclipse.emf.cdo.internal.common.commit;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.commit.CDOCommitData;
+import org.eclipse.emf.cdo.common.commit.CDOCommitHistory;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
+import org.eclipse.emf.cdo.spi.common.commit.CDOCommitInfoUtil;
import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
+import java.util.Map;
+import java.util.WeakHashMap;
+
/**
* @author Andre Dietisheim
*/
@@ -26,6 +31,8 @@ public class CDOCommitInfoManagerImpl extends Lifecycle implements InternalCDOCo
{
private CommitInfoLoader commitInfoLoader;
+ private Map<CDOCommitHistory, Boolean> histories = new WeakHashMap<CDOCommitHistory, Boolean>();
+
public CDOCommitInfoManagerImpl()
{
}
@@ -48,6 +55,29 @@ public class CDOCommitInfoManagerImpl extends Lifecycle implements InternalCDOCo
return new CDOCommitInfoImpl(this, branch, timeStamp, previousTimeStamp, userID, comment, commitData);
}
+ public CDOCommitHistory getHistory()
+ {
+ return getHistory(null);
+ }
+
+ public CDOCommitHistory getHistory(CDOBranch branch)
+ {
+ synchronized (histories)
+ {
+ for (CDOCommitHistory history : histories.keySet())
+ {
+ if (history.getBranch() == branch)
+ {
+ return history;
+ }
+ }
+
+ CDOCommitHistory history = new CDOCommitHistory(this, branch);
+ histories.put(history, Boolean.TRUE);
+ return history;
+ }
+ }
+
public CDOCommitInfo getCommitInfo(long timeStamp)
{
checkActive();
@@ -74,8 +104,13 @@ public class CDOCommitInfoManagerImpl extends Lifecycle implements InternalCDOCo
{
checkActive();
- // TODO: implement CDOCommitInfoManagerImpl.getCommitInfos(branch, startTime, userID, comment, count, handler)
- throw new UnsupportedOperationException();
+ if (userID != null || comment != null)
+ {
+ throw new IllegalArgumentException("The parameters userID and comment are not supported");
+ }
+
+ long endTime = CDOCommitInfoUtil.encodeCount(count);
+ commitInfoLoader.loadCommitInfos(branch, startTime, endTime, handler);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/CDOBranchUtil.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/CDOBranchUtil.java
index 8e44a5b16e..6704a606a7 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/CDOBranchUtil.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/CDOBranchUtil.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranchPointRange;
import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
import org.eclipse.emf.cdo.internal.common.branch.CDOBranchManagerImpl;
+import org.eclipse.emf.cdo.internal.common.branch.CDOBranchPointImpl;
import org.eclipse.emf.cdo.internal.common.branch.CDOBranchPointRangeImpl;
import org.eclipse.net4j.util.ObjectUtil;
@@ -47,6 +48,11 @@ public final class CDOBranchUtil
public static CDOBranchPoint copyBranchPoint(CDOBranchPoint source)
{
+ if (source instanceof CDOBranchPointImpl)
+ {
+ return source;
+ }
+
return source.getBranch().getPoint(source.getTimeStamp());
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java
index 03530875c4..2ab237ae4c 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.spi.common.branch;
+import org.eclipse.emf.cdo.common.CDOCommonRepository;
import org.eclipse.emf.cdo.common.branch.CDOBranchHandler;
import org.eclipse.emf.cdo.common.branch.CDOBranchManager;
import org.eclipse.emf.cdo.common.protocol.CDODataInput;
@@ -32,12 +33,21 @@ import java.io.IOException;
*/
public interface InternalCDOBranchManager extends CDOBranchManager, ILifecycle
{
+ /**
+ * @since 4.2
+ */
+ public void setRepository(CDOCommonRepository repository);
+
public BranchLoader getBranchLoader();
public void setBranchLoader(BranchLoader branchLoader);
public CDOTimeProvider getTimeProvider();
+ /**
+ * @deprecated As of 4.2 replaced by {@link #setRepository(CDOCommonRepository)}
+ */
+ @Deprecated
public void setTimeProvider(CDOTimeProvider timeProvider);
/**
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/CDOCommitInfoUtil.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/CDOCommitInfoUtil.java
index a72be48228..b78f4891f1 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/CDOCommitInfoUtil.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/CDOCommitInfoUtil.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.spi.common.commit;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion;
@@ -44,6 +45,39 @@ public final class CDOCommitInfoUtil
}
/**
+ * @since 4.2
+ */
+ public static long encodeCount(int count)
+ {
+ long timeStamp = count;
+ if (count < 0)
+ {
+ timeStamp = -timeStamp + Integer.MAX_VALUE;
+ }
+
+ return -timeStamp;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public static int decodeCount(long timeStamp)
+ {
+ if (timeStamp < CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ timeStamp = -timeStamp;
+ if (timeStamp > Integer.MAX_VALUE)
+ {
+ return (int)(Integer.MAX_VALUE - timeStamp);
+ }
+
+ return (int)timeStamp;
+ }
+
+ return Integer.MAX_VALUE;
+ }
+
+ /**
* @since 4.0
*/
public static void dump(PrintStream out, CDOChangeSetData changeSetData)
diff --git a/plugins/org.eclipse.emf.cdo.compare/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.compare/META-INF/MANIFEST.MF
index 9d3b0badb0..84aa1750df 100644
--- a/plugins/org.eclipse.emf.cdo.compare/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.compare/META-INF/MANIFEST.MF
@@ -8,8 +8,7 @@ Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.emf.cdo.internal.compare.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+Require-Bundle: org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.compare;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.compare;version="4.2.0",
org.eclipse.emf.cdo.internal.compare.bundle;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests"
diff --git a/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF
index 2c86b121c1..3a72971b7d 100644
--- a/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF
@@ -9,8 +9,7 @@ Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.emf.cdo.edit.CDOEditPlugin$Implementation
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.emf.edit;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
+Require-Bundle: org.eclipse.emf.edit;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.edit;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
diff --git a/plugins/org.eclipse.emf.cdo.efs/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.efs/META-INF/MANIFEST.MF
index 06be57b992..743278fb14 100644
--- a/plugins/org.eclipse.emf.cdo.efs/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.efs/META-INF/MANIFEST.MF
@@ -9,8 +9,7 @@ Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.emf.cdo.internal.efs.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)",
+Require-Bundle: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)",
org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)",
org.eclipse.emf.cdo.net4j;bundle-version="[4.0.0,5.0.0)",
diff --git a/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF
index 29d70a6daa..3036f89a78 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF
@@ -8,8 +8,7 @@ Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.emf.cdo.internal.net4j.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+Require-Bundle: org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.internal.net4j;version="4.1.100";
x-friends:="org.eclipse.emf.cdo.tests,
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
index 0a1e9cfd0e..11373de1d4 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
@@ -27,6 +27,8 @@ import org.eclipse.emf.spi.cdo.CDOSessionProtocol.OpenSessionResult;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol.RepositoryTimeResult;
import org.eclipse.emf.spi.cdo.InternalCDOSession;
+import org.eclipse.core.runtime.PlatformObject;
+
import java.util.Set;
/**
@@ -131,7 +133,7 @@ public class CDONet4jSessionConfigurationImpl extends CDOSessionConfigurationImp
/**
* @author Eike Stepper
*/
- public static class RepositoryInfo implements CDORepositoryInfo
+ public static class RepositoryInfo extends PlatformObject implements CDORepositoryInfo
{
private String name;
@@ -165,8 +167,9 @@ public class CDONet4jSessionConfigurationImpl extends CDOSessionConfigurationImp
private InternalCDOSession session;
- public RepositoryInfo(String name, OpenSessionResult result, InternalCDOSession session)
+ public RepositoryInfo(InternalCDOSession session, String name, OpenSessionResult result)
{
+ this.session = session;
this.name = name;
uuid = result.getRepositoryUUID();
type = result.getRepositoryType();
@@ -182,7 +185,11 @@ public class CDONet4jSessionConfigurationImpl extends CDOSessionConfigurationImp
serializingCommits = result.isRepositoryEnsuringReferentialIntegrity();
ensuringReferentialIntegrity = result.isRepositoryEnsuringReferentialIntegrity();
idGenerationLocation = result.getRepositoryIDGenerationLocation();
- this.session = session;
+ }
+
+ public InternalCDOSession getSession()
+ {
+ return session;
}
public String getName()
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java
index 97d812f51b..f0dd896619 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java
@@ -23,7 +23,6 @@ import org.eclipse.emf.cdo.internal.net4j.CDONet4jSessionConfigurationImpl.Repos
import org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol;
import org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest;
import org.eclipse.emf.cdo.net4j.CDONet4jSession;
-import org.eclipse.emf.cdo.net4j.CDOSession;
import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
import org.eclipse.emf.cdo.spi.common.commit.CDOCommitInfoUtil;
@@ -162,8 +161,8 @@ public class CDONet4jSessionImpl extends CDOSessionImpl implements org.eclipse.e
setBranchManager(branchManager);
}
+ branchManager.setRepository(getRepositoryInfo());
branchManager.setBranchLoader(getSessionProtocol());
- branchManager.setTimeProvider(getRepositoryInfo());
branchManager.initMainBranch(isMainBranchLocal(), getRepositoryInfo().getCreationTime());
branchManager.activate();
@@ -237,7 +236,7 @@ public class CDONet4jSessionImpl extends CDOSessionImpl implements org.eclipse.e
setSessionID(result.getSessionID());
setUserID(result.getUserID());
setLastUpdateTime(result.getLastUpdateTime());
- setRepositoryInfo(new RepositoryInfo(repositoryName, result, this));
+ setRepositoryInfo(new RepositoryInfo(this, repositoryName, result));
return result;
}
@@ -285,10 +284,10 @@ public class CDONet4jSessionImpl extends CDOSessionImpl implements org.eclipse.e
return signalProtocol;
}
- public ISignalProtocol<CDOSession> getProtocol()
+ public ISignalProtocol<org.eclipse.emf.cdo.net4j.CDOSession> getProtocol()
{
@SuppressWarnings("unchecked")
- ISignalProtocol<CDOSession> net4jProtocol = (ISignalProtocol<CDOSession>)(ISignalProtocol<?>)getNet4jProtocol();
+ ISignalProtocol<org.eclipse.emf.cdo.net4j.CDOSession> net4jProtocol = (ISignalProtocol<org.eclipse.emf.cdo.net4j.CDOSession>)(ISignalProtocol<?>)getNet4jProtocol();
return net4jProtocol;
}
diff --git a/plugins/org.eclipse.emf.cdo.security/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.security/META-INF/MANIFEST.MF
index e8592dd52d..a194192aca 100644
--- a/plugins/org.eclipse.emf.cdo.security/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.security/META-INF/MANIFEST.MF
@@ -10,6 +10,5 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.emf.cdo.security;version="4.2.0",
org.eclipse.emf.cdo.security.impl;version="4.2.0",
org.eclipse.emf.cdo.security.util;version="4.2.0"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.emf.cdo;bundle-version="[4.1.0,5.0.0)";visibility:=reexport
+Require-Bundle: org.eclipse.emf.cdo;bundle-version="[4.1.0,5.0.0)";visibility:=reexport
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
index f705f918de..961f5f8923 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
@@ -28,6 +28,8 @@ import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import org.eclipse.net4j.util.om.monitor.NotifyingMonitor;
import org.eclipse.net4j.util.om.monitor.OMMonitorProgress;
+import org.eclipse.core.runtime.Platform;
+
import java.io.IOException;
import java.util.Set;
@@ -184,6 +186,11 @@ public class CDOAdminServerRepository extends Notifier implements CDOAdminReposi
return delegate.getTimeStamp();
}
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
@Override
public String toString()
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
index c879e32079..4ec02988d7 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
@@ -55,6 +55,7 @@ import org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizon
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
import org.eclipse.emf.cdo.spi.common.commit.CDOChangeSetSegment;
+import org.eclipse.emf.cdo.spi.common.commit.CDOCommitInfoUtil;
import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
@@ -987,6 +988,8 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
public void loadCommitInfos(CDOBranch branch, long startTime, long endTime, CDOCommitInfoHandler handler)
{
+ int count = CDOCommitInfoUtil.decodeCount(endTime);
+
StringBuilder builder = new StringBuilder();
builder.append("SELECT "); //$NON-NLS-1$
builder.append(CDODBSchema.COMMIT_INFOS_TIMESTAMP);
@@ -1019,12 +1022,12 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
{
builder.append(where ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
builder.append(CDODBSchema.COMMIT_INFOS_TIMESTAMP);
- builder.append(">="); //$NON-NLS-1$
+ builder.append(count < 0 ? "<=" : ">="); //$NON-NLS-1$
builder.append(startTime);
where = true;
}
- if (endTime != CDOBranchPoint.UNSPECIFIED_DATE)
+ if (endTime > CDOBranchPoint.UNSPECIFIED_DATE)
{
builder.append(where ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
builder.append(CDODBSchema.COMMIT_INFOS_TIMESTAMP);
@@ -1035,6 +1038,7 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
builder.append(" ORDER BY "); //$NON-NLS-1$
builder.append(CDODBSchema.COMMIT_INFOS_TIMESTAMP);
+ builder.append(count < 0 || CDOBranchPoint.UNSPECIFIED_DATE <= endTime && endTime <= startTime ? " DESC" : " ASC"); //$NON-NLS-1$
String sql = builder.toString();
PreparedStatement stmt = null;
@@ -1043,6 +1047,7 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
InternalRepository repository = getStore().getRepository();
InternalCDOBranchManager branchManager = repository.getBranchManager();
InternalCDOCommitInfoManager commitInfoManager = repository.getCommitInfoManager();
+ count = Math.abs(count);
try
{
@@ -1065,6 +1070,11 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
CDOCommitInfo commitInfo = commitInfoManager.createCommitInfo(infoBranch, timeStamp, previousTimeStamp, userID,
comment, null);
handler.handleCommitInfo(commitInfo);
+
+ if (--count == 0)
+ {
+ break;
+ }
}
}
catch (SQLException ex)
diff --git a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
index d8840a72f9..608ee76fa2 100644
--- a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
@@ -541,6 +541,11 @@ public class DB4OStoreAccessor extends LongIDStoreAccessor implements Raw, Durab
public void loadCommitInfos(final CDOBranch branch, final long startTime, final long endTime,
CDOCommitInfoHandler handler)
{
+ if (endTime < CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ throw new IllegalArgumentException("Counting not supported");
+ }
+
ObjectSet<DB4OCommitInfo> resultSet = getObjectContainer().query(new Predicate<DB4OCommitInfo>()
{
private static final long serialVersionUID = 1L;
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java
index a51e9d71e2..ff6b640214 100644
--- a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java
@@ -328,6 +328,11 @@ public class LissomeStoreReader extends StoreAccessorBase implements ILissomeSto
public void loadCommitInfos(CDOBranch branch, long startTime, long endTime, final CDOCommitInfoHandler handler)
{
+ if (endTime < CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ throw new IllegalArgumentException("Counting not supported");
+ }
+
InternalCDOCommitInfoManager commitInfoManager = getStore().getRepository().getCommitInfoManager();
Optimizer optimizer = getStore().getOptimizer();
OptimizerTask[] tasks = optimizer.getTasks();
diff --git a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
index ed28641cb9..8de469b920 100644
--- a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
+++ b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
@@ -4,7 +4,7 @@
* 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
*/
@@ -855,6 +855,11 @@ public class Commits extends Coll
public void loadCommitInfos(CDOBranch branch, long startTime, long endTime, final CDOCommitInfoHandler handler)
{
+ if (endTime < CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ throw new IllegalArgumentException("Counting not supported");
+ }
+
DBObject query = new BasicDBObject();
if (branch != null && store.isBranching())
diff --git a/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters b/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters
index 0b0549224a..224b193011 100644
--- a/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters
@@ -174,15 +174,6 @@
</message_arguments>
</filter>
</resource>
- <resource path="src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java" type="org.eclipse.emf.cdo.internal.server.mem.MEMStore">
- <filter id="574660632">
- <message_arguments>
- <message_argument value="DurableLocking"/>
- <message_argument value="IDurableLockingManager"/>
- <message_argument value="MEMStore"/>
- </message_arguments>
- </filter>
- </resource>
<resource path="src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java" type="org.eclipse.emf.cdo.internal.server.mem.MEMStoreAccessor">
<filter id="574660632">
<message_arguments>
diff --git a/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
index d08f252be6..dc06696f70 100644
--- a/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
@@ -9,8 +9,7 @@ Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.emf.cdo.internal.server.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
- org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+Require-Bundle: org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j.util;bundle-version="[3.1.0,4.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.internal.server;version="4.2.0";
x-friends:="org.eclipse.emf.cdo.server.db,
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java
index 58952bed94..7af45a3607 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java
@@ -53,6 +53,8 @@ import org.eclipse.net4j.util.options.IOptionsContainer;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.core.runtime.PlatformObject;
+
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
@@ -566,7 +568,7 @@ public class LockingManager extends RWOLockManager<Object, IView> implements Int
/**
* @author Eike Stepper
*/
- private final class DurableView implements IView, CDOCommonView.Options
+ private final class DurableView extends PlatformObject implements IView, CDOCommonView.Options
{
private String durableLockingID;
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 12ffd59028..81ae2e0b40 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -115,6 +115,8 @@ import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol.LockObjectsResult;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol.UnlockObjectsResult;
+import org.eclipse.core.runtime.Platform;
+
import java.io.IOException;
import java.io.OutputStream;
import java.text.MessageFormat;
@@ -1620,6 +1622,11 @@ public class Repository extends Container<Object> implements InternalRepository
return new UnlockObjectsResult(cdoLockStates, timestamp);
}
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
@Override
public String toString()
{
@@ -1859,8 +1866,8 @@ public class Repository extends Container<Object> implements InternalRepository
packageRegistry.setPackageProcessor(this);
packageRegistry.setPackageLoader(this);
+ branchManager.setRepository(this);
branchManager.setBranchLoader(this);
- branchManager.setTimeProvider(this);
revisionManager.setRevisionLoader(this);
sessionManager.setRepository(this);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
index ec3fdf95cb..e57c0527c1 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
@@ -29,6 +29,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.common.revision.CDORevisionProvider;
import org.eclipse.emf.cdo.server.IStoreAccessor;
import org.eclipse.emf.cdo.session.CDORepositoryInfo;
+import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
import org.eclipse.emf.cdo.spi.common.commit.CDORevisionAvailabilityInfo;
@@ -72,6 +73,8 @@ import org.eclipse.emf.spi.cdo.InternalCDOSession;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
import org.eclipse.emf.spi.cdo.InternalCDOView;
+import org.eclipse.core.runtime.PlatformObject;
+
import java.util.Collection;
import java.util.List;
import java.util.Map;
@@ -423,7 +426,7 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
/**
* @author Eike Stepper
*/
- private final class ServerCDOSession implements InternalCDOSession, CDORepositoryInfo
+ private final class ServerCDOSession extends PlatformObject implements InternalCDOSession, CDORepositoryInfo
{
private InternalSession internalSession;
@@ -435,6 +438,11 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
repository = internalSession.getManager().getRepository();
}
+ public CDOSession getSession()
+ {
+ return this;
+ }
+
public CDOView[] getElements()
{
return new ServerCDOView[] { ServerCDOView.this };
@@ -450,6 +458,21 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
return new InternalCDOTransaction[0];
}
+ public InternalCDOTransaction[] getTransactions(CDOBranch branch)
+ {
+ return new InternalCDOTransaction[0];
+ }
+
+ public CDOView[] getViews(CDOBranch branch)
+ {
+ if (getBranch() == branch)
+ {
+ return getViews();
+ }
+
+ return new CDOView[0];
+ }
+
public CDOView[] getViews()
{
return getElements();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
index 4216d6b0f3..6625b1e840 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
@@ -56,6 +56,8 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.core.runtime.Platform;
+
import java.text.MessageFormat;
import java.util.List;
import java.util.Set;
@@ -554,6 +556,11 @@ public class Session extends Container<IView> implements InternalSession
}
}
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
@Override
public String toString()
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java
index 07bf2e1403..685477d273 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java
@@ -27,6 +27,8 @@ import org.eclipse.net4j.util.ObjectUtil;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
import org.eclipse.net4j.util.options.IOptionsContainer;
+import org.eclipse.core.runtime.Platform;
+
import java.text.MessageFormat;
import java.util.HashSet;
import java.util.Iterator;
@@ -215,6 +217,11 @@ public class View extends Lifecycle implements InternalView, CDOCommonView.Optio
changeSubscriptionIDs.clear();
}
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
@Override
public int hashCode()
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java
index b9cb2fe429..94de14e944 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java
@@ -22,6 +22,8 @@ import org.eclipse.net4j.util.CheckUtil;
import org.eclipse.emf.spi.cdo.InternalCDOSession;
+import org.eclipse.core.runtime.PlatformObject;
+
import java.util.Set;
/**
@@ -68,7 +70,7 @@ public class EmbeddedClientSessionConfiguration extends CDOSessionConfigurationI
/**
* @author Eike Stepper
*/
- protected static class RepositoryInfo implements org.eclipse.emf.cdo.session.CDORepositoryInfo
+ protected static class RepositoryInfo extends PlatformObject implements org.eclipse.emf.cdo.session.CDORepositoryInfo
{
private EmbeddedClientSession session;
@@ -77,6 +79,11 @@ public class EmbeddedClientSessionConfiguration extends CDOSessionConfigurationI
this.session = session;
}
+ public EmbeddedClientSession getSession()
+ {
+ return session;
+ }
+
public String getName()
{
return session.getRepository().getName();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
index 507564b03e..8e3f997998 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
@@ -31,6 +31,7 @@ import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
+import org.eclipse.emf.cdo.common.util.CDOTimeProvider;
import org.eclipse.emf.cdo.server.ISession;
import org.eclipse.emf.cdo.server.IStoreAccessor;
import org.eclipse.emf.cdo.server.IStoreAccessor.DurableLocking2;
@@ -43,6 +44,7 @@ import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader;
import org.eclipse.emf.cdo.spi.common.commit.CDOChangeSetSegment;
+import org.eclipse.emf.cdo.spi.common.commit.CDOCommitInfoUtil;
import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
@@ -54,7 +56,12 @@ import org.eclipse.emf.cdo.spi.server.StoreAccessorPool;
import org.eclipse.net4j.util.HexUtil;
import org.eclipse.net4j.util.ObjectUtil;
import org.eclipse.net4j.util.ReflectUtil.ExcludeFromDump;
+import org.eclipse.net4j.util.collection.AbstractFilteredIterator;
+import org.eclipse.net4j.util.collection.BidirectionalIterator;
+import org.eclipse.net4j.util.collection.LimitedIterator;
import org.eclipse.net4j.util.collection.Pair;
+import org.eclipse.net4j.util.collection.Predicate;
+import org.eclipse.net4j.util.collection.PredicateIterator;
import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
@@ -81,6 +88,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.ListIterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
@@ -254,28 +262,96 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader, Du
return count;
}
- public synchronized void loadCommitInfos(CDOBranch branch, long startTime, long endTime, CDOCommitInfoHandler handler)
+ public synchronized void loadCommitInfos(final CDOBranch branch, long startTime, final long endTime,
+ CDOCommitInfoHandler handler)
{
InternalCDOCommitInfoManager manager = getRepository().getCommitInfoManager();
- for (int i = 0; i < commitInfos.size(); i++)
+
+ if (startTime == endTime && endTime > CDOBranchPoint.UNSPECIFIED_DATE)
{
- CommitInfo info = commitInfos.get(i);
- if (startTime != CDOBranchPoint.UNSPECIFIED_DATE && info.getTimeStamp() < startTime)
+ int index = Collections.binarySearch(commitInfos, new CommitInfoKey(startTime));
+ if (index >= 0)
{
- continue;
+ CommitInfo commitInfo = commitInfos.get(index);
+ commitInfo.handle(manager, handler);
}
- if (endTime != CDOBranchPoint.UNSPECIFIED_DATE && info.getTimeStamp() > endTime)
+ return;
+ }
+
+ int count = CDOCommitInfoUtil.decodeCount(endTime);
+ int startIndex;
+ if (startTime == CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ startIndex = commitInfos.size();
+ }
+ else
+ {
+ startIndex = Collections.binarySearch(commitInfos, new CommitInfoKey(startTime));
+ }
+
+ boolean match = true;
+ if (startIndex < 0)
+ {
+ startIndex = -(startIndex + 1);
+ match = false;
+ }
+
+ boolean counting = false;
+ boolean backward = false;
+ if (endTime < CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ counting = true;
+ if (count < 0)
{
- continue;
+ backward = true;
+ if (!match)
+ {
+ --startIndex;
+ }
}
-
- if (branch != null && !ObjectUtil.equals(info.getBranch(), branch))
+ }
+ else
+ {
+ if (endTime <= startTime)
{
- continue;
+ backward = true;
+ if (!match)
+ {
+ --startIndex;
+ }
}
+ }
- info.handle(manager, handler);
+ ListIterator<CommitInfo> listIterator = commitInfos.listIterator(startIndex);
+ Iterator<CommitInfo> iterator = new BidirectionalIterator<CommitInfo>(listIterator, backward);
+
+ if (counting)
+ {
+ iterator = new LimitedIterator<CommitInfo>(iterator, Math.abs(count));
+ }
+ else if (startTime != CDOBranchPoint.UNSPECIFIED_DATE || endTime != CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ Predicate<CDOTimeProvider> predicate = backward ? new DownTo(endTime) : new UpTo(endTime);
+ iterator = new PredicateIterator<CommitInfo>(iterator, predicate);
+ }
+
+ if (branch != null)
+ {
+ iterator = new AbstractFilteredIterator<CommitInfo>(iterator)
+ {
+ @Override
+ protected boolean isValid(CommitInfo element)
+ {
+ return element.getBranch() == branch;
+ }
+ };
+ }
+
+ while (iterator.hasNext())
+ {
+ CommitInfo commitInfo = iterator.next();
+ commitInfo.handle(manager, handler);
}
}
@@ -1204,6 +1280,42 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader, Du
/**
* @author Eike Stepper
*/
+ private static final class UpTo implements Predicate<CDOTimeProvider>
+ {
+ private final long timeStamp;
+
+ public UpTo(long timeStamp)
+ {
+ this.timeStamp = timeStamp;
+ }
+
+ public boolean apply(CDOTimeProvider commitInfo)
+ {
+ return commitInfo.getTimeStamp() <= timeStamp;
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ private static final class DownTo implements Predicate<CDOTimeProvider>
+ {
+ private final long timeStamp;
+
+ public DownTo(long timeStamp)
+ {
+ this.timeStamp = timeStamp;
+ }
+
+ public boolean apply(CDOTimeProvider commitInfo)
+ {
+ return commitInfo.getTimeStamp() >= timeStamp;
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
private static final class ListKey
{
private CDOID id;
@@ -1259,12 +1371,33 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader, Du
/**
* @author Eike Stepper
*/
- private static final class CommitInfo
+ private static class CommitInfoKey implements CDOTimeProvider, Comparable<CommitInfoKey>
{
- private CDOBranch branch;
-
private long timeStamp;
+ public CommitInfoKey(long timeStamp)
+ {
+ this.timeStamp = timeStamp;
+ }
+
+ public long getTimeStamp()
+ {
+ return timeStamp;
+ }
+
+ public int compareTo(CommitInfoKey o)
+ {
+ return CDOCommonUtil.compareTimeStamps(timeStamp, o.timeStamp);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ private static final class CommitInfo extends CommitInfoKey
+ {
+ private CDOBranch branch;
+
private long previousTimeStamp;
private String userID;
@@ -1273,8 +1406,8 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader, Du
public CommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment)
{
+ super(timeStamp);
this.branch = branch;
- this.timeStamp = timeStamp;
this.previousTimeStamp = previousTimeStamp;
this.userID = userID;
this.comment = comment;
@@ -1285,22 +1418,18 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader, Du
return branch;
}
- public long getTimeStamp()
- {
- return timeStamp;
- }
-
public void handle(InternalCDOCommitInfoManager manager, CDOCommitInfoHandler handler)
{
- CDOCommitInfo commitInfo = manager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null);
+ CDOCommitInfo commitInfo = manager.createCommitInfo(branch, getTimeStamp(), previousTimeStamp, userID, comment,
+ null);
handler.handleCommitInfo(commitInfo);
}
@Override
public String toString()
{
- return MessageFormat.format("CommitInfo[{0}, {1}, {2}, {3}, {4}]", branch, timeStamp, previousTimeStamp, userID,
- comment);
+ return MessageFormat.format("CommitInfo[{0}, {1}, {2}, {3}, {4}]", branch, getTimeStamp(), previousTimeStamp,
+ userID, comment);
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.team/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.team/META-INF/MANIFEST.MF
index d3382c1670..e8646c2ce5 100644
--- a/plugins/org.eclipse.emf.cdo.team/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.team/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.team;singleton:=true
-Bundle-Version: 4.0.100.qualifier
+Bundle-Version: 4.0.200.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -9,10 +9,9 @@ Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.emf.cdo.internal.team.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
+Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
org.eclipse.team.core;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.internal.team;version="4.0.100";x-friends:="org.eclipse.emf.cdo.ui.ide",
- org.eclipse.emf.cdo.internal.team.bundle;version="4.0.100";x-internal:=true,
- org.eclipse.emf.cdo.team;version="4.0.100"
+Export-Package: org.eclipse.emf.cdo.internal.team;version="4.0.200";x-friends:="org.eclipse.emf.cdo.ui.ide",
+ org.eclipse.emf.cdo.internal.team.bundle;version="4.0.200";x-internal:=true,
+ org.eclipse.emf.cdo.team;version="4.0.200"
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
index 60d706c098..f9fa373569 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
@@ -149,7 +149,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
+ assertEquals(commitInfo.getTimeStamp(), infos.get(0).getTimeStamp());
}
@Skips("MongoDB")
@@ -172,7 +172,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
+ assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@@ -195,7 +195,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
+ assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
@Skips("MongoDB")
@@ -227,7 +227,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
+ assertEquals(commitInfo.getUserID(), infos.get(0).getUserID());
}
@Skips("MongoDB")
@@ -252,7 +252,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getComment(), infos.get(1).getComment());
+ assertEquals(commitInfo.getComment(), infos.get(0).getComment());
}
@Skips("MongoDB")
@@ -275,7 +275,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
+ assertEquals(commitInfo.getTimeStamp(), infos.get(0).getTimeStamp());
}
@Skips("MongoDB")
@@ -298,7 +298,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
+ assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@@ -354,7 +354,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
+ assertEquals(commitInfo.getUserID(), infos.get(0).getUserID());
}
@Skips("MongoDB")
@@ -380,7 +380,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getComment(), infos.get(1).getComment());
+ assertEquals(commitInfo.getComment(), infos.get(0).getComment());
}
@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@@ -518,7 +518,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
+ assertEquals(commitInfo.getTimeStamp(), infos.get(0).getTimeStamp());
}
@CleanRepositoriesBefore
@@ -537,7 +537,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
+ assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@@ -558,7 +558,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
+ assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
@CleanRepositoriesBefore
@@ -587,7 +587,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
+ assertEquals(commitInfo.getUserID(), infos.get(0).getUserID());
}
@CleanRepositoriesBefore
@@ -609,7 +609,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getComment(), infos.get(1).getComment());
+ assertEquals(commitInfo.getComment(), infos.get(0).getComment());
}
@CleanRepositoriesBefore
@@ -628,7 +628,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
+ assertEquals(commitInfo.getTimeStamp(), infos.get(0).getTimeStamp());
}
@CleanRepositoriesBefore
@@ -647,7 +647,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
+ assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@@ -696,7 +696,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
+ assertEquals(commitInfo.getUserID(), infos.get(0).getUserID());
}
@CleanRepositoriesBefore
@@ -718,7 +718,7 @@ public class CommitInfoTest extends AbstractCDOTest
List<CDOCommitInfo> infos = handler.getInfos();
assertEquals(2, infos.size()); // Initial root resource commit + 1
- assertEquals(commitInfo.getComment(), infos.get(1).getComment());
+ assertEquals(commitInfo.getComment(), infos.get(0).getComment());
}
@Requires(IRepositoryConfig.CAPABILITY_BRANCHING)
@@ -855,7 +855,67 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(1 + COMMITS, infos.size()); // Initial root resource commit + COMMITS
for (int i = 0; i < COMMITS; i++)
{
- assertEquals(expected.get(i), infos.get(1 + i));
+ assertEquals(expected.get(COMMITS - i - 1), infos.get(i));
+ }
+ }
+
+ @CleanRepositoriesBefore
+ public void testMultipleEntriesByCountDown() throws Exception
+ {
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
+
+ List<CDOCommitInfo> expected = new ArrayList<CDOCommitInfo>();
+ final int COMMITS = 20;
+ for (int i = 0; i < COMMITS; i++)
+ {
+ resource.getContents().add(getModel1Factory().createProduct1());
+ transaction.setCommitComment("Commit " + i);
+ expected.add(transaction.commit());
+ }
+
+ final int LOAD = 10;
+
+ Handler handler = new Handler();
+ session.getCommitInfoManager().getCommitInfos(null, CDOBranchPoint.UNSPECIFIED_DATE, null, null, -LOAD, handler);
+
+ List<CDOCommitInfo> infos = handler.getInfos();
+
+ assertEquals(LOAD, infos.size()); // Initial root resource commit + COMMITS
+ for (int i = 0; i < LOAD; i++)
+ {
+ assertEquals(expected.get(COMMITS - i - 1), infos.get(i));
+ }
+ }
+
+ @CleanRepositoriesBefore
+ public void testMultipleEntriesByCountUp() throws Exception
+ {
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
+
+ List<CDOCommitInfo> expected = new ArrayList<CDOCommitInfo>();
+ final int COMMITS = 20;
+ for (int i = 0; i < COMMITS; i++)
+ {
+ resource.getContents().add(getModel1Factory().createProduct1());
+ transaction.setCommitComment("Commit " + i);
+ expected.add(transaction.commit());
+ }
+
+ final int LOAD = 10;
+
+ Handler handler = new Handler();
+ session.getCommitInfoManager().getCommitInfos(null, expected.get(0).getTimeStamp(), null, null, LOAD, handler);
+
+ List<CDOCommitInfo> infos = handler.getInfos();
+
+ assertEquals(LOAD, infos.size()); // Initial root resource commit + COMMITS
+ for (int i = 0; i < LOAD; i++)
+ {
+ assertEquals(expected.get(i), infos.get(i));
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java
index 32831bec9c..260cec1656 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342135_Test.java
@@ -1,78 +1,82 @@
-/*
- * 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:
- * Szabolcs Bárdy - initial API and implementation
- */
-package org.eclipse.emf.cdo.tests.bugzilla;
-
-import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
-import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion;
-import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.tests.AbstractCDOTest;
-import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
-import org.eclipse.emf.cdo.tests.model1.Company;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-
-import org.eclipse.net4j.util.io.IOUtil;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import java.util.List;
-
-/**
- * @author Szabolcs Bárdy
- */
-public class Bugzilla_342135_Test extends AbstractCDOTest
-{
- @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
- public void testDetachedCommitInfo() throws Exception
- {
- // Create test resource
- CDOSession session = openSession();
- CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(getResourcePath("/commitInfoResource"));
-
- // Create test object and commit
- Company c1 = getModel1Factory().createCompany();
- c1.setName("Test");
- resource.getContents().add(c1);
-
- transaction.commit();
-
- final URI uriC1 = EcoreUtil.getURI(c1);
- assertEquals(c1, transaction.getResourceSet().getEObject(uriC1, false));
-
- resource.getContents().remove(0); // remove object by index
-
- // Commit info
- CDOCommitInfo commitInfo = transaction.commit();
- List<CDORevisionKey> changedObjects = commitInfo.getChangedObjects();
- List<CDOIDAndVersion> detachedObjects = commitInfo.getDetachedObjects();
-
- IOUtil.OUT().println("Commit info: " + commitInfo);
- IOUtil.OUT().println("Commit info changed objects: " + changedObjects);
- IOUtil.OUT().println("Commit info detached objects: " + detachedObjects);
-
- assertEquals(false, detachedObjects.isEmpty());
- IOUtil.OUT().println();
-
- // Same commit info loaded from database
- CDOCommitInfo loadedCommitInfo = session.getCommitInfoManager().getCommitInfo(commitInfo.getTimeStamp());
- List<CDORevisionKey> loadedChangedObjects = loadedCommitInfo.getChangedObjects();
- List<CDOIDAndVersion> loadedDetachedObjects = loadedCommitInfo.getDetachedObjects();
-
- IOUtil.OUT().println("Loaded commit info: " + loadedCommitInfo);
- IOUtil.OUT().println("Commit info changed objects: " + loadedChangedObjects);
- IOUtil.OUT().println("Loaded commit info detached objects: " + loadedDetachedObjects);
-
- assertEquals(false, loadedDetachedObjects.isEmpty());
- }
-}
+/*
+ * 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:
+ * Szabolcs Bárdy - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.bugzilla;
+
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfoManager;
+import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion;
+import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.model1.Company;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+
+import org.eclipse.net4j.util.io.IOUtil;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import java.util.List;
+
+/**
+ * @author Szabolcs Bárdy
+ */
+public class Bugzilla_342135_Test extends AbstractCDOTest
+{
+ @Requires(IRepositoryConfig.CAPABILITY_AUDITING)
+ public void testDetachedCommitInfo() throws Exception
+ {
+ // Create test resource
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource(getResourcePath("/commitInfoResource"));
+
+ // Create test object and commit
+ Company c1 = getModel1Factory().createCompany();
+ c1.setName("Test");
+ resource.getContents().add(c1);
+
+ transaction.commit();
+
+ final URI uriC1 = EcoreUtil.getURI(c1);
+ assertEquals(c1, transaction.getResourceSet().getEObject(uriC1, false));
+
+ resource.getContents().remove(0); // remove object by index
+
+ // Commit info
+ CDOCommitInfo commitInfo = transaction.commit();
+ List<CDORevisionKey> changedObjects = commitInfo.getChangedObjects();
+ List<CDOIDAndVersion> detachedObjects = commitInfo.getDetachedObjects();
+
+ IOUtil.OUT().println("Commit info: " + commitInfo);
+ IOUtil.OUT().println("Commit info changed objects: " + changedObjects);
+ IOUtil.OUT().println("Commit info detached objects: " + detachedObjects);
+
+ assertEquals(false, detachedObjects.isEmpty());
+ IOUtil.OUT().println();
+
+ // Same commit info loaded from database
+ CDOCommitInfoManager commitInfoManager = session.getCommitInfoManager();
+ long timeStamp = commitInfo.getTimeStamp();
+
+ CDOCommitInfo loadedCommitInfo = commitInfoManager.getCommitInfo(timeStamp);
+ List<CDORevisionKey> loadedChangedObjects = loadedCommitInfo.getChangedObjects();
+ List<CDOIDAndVersion> loadedDetachedObjects = loadedCommitInfo.getDetachedObjects();
+
+ IOUtil.OUT().println("Loaded commit info: " + loadedCommitInfo);
+ IOUtil.OUT().println("Commit info changed objects: " + loadedChangedObjects);
+ IOUtil.OUT().println("Loaded commit info detached objects: " + loadedDetachedObjects);
+
+ assertEquals(false, loadedDetachedObjects.isEmpty());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.transfer.repository/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.transfer.repository/META-INF/MANIFEST.MF
index c13c611c1a..c37190d25c 100644
--- a/plugins/org.eclipse.emf.cdo.transfer.repository/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.transfer.repository/META-INF/MANIFEST.MF
@@ -7,8 +7,7 @@ Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.emf.cdo.transfer;bundle-version="[4.2.0,5.0.0)";visibility:=reexport,
+Require-Bundle: org.eclipse.emf.cdo.transfer;bundle-version="[4.2.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo;bundle-version="[4.2.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.transfer.internal.repository.bundle;version="4.2.0";x-internal:=true,
org.eclipse.emf.cdo.transfer.spi.repository;version="4.2.0"
diff --git a/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/TransferDialog.java b/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/TransferDialog.java
index a7fb64147b..b4a4b30af9 100644
--- a/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/TransferDialog.java
+++ b/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/TransferDialog.java
@@ -73,8 +73,8 @@ public class TransferDialog extends TitleAreaDialog
Composite area = (Composite)super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
- container.setLayout(new FillLayout());
container.setLayoutData(new GridData(GridData.FILL_BOTH));
+ container.setLayout(new FillLayout());
transferComposite = new TransferComposite(container, transfer);
return area;
diff --git a/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/commit.gif b/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/commit.gif
new file mode 100644
index 0000000000..f988003212
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/commit.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/person-me.gif b/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/person-me.gif
new file mode 100644
index 0000000000..fa074fb83a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/person-me.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/person.gif b/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/person.gif
new file mode 100644
index 0000000000..dc5a1af8ff
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.shared/icons/full/obj16/person.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.ui.shared/src/org/eclipse/emf/cdo/ui/shared/SharedIcons.java b/plugins/org.eclipse.emf.cdo.ui.shared/src/org/eclipse/emf/cdo/ui/shared/SharedIcons.java
index a86741fab5..fa17223639 100644
--- a/plugins/org.eclipse.emf.cdo.ui.shared/src/org/eclipse/emf/cdo/ui/shared/SharedIcons.java
+++ b/plugins/org.eclipse.emf.cdo.ui.shared/src/org/eclipse/emf/cdo/ui/shared/SharedIcons.java
@@ -146,6 +146,21 @@ public class SharedIcons
public static final String OBJ_BRANCH = OBJ + "branch.png"; //$NON-NLS-1$
+ /**
+ * @since 4.1
+ */
+ public static final String OBJ_COMMIT = OBJ + "commit.gif"; //$NON-NLS-1$
+
+ /**
+ * @since 4.1
+ */
+ public static final String OBJ_PERSON = OBJ + "person.gif"; //$NON-NLS-1$
+
+ /**
+ * @since 4.1
+ */
+ public static final String OBJ_PERSON_ME = OBJ + "person-me.gif"; //$NON-NLS-1$
+
private static final String VIEW = "view16/"; //$NON-NLS-1$
public static final String VIEW_SESSIONS = VIEW + "cdo_sessions" + IMAGE_FORMAT_GIF; //$NON-NLS-1$
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.classpath b/plugins/org.eclipse.emf.cdo.ui.team/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.options b/plugins/org.eclipse.emf.cdo.ui.team/.options
new file mode 100644
index 0000000000..58198b3bc5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.options
@@ -0,0 +1,3 @@
+# Debugging and tracing options
+
+org.eclipse.emf.cdo.ui.team/debug = true
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.project b/plugins/org.eclipse.emf.cdo.ui.team/.project
new file mode 100644
index 0000000000..cec1546edf
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.project
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.ui.team</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.emf.cdo.releng.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.emf.cdo.releng.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..4f61cd36ae
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Jul 04 13:02:52 CEST 2011
+eclipse.preferences.version=1
+
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..805cd8fbdd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,395 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,*.ucls,doc-files/,package.html,package-info.java
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.launching.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000000..556ed07a3c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,3 @@
+#Fri Sep 02 05:38:34 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..4343e2f963
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,119 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..864e30fe5d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.mylyn.tasks.ui.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..b050639a54
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.mylyn.team.ui.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..2f50f36c0c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..f8d0a0660e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Thu Feb 04 09:44:24 CET 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Ignore
+automatically_removed_unused_problem_filters=Disabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c6b96bb45e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Thu Feb 04 09:44:24 CET 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..ae731948bc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.cdo.ui.team;singleton:=true
+Bundle-Version: 4.2.0.qualifier
+Bundle-Activator: org.eclipse.emf.cdo.ui.internal.team.bundle.OM$Activator
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.team.ui;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.emf.cdo.ui;bundle-version="[4.2.0,5.0.0)";visibility:=reexport,
+ org.eclipse.emf.cdo.ui.shared;bundle-version="[4.0.0,5.0.0)"
+Export-Package: org.eclipse.emf.cdo.ui.internal.team.actions;version="4.2.0";x-internal:=true,
+ org.eclipse.emf.cdo.ui.internal.team.bundle;version="4.2.0";x-internal:=true,
+ org.eclipse.emf.cdo.ui.internal.team.history;version="4.2.0";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/about.html b/plugins/org.eclipse.emf.cdo.ui.team/about.html
new file mode 100644
index 0000000000..d35d5aed64
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/build.properties b/plugins/org.eclipse.emf.cdo.ui.team/build.properties
new file mode 100644
index 0000000000..24d5e60189
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/build.properties
@@ -0,0 +1,26 @@
+# 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
+
+# NLS_MESSAGEFORMAT_VAR
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ .options,\
+ about.html,\
+ copyright.txt
+src.includes = about.html,\
+ copyright.txt
+
+doc.project = org.eclipse.emf.cdo.doc
+
+generateSourceReferences = true
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/copyright.txt b/plugins/org.eclipse.emf.cdo.ui.team/copyright.txt
new file mode 100644
index 0000000000..0a0f67e6d7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/copyright.txt
@@ -0,0 +1,8 @@
+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 \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/plugin.properties b/plugins/org.eclipse.emf.cdo.ui.team/plugin.properties
new file mode 100644
index 0000000000..2678f35f86
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/plugin.properties
@@ -0,0 +1,11 @@
+# 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
+
+pluginName = CDO Model Repository Client UI Team
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/plugin.xml b/plugins/org.eclipse.emf.cdo.ui.team/plugin.xml
new file mode 100644
index 0000000000..49664aa82a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/plugin.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ 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
+-->
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.eclipse.emf.cdo.ui.internal.team.bundle.EarlyStartup">
+ </startup>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.emf.cdo.session.CDOSession"
+ class="org.eclipse.emf.cdo.ui.internal.team.history.CDOHistoryAdapterFactory">
+ <adapter type="org.eclipse.team.ui.history.IHistoryPageSource"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.emf.cdo.view.CDOView"
+ class="org.eclipse.emf.cdo.ui.internal.team.history.CDOHistoryAdapterFactory">
+ <adapter type="org.eclipse.team.ui.history.IHistoryPageSource"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.emf.ecore.EObject"
+ class="org.eclipse.emf.cdo.ui.internal.team.history.CDOHistoryAdapterFactory">
+ <adapter type="org.eclipse.team.ui.history.IHistoryPageSource"/>
+ </factory>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/actions/AbstractContainerAction.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/actions/AbstractContainerAction.java
new file mode 100644
index 0000000000..e85b78d2e6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/actions/AbstractContainerAction.java
@@ -0,0 +1,38 @@
+/*
+ * 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:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.emf.cdo.ui.internal.team.actions;
+
+import org.eclipse.net4j.util.container.IContainer;
+import org.eclipse.net4j.util.ui.actions.LongRunningAction;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public abstract class AbstractContainerAction<E> extends LongRunningAction
+{
+ private IContainer.Modifiable<E> container;
+
+ public AbstractContainerAction(IContainer.Modifiable<E> container)
+ {
+ setContainer(container);
+ }
+
+ protected IContainer.Modifiable<E> getContainer()
+ {
+ return container;
+ }
+
+ protected void setContainer(IContainer.Modifiable<E> container)
+ {
+ this.container = container;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/bundle/EarlyStartup.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/bundle/EarlyStartup.java
new file mode 100644
index 0000000000..1e5e1cc7a5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/bundle/EarlyStartup.java
@@ -0,0 +1,24 @@
+/*
+ * 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
+ * Victor Roldan Betancort - maintenance
+ */
+package org.eclipse.emf.cdo.ui.internal.team.bundle;
+
+import org.eclipse.ui.IStartup;
+
+/**
+ * @author Eike Stepper
+ */
+public class EarlyStartup implements IStartup
+{
+ public void earlyStartup()
+ {
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/bundle/OM.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/bundle/OM.java
new file mode 100644
index 0000000000..86675435c9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/bundle/OM.java
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * Victor Roldan Betancort - maintenance
+ */
+package org.eclipse.emf.cdo.ui.internal.team.bundle;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+import org.eclipse.net4j.util.ui.UIActivator;
+
+/**
+ * The <em>Operations & Maintenance</em> class of this bundle.
+ *
+ * @author Eike Stepper
+ */
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.emf.cdo.ui.team"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Activator extends UIActivator
+ {
+ public static Activator INSTANCE;
+
+ public Activator()
+ {
+ super(BUNDLE);
+ INSTANCE = this;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryAdapterFactory.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryAdapterFactory.java
new file mode 100644
index 0000000000..c1db316e30
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryAdapterFactory.java
@@ -0,0 +1,32 @@
+package org.eclipse.emf.cdo.ui.internal.team.history;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.team.ui.history.IHistoryPageSource;
+
+/**
+ * @author Eike Stepper
+ */
+@SuppressWarnings("rawtypes")
+public class CDOHistoryAdapterFactory implements IAdapterFactory
+{
+ private static final Class[] ADAPTER_TYPES = { IHistoryPageSource.class };
+
+ public CDOHistoryAdapterFactory()
+ {
+ }
+
+ public Class[] getAdapterList()
+ {
+ return ADAPTER_TYPES;
+ }
+
+ public Object getAdapter(Object adaptableObject, Class adapterType)
+ {
+ if (adapterType == IHistoryPageSource.class)
+ {
+ return CDOHistoryPageSource.INSTANCE;
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
new file mode 100644
index 0000000000..b458203d3b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
@@ -0,0 +1,110 @@
+/*
+ * 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.ui.internal.team.history;
+
+import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite;
+import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite.Input;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.team.ui.history.HistoryPage;
+
+/**
+ * @author Eike Stepper
+ */
+public class CDOHistoryPage extends HistoryPage
+{
+ private CommitHistoryComposite commitHistoryComposite;
+
+ private Input input;
+
+ public CDOHistoryPage()
+ {
+ }
+
+ public String getName()
+ {
+ return input != null ? input.toString() : null;
+ }
+
+ public String getDescription()
+ {
+ return "";
+ }
+
+ @Override
+ public CommitHistoryComposite getControl()
+ {
+ return commitHistoryComposite;
+ }
+
+ @Override
+ public void createControl(Composite parent)
+ {
+ commitHistoryComposite = new CommitHistoryComposite(parent, SWT.NONE);
+ }
+
+ @Override
+ public void setFocus()
+ {
+ commitHistoryComposite.setFocus();
+ }
+
+ public void refresh()
+ {
+ commitHistoryComposite.getTableViewer().refresh();
+ }
+
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
+ public boolean isValidInput(Object object)
+ {
+ return canShowHistoryFor(object);
+ }
+
+ @Override
+ public boolean inputSet()
+ {
+ Object object = getInput();
+
+ try
+ {
+ input = new CommitHistoryComposite.Input(object);
+ return true;
+ }
+ catch (IllegalStateException ex)
+ {
+ input = null;
+ return false;
+ }
+ finally
+ {
+ commitHistoryComposite.setInput(input);
+ }
+ }
+
+ public static boolean canShowHistoryFor(Object object)
+ {
+ try
+ {
+ new CommitHistoryComposite.Input(object);
+ return true;
+ }
+ catch (IllegalStateException ex)
+ {
+ return false;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPageSource.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPageSource.java
new file mode 100644
index 0000000000..ff98046405
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPageSource.java
@@ -0,0 +1,38 @@
+/*
+ * 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.ui.internal.team.history;
+
+import org.eclipse.team.ui.history.HistoryPageSource;
+import org.eclipse.team.ui.history.IHistoryPageSource;
+import org.eclipse.ui.part.Page;
+
+/**
+ * @author Eike Stepper
+ */
+public final class CDOHistoryPageSource extends HistoryPageSource
+{
+ public static final IHistoryPageSource INSTANCE = new CDOHistoryPageSource();
+
+ private CDOHistoryPageSource()
+ {
+ }
+
+ public boolean canShowHistoryFor(Object object)
+ {
+ return CDOHistoryPage.canShowHistoryFor(object);
+ }
+
+ public Page createPage(Object object)
+ {
+ // Don't set the input, the framework does this for us
+ return new CDOHistoryPage();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
index dff10a9236..b14754900b 100644
--- a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
@@ -9,8 +9,7 @@ Bundle-ClassPath: .
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";resolution:=optional;visibility:=reexport,
+Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";resolution:=optional;visibility:=reexport,
org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)";resolution:=optional;visibility:=reexport,
org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)";resolution:=optional,
org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)";resolution:=optional;visibility:=reexport,
diff --git a/plugins/org.eclipse.emf.cdo.ui/build.properties b/plugins/org.eclipse.emf.cdo.ui/build.properties
index 7b794ed73b..7be581652b 100644
--- a/plugins/org.eclipse.emf.cdo.ui/build.properties
+++ b/plugins/org.eclipse.emf.cdo.ui/build.properties
@@ -18,7 +18,8 @@ bin.includes = META-INF/,\
model/,\
.options,\
about.html,\
- copyright.txt
+ copyright.txt,\
+ icons/
src.includes = about.html,\
copyright.txt,\
CDOClient1.launch,\
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateBranchAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateBranchAction.java
index 81d9e0748b..84bd982ebb 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateBranchAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateBranchAction.java
@@ -13,7 +13,7 @@ package org.eclipse.emf.cdo.internal.ui.actions;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
-import org.eclipse.emf.cdo.internal.ui.dialogs.SelectBranchPointDialog;
+import org.eclipse.emf.cdo.internal.ui.dialogs.CreateBranchDialog;
import org.eclipse.emf.cdo.internal.ui.messages.Messages;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.ui.shared.SharedIcons;
@@ -50,7 +50,7 @@ public class CreateBranchAction extends SessionAction
@Override
protected void preRun() throws Exception
{
- SelectBranchPointDialog.WithName dialog = new SelectBranchPointDialog.WithName(getPage(), getSession(), null, true,
+ CreateBranchDialog dialog = new CreateBranchDialog(getPage(), getSession(), null, true,
null)
{
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java
new file mode 100644
index 0000000000..4db38575d8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/CreateBranchDialog.java
@@ -0,0 +1,88 @@
+/*
+ * 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.internal.ui.dialogs;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.session.CDOSession;
+
+import org.eclipse.net4j.util.StringUtil;
+import org.eclipse.net4j.util.ui.UIUtil;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * @author Eike Stepper
+ */
+public class CreateBranchDialog extends SelectBranchPointDialog
+{
+ private String name;
+
+ private Text nameText;
+
+ public CreateBranchDialog(IWorkbenchPage page, CDOSession session, CDOBranchPoint branchPoint, boolean allowTimeStamp,
+ String name)
+ {
+ super(page, session, branchPoint, allowTimeStamp);
+ this.name = StringUtil.safe(name);
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ validate();
+ }
+
+ public Text getNameText()
+ {
+ return nameText;
+ }
+
+ @Override
+ protected void createBranchPointArea(Composite parent)
+ {
+ GridLayout gridLayout = UIUtil.createGridLayout(2);
+ gridLayout.marginHeight = 5;
+ gridLayout.horizontalSpacing = 5;
+
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayoutData(UIUtil.createGridData(true, false));
+ composite.setLayout(gridLayout);
+
+ Label label = new Label(composite, SWT.NONE);
+ label.setLayoutData(UIUtil.createGridData(false, false));
+ label.setText("Name:");
+
+ nameText = new Text(composite, SWT.BORDER);
+ nameText.setLayoutData(UIUtil.createGridData(true, false));
+ nameText.setText(name);
+ nameText.addModifyListener(new ModifyListener()
+ {
+ public void modifyText(ModifyEvent e)
+ {
+ setName(nameText.getText());
+ }
+ });
+
+ super.createBranchPointArea(parent);
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectBranchPointDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectBranchPointDialog.java
index 0b428d1713..a958c9e876 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectBranchPointDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectBranchPointDialog.java
@@ -11,10 +11,11 @@
package org.eclipse.emf.cdo.internal.ui.dialogs;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite;
import org.eclipse.emf.cdo.ui.widgets.ComposeBranchPointComposite;
-import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.net4j.util.ui.ValidationContext;
@@ -23,15 +24,12 @@ import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchPage;
/**
@@ -116,20 +114,22 @@ public class SelectBranchPointDialog extends TitleAreaDialog implements Validati
protected void configureShell(Shell newShell)
{
super.configureShell(newShell);
- newShell.setSize(500, 500);
+ newShell.setSize(700, 500);
}
@Override
protected Control createDialogArea(Composite parent)
{
- Composite composite = (Composite)super.createDialogArea(parent);
- composite.setLayoutData(UIUtil.createGridData());
- composite.setLayout(new GridLayout(1, false));
+ Composite area = (Composite)super.createDialogArea(parent);
- createBranchPointArea(composite);
- UIUtil.setValidationContext(composite, aggregator);
+ Composite container = new Composite(area, SWT.NONE);
+ container.setLayoutData(new GridData(GridData.FILL_BOTH));
+ container.setLayout(new GridLayout(1, false));
- return composite;
+ createBranchPointArea(container);
+ UIUtil.setValidationContext(container, aggregator);
+
+ return area;
}
protected void createBranchPointArea(Composite parent)
@@ -186,6 +186,17 @@ public class SelectBranchPointDialog extends TitleAreaDialog implements Validati
protected void createCommitsTab(Composite parent)
{
+ CommitHistoryComposite control = new CommitHistoryComposite(parent, SWT.NONE)
+ {
+ @Override
+ protected void commitInfoChanged(CDOCommitInfo newCommitInfo)
+ {
+ setBranchPoint(newCommitInfo);
+ }
+ };
+
+ control.setLayoutData(UIUtil.createGridData());
+ control.setInput(new CommitHistoryComposite.Input(session, null));
}
protected void createTagsTab(Composite parent)
@@ -204,66 +215,4 @@ public class SelectBranchPointDialog extends TitleAreaDialog implements Validati
protected void validate()
{
}
-
- /**
- * @author Eike Stepper
- */
- public static class WithName extends SelectBranchPointDialog
- {
- private String name;
-
- private Text nameText;
-
- public WithName(IWorkbenchPage page, CDOSession session, CDOBranchPoint branchPoint, boolean allowTimeStamp,
- String name)
- {
- super(page, session, branchPoint, allowTimeStamp);
- this.name = StringUtil.safe(name);
- }
-
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- validate();
- }
-
- public Text getNameText()
- {
- return nameText;
- }
-
- @Override
- protected void createBranchPointArea(Composite parent)
- {
- GridLayout gridLayout = UIUtil.createGridLayout(2);
- gridLayout.marginHeight = 5;
- gridLayout.horizontalSpacing = 5;
-
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayoutData(UIUtil.createGridData(true, false));
- composite.setLayout(gridLayout);
-
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(UIUtil.createGridData(false, false));
- label.setText("Name:");
-
- nameText = new Text(composite, SWT.BORDER);
- nameText.setLayoutData(UIUtil.createGridData(true, false));
- nameText.setText(name);
- nameText.addModifyListener(new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- setName(nameText.getText());
- }
- });
-
- super.createBranchPointArea(parent);
- }
- }
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
index ef227a9895..ed82eec876 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
@@ -571,32 +571,47 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
{
if (event instanceof CDOViewTargetChangedEvent)
{
- Object input = selectionViewer.getInput();
- if (input == EMPTY_INPUT)
+ final CDOViewTargetChangedEvent e = (CDOViewTargetChangedEvent)event;
+ getSite().getShell().getDisplay().asyncExec(new Runnable()
{
- if (inputID != null)
+ public void run()
{
- try
+ Object input = selectionViewer.getInput();
+ if (input == EMPTY_INPUT)
{
- CDOObject object = view.getObject(inputID);
- selectionViewer.setInput(object);
- inputID = null;
+ if (inputID != null)
+ {
+ try
+ {
+ CDOObject object = view.getObject(inputID);
+ selectionViewer.setInput(object);
+ inputID = null;
+ }
+ catch (Exception ex)
+ {
+ // Ignore
+ }
+ }
}
- catch (Exception ex)
+ else if (input instanceof EObject)
{
- // Ignore
+ CDOObject object = CDOUtil.getCDOObject((EObject)input);
+ if (object.cdoInvalid())
+ {
+ if (e.getBranchPoint().getTimeStamp() == e.getOldBranchPoint().getTimeStamp())
+ {
+ inputID = null;
+ closeEditor();
+ }
+ else
+ {
+ inputID = object.cdoID();
+ selectionViewer.setInput(EMPTY_INPUT);
+ }
+ }
}
}
- }
- else if (input instanceof EObject)
- {
- CDOObject object = CDOUtil.getCDOObject((EObject)input);
- if (object.cdoInvalid())
- {
- inputID = object.cdoID();
- selectionViewer.setInput(EMPTY_INPUT);
- }
- }
+ });
}
}
};
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
index bd8b234582..596ead6ace 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
@@ -52,6 +52,7 @@ import org.eclipse.emf.cdo.session.CDOSessionInvalidationEvent;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.transfer.CDOTransferElement;
import org.eclipse.emf.cdo.ui.shared.SharedIcons;
+import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.cdo.view.CDOViewTargetChangedEvent;
@@ -109,6 +110,8 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
private IWorkbenchPage page;
+ private boolean mergeMainBranchWithSession;
+
public CDOItemProvider(IWorkbenchPage page, IElementFilter rootElementFilter)
{
super(rootElementFilter);
@@ -138,6 +141,26 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
super.dispose();
}
+ /**
+ * @since 4.2
+ */
+ public boolean isMergeMainBranchWithSession()
+ {
+ return mergeMainBranchWithSession;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public void setMergeMainBranchWithSession(boolean mergeMainBranchWithSession)
+ {
+ if (this.mergeMainBranchWithSession != mergeMainBranchWithSession)
+ {
+ this.mergeMainBranchWithSession = mergeMainBranchWithSession;
+ refreshViewer(true);
+ }
+ }
+
@Override
public Object[] getChildren(Object element)
{
@@ -148,7 +171,12 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
if (element instanceof CDOBranch)
{
- return ((CDOBranch)element).getBranches();
+ return getChildren((CDOBranch)element);
+ }
+
+ if (mergeMainBranchWithSession && element instanceof CDOSession)
+ {
+ return getChildren(((CDOSession)element).getBranchManager().getMainBranch());
}
if (element instanceof CDOView)
@@ -164,6 +192,46 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
return super.getChildren(element);
}
+ /**
+ * @since 4.2
+ */
+ protected Object[] getChildren(CDOBranch branch)
+ {
+ CDOBranch[] branches = branch.getBranches();
+ if (!mergeMainBranchWithSession)
+ {
+ return branch.getBranches();
+ }
+
+ Object[] views = getViews(branch);
+
+ if (views.length == 0)
+ {
+ return branches;
+ }
+
+ if (branches.length == 0)
+ {
+ return views;
+ }
+
+ Object[] children = new Object[branches.length + views.length];
+ System.arraycopy(branches, 0, children, 0, branches.length);
+ System.arraycopy(views, 0, children, branches.length, views.length);
+ return children;
+ }
+
+ private Object[] getViews(CDOBranch branch)
+ {
+ CDOSession session = CDOUtil.getSession(branch);
+ if (session != null)
+ {
+ return session.getViews(branch);
+ }
+
+ return NO_ELEMENTS;
+ }
+
@Override
public boolean hasChildren(Object element)
{
@@ -174,7 +242,15 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
if (element instanceof CDOBranch)
{
- return !((CDOBranch)element).isEmpty();
+ return hasChildren((CDOBranch)element);
+ }
+
+ if (element instanceof CDOSession)
+ {
+ if (mergeMainBranchWithSession)
+ {
+ return hasChildren(((CDOSession)element).getBranchManager().getMainBranch());
+ }
}
if (element instanceof CDOView)
@@ -190,6 +266,20 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
return super.hasChildren(element);
}
+ /**
+ * @since 4.2
+ */
+ protected boolean hasChildren(CDOBranch branch)
+ {
+ if (!branch.isEmpty())
+ {
+ return true;
+ }
+
+ Object[] views = getViews(branch);
+ return views.length != 0;
+ }
+
@Override
public Object getParent(Object element)
{
@@ -198,6 +288,11 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
CDOBranch branch = (CDOBranch)element;
if (branch.isMainBranch())
{
+ if (mergeMainBranchWithSession)
+ {
+ return CDOUtil.getSession(branch);
+ }
+
return branch.getBranchManager();
}
@@ -216,6 +311,18 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
return parent;
}
+ if (element instanceof CDOView)
+ {
+ CDOView view = (CDOView)element;
+ CDOBranch branch = view.getBranch();
+ if (branch.isMainBranch() || !mergeMainBranchWithSession)
+ {
+ return view.getSession();
+ }
+
+ return branch;
+ }
+
return super.getParent(element);
}
@@ -360,6 +467,10 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
{
fillView(manager, (CDOView)object);
}
+ else if (object instanceof CDOBranch)
+ {
+ fillBranch(manager, (CDOBranch)object);
+ }
else if (object instanceof CDOResourceFolder)
{
fillResourceFolder(manager, (CDOResourceFolder)object);
@@ -375,58 +486,6 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
}
/**
- * @since 3.0
- */
- protected void fillResourceFolder(IMenuManager manager, CDOResourceFolder folder)
- {
- }
-
- /**
- * @since 4.2
- */
- protected void fillResourceLeaf(IMenuManager manager, Object object)
- {
- CDOEditorUtil.populateMenu(manager, (CDOResourceLeaf)object, page);
-
- if (object instanceof CDOResource)
- {
- fillResource(manager, (CDOResource)object);
- }
- else if (object instanceof CDOTextResource)
- {
- fillTextResource(manager, (CDOTextResource)object);
- }
- else if (object instanceof CDOBinaryResource)
- {
- fillBinaryResource(manager, (CDOBinaryResource)object);
- }
- }
-
- /**
- * @since 3.0
- */
- protected void fillResource(IMenuManager manager, CDOResource resource)
- {
- // manager.add(new OpenResourceEditorAction(page, resource));
- }
-
- /**
- * @since 4.2
- */
- protected void fillTextResource(IMenuManager manager, CDOTextResource resource)
- {
- // manager.add(new OpenResourceEditorAction(page, resource));
- }
-
- /**
- * @since 4.2
- */
- protected void fillBinaryResource(IMenuManager manager, CDOBinaryResource resource)
- {
- // manager.add(new OpenResourceEditorAction(page, resource));
- }
-
- /**
* @since 2.0
*/
protected void fillSession(IMenuManager manager, CDOSession session)
@@ -455,7 +514,7 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
if (session.getRepositoryInfo().isSupportingBranches())
{
manager.add(new Separator());
- manager.add(new CreateBranchAction(page, session));
+ fillBranch(manager, session.getBranchManager().getMainBranch());
}
manager.add(new Separator());
@@ -553,6 +612,67 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
manager.add(new CloseViewAction(page, view));
}
+ /**
+ * @since 4.2
+ */
+ protected void fillBranch(IMenuManager manager, CDOBranch branch)
+ {
+ CDOSession session = CDOUtil.getSession(branch);
+ manager.add(new CreateBranchAction(page, session));
+ }
+
+ /**
+ * @since 3.0
+ */
+ protected void fillResourceFolder(IMenuManager manager, CDOResourceFolder folder)
+ {
+ }
+
+ /**
+ * @since 4.2
+ */
+ protected void fillResourceLeaf(IMenuManager manager, Object object)
+ {
+ CDOEditorUtil.populateMenu(manager, (CDOResourceLeaf)object, page);
+
+ if (object instanceof CDOResource)
+ {
+ fillResource(manager, (CDOResource)object);
+ }
+ else if (object instanceof CDOTextResource)
+ {
+ fillTextResource(manager, (CDOTextResource)object);
+ }
+ else if (object instanceof CDOBinaryResource)
+ {
+ fillBinaryResource(manager, (CDOBinaryResource)object);
+ }
+ }
+
+ /**
+ * @since 3.0
+ */
+ protected void fillResource(IMenuManager manager, CDOResource resource)
+ {
+ // manager.add(new OpenResourceEditorAction(page, resource));
+ }
+
+ /**
+ * @since 4.2
+ */
+ protected void fillTextResource(IMenuManager manager, CDOTextResource resource)
+ {
+ // manager.add(new OpenResourceEditorAction(page, resource));
+ }
+
+ /**
+ * @since 4.2
+ */
+ protected void fillBinaryResource(IMenuManager manager, CDOBinaryResource resource)
+ {
+ // manager.add(new OpenResourceEditorAction(page, resource));
+ }
+
@Override
protected void elementAdded(Object element, Object parent)
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOLabelProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOLabelProvider.java
index ed51a7a5e9..b6389530be 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOLabelProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOLabelProvider.java
@@ -31,7 +31,7 @@ import org.eclipse.swt.graphics.Font;
* A {@link org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider AdapterFactoryLabelProvider} specialization
* that decorates {@link org.eclipse.emf.cdo.CDOObject objects} with a color/font code according to their current
* {@link org.eclipse.emf.cdo.CDOState state}.
- *
+ *
* @author Eike Stepper
* @see org.eclipse.jface.viewers.IColorProvider
* @see org.eclipse.jface.viewers.IFontProvider
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
new file mode 100644
index 0000000000..9d5d7726d2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java
@@ -0,0 +1,353 @@
+/*
+ * 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.ui.widgets;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.commit.CDOCommitHistory;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfoManager;
+import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.ui.shared.SharedIcons;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.net4j.util.ui.StructuredContentProvider;
+import org.eclipse.net4j.util.ui.TableLabelProvider;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Eike Stepper
+ * @since 4.2
+ */
+public class CommitHistoryComposite extends Composite
+{
+ private CDOCommitHistory history;
+
+ private TableViewer tableViewer;
+
+ private LabelProvider labelProvider;
+
+ private Input input;
+
+ public CommitHistoryComposite(Composite parent, int style)
+ {
+ super(parent, style);
+
+ setLayout(new FillLayout(SWT.HORIZONTAL));
+
+ tableViewer = new TableViewer(this, SWT.BORDER | SWT.FULL_SELECTION);
+ tableViewer.setContentProvider(new ContentProvider());
+
+ labelProvider = new LabelProvider();
+ labelProvider.support(tableViewer);
+ }
+
+ public final CDOCommitHistory getHistory()
+ {
+ return history;
+ }
+
+ public final TableViewer getTableViewer()
+ {
+ return tableViewer;
+ }
+
+ public final Input getInput()
+ {
+ return input;
+ }
+
+ public final void setInput(Input input)
+ {
+ this.input = input;
+
+ CDOSession session = input.getSession();
+ String userID = session.getUserID();
+ labelProvider.setLocalUserID(userID);
+
+ CDOCommitInfoManager commitInfoManager = session.getCommitInfoManager();
+ history = commitInfoManager.getHistory(input.getBranch());
+ if (history.isEmpty())
+ {
+ history.loadCommitInfos(25);
+ }
+
+ tableViewer.setInput(history);
+ }
+
+ @Override
+ public boolean setFocus()
+ {
+ return tableViewer.getTable().setFocus();
+ }
+
+ @Override
+ public void dispose()
+ {
+ input = null;
+ history = null;
+ super.dispose();
+ }
+
+ protected void commitInfoChanged(CDOCommitInfo newCommitInfo)
+ {
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Input
+ {
+ private final CDOSession session;
+
+ private final CDOBranch branch;
+
+ public Input(Object object)
+ {
+ if (object instanceof CDOSession)
+ {
+ session = (CDOSession)object;
+ branch = null;
+ return;
+ }
+
+ if (object instanceof CDOView)
+ {
+ CDOView view = (CDOView)object;
+ session = view.getSession();
+ branch = view.getBranch();
+ return;
+ }
+
+ if (object instanceof EObject)
+ {
+ EObject eObject = (EObject)object;
+ CDOObject cdoObject = CDOUtil.getCDOObject(eObject);
+ if (cdoObject != null)
+ {
+ CDOView view = cdoObject.cdoView();
+ if (view != null)
+ {
+ session = view.getSession();
+ branch = view.getBranch();
+ return;
+ }
+ }
+ }
+
+ throw new IllegalStateException("Illegal input: " + object);
+ }
+
+ public Input(CDOSession session, CDOBranch branch)
+ {
+ this.session = session;
+ this.branch = branch;
+ }
+
+ public final CDOSession getSession()
+ {
+ return session;
+ }
+
+ public final CDOBranch getBranch()
+ {
+ return branch;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (branch == null ? 0 : branch.hashCode());
+ result = prime * result + (session == null ? 0 : session.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+
+ if (obj == null)
+ {
+ return false;
+ }
+
+ if (!(obj instanceof Input))
+ {
+ return false;
+ }
+
+ Input other = (Input)obj;
+ if (branch == null)
+ {
+ if (other.branch != null)
+ {
+ return false;
+ }
+ }
+ else if (!branch.equals(other.branch))
+ {
+ return false;
+ }
+
+ if (session == null)
+ {
+ if (other.session != null)
+ {
+ return false;
+ }
+ }
+ else if (!session.equals(other.session))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ String str = session.getRepositoryInfo().getName();
+ if (branch != null)
+ {
+ str += " [" + branch.getPathName() + "]";
+ }
+
+ return str;
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class ContentProvider extends StructuredContentProvider<CDOCommitHistory>
+ {
+ public Object[] getElements(Object inputElement)
+ {
+ return ((CDOCommitHistory)inputElement).getElements();
+ }
+
+ @Override
+ protected void connectInput(CDOCommitHistory history)
+ {
+ history.addListener(this);
+ }
+
+ @Override
+ protected void disconnectInput(CDOCommitHistory history)
+ {
+ history.removeListener(this);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class LabelProvider extends TableLabelProvider<CDOCommitInfo>
+ {
+ private static final ImageDescriptor COMMIT = SharedIcons.getDescriptor(SharedIcons.OBJ_COMMIT);
+
+ private static final ImageDescriptor PERSON = SharedIcons.getDescriptor(SharedIcons.OBJ_PERSON);
+
+ private static final ImageDescriptor PERSON_ME = SharedIcons.getDescriptor(SharedIcons.OBJ_PERSON_ME);
+
+ private String localUserID;
+
+ public LabelProvider()
+ {
+ addColumn(new Column<CDOCommitInfo>("Time", 160)
+ {
+ @Override
+ public String getText(CDOCommitInfo commitInfo)
+ {
+ return CDOCommonUtil.formatTimeStamp(commitInfo.getTimeStamp());
+ }
+
+ @Override
+ public Image getImage(CDOCommitInfo commitInfo)
+ {
+ return (Image)getResource(COMMIT);
+ }
+ });
+
+ addColumn(new Column<CDOCommitInfo>("Comment", 200)
+ {
+ @Override
+ public String getText(CDOCommitInfo commitInfo)
+ {
+ return commitInfo.getComment();
+ }
+ });
+
+ addColumn(new Column<CDOCommitInfo>("User", 120)
+ {
+ @Override
+ public String getText(CDOCommitInfo commitInfo)
+ {
+ return commitInfo.getUserID();
+ }
+
+ @Override
+ public Image getImage(CDOCommitInfo commitInfo)
+ {
+ String userID = commitInfo.getUserID();
+ if (userID != null)
+ {
+ if (userID.equals(localUserID))
+ {
+ return (Image)getResource(PERSON_ME);
+ }
+
+ return (Image)getResource(PERSON);
+ }
+
+ return null;
+ }
+ });
+
+ addColumn(new Column<CDOCommitInfo>("Branch", 160)
+ {
+ @Override
+ public String getText(CDOCommitInfo commitInfo)
+ {
+ return commitInfo.getBranch().getPathName();
+ }
+ });
+ }
+
+ public String getLocalUserID()
+ {
+ return localUserID;
+ }
+
+ public void setLocalUserID(String localUserID)
+ {
+ this.localUserID = localUserID;
+ // fireLabelProviderChanged(new LabelProviderChangedEvent(this));
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java
index 3582916143..de9cfb32cd 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SelectBranchComposite.java
@@ -39,7 +39,7 @@ import org.eclipse.swt.widgets.Listener;
/**
* UI widget that provides visualization of all available {@link org.eclipse.emf.cdo.common.branch.CDOBranch branches},
* and with the capability to select one.
- *
+ *
* @author Eike Stepper
* @since 4.0
*/
@@ -51,14 +51,20 @@ public class SelectBranchComposite extends Composite implements ValidationPartic
private CDOBranch branch;
- private IHistory<String> branchHistory;
-
private HistoryText branchText;
private TreeViewer branchViewer;
public SelectBranchComposite(Composite parent, int style, CDOSession session, CDOBranch branch)
{
+ this(parent, style, session, branch, false);
+ }
+
+ /**
+ * @since 4.2
+ */
+ public SelectBranchComposite(Composite parent, int style, CDOSession session, CDOBranch branch, boolean withHistory)
+ {
super(parent, style);
this.session = session;
this.branch = branch;
@@ -70,24 +76,27 @@ public class SelectBranchComposite extends Composite implements ValidationPartic
setLayout(gridLayout);
- String prefName = "PREF_HISTORY_BRANCHES-" + session.getRepositoryInfo().getUUID(); //$NON-NLS-1$
- OMPreference<String[]> pref = OM.PREFS.getArray(prefName);
- if (pref == null)
+ if (withHistory)
{
- pref = OM.PREFS.initArray(prefName);
- }
+ String prefName = "PREF_HISTORY_BRANCHES-" + session.getRepositoryInfo().getUUID(); //$NON-NLS-1$
+ OMPreference<String[]> pref = OM.PREFS.getArray(prefName);
+ if (pref == null)
+ {
+ pref = OM.PREFS.initArray(prefName);
+ }
- branchHistory = new PreferenceHistory(pref);
+ IHistory<String> branchHistory = new PreferenceHistory(pref);
- branchText = new HistoryText(this, SWT.BORDER | SWT.SINGLE, branchHistory);
- branchText.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
- branchText.getCombo().addModifyListener(new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
+ branchText = new HistoryText(this, SWT.BORDER | SWT.SINGLE, branchHistory);
+ branchText.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+ branchText.getCombo().addModifyListener(new ModifyListener()
{
- setBranchFromPath();
- }
- });
+ public void modifyText(ModifyEvent e)
+ {
+ setBranchFromPath();
+ }
+ });
+ }
CDOItemProvider itemProvider = new CDOItemProvider(null);
branchViewer = new TreeViewer(this, SWT.BORDER | SWT.SINGLE);
@@ -103,10 +112,20 @@ public class SelectBranchComposite extends Composite implements ValidationPartic
}
});
- branchText.setFocus();
setBranchFromPath();
}
+ @Override
+ public boolean setFocus()
+ {
+ if (branchText != null)
+ {
+ return branchText.setFocus();
+ }
+
+ return branchViewer.getTree().setFocus();
+ }
+
public ValidationContext getValidationContext()
{
return validationContext;
@@ -139,23 +158,32 @@ public class SelectBranchComposite extends Composite implements ValidationPartic
public void rememberSettings()
{
- branchText.getHistory().add(branch.getPathName());
+ if (branchText != null)
+ {
+ branchText.getHistory().add(branch.getPathName());
+ }
}
@Override
public void addListener(int eventType, Listener listener)
{
super.addListener(eventType, listener);
- branchText.addListener(eventType, listener);
branchViewer.getTree().addListener(eventType, listener);
+ if (branchText != null)
+ {
+ branchText.addListener(eventType, listener);
+ }
}
@Override
public void removeListener(int eventType, Listener listener)
{
super.removeListener(eventType, listener);
- branchText.removeListener(eventType, listener);
branchViewer.getTree().removeListener(eventType, listener);
+ if (branchText != null)
+ {
+ branchText.removeListener(eventType, listener);
+ }
}
protected void branchChanged(CDOBranch newBranch)
@@ -164,25 +192,28 @@ public class SelectBranchComposite extends Composite implements ValidationPartic
private void setBranchFromPath()
{
- String branchPath = branchText.getText();
- CDOBranch newBranch = session.getBranchManager().getBranch(branchPath);
- if (newBranch != branch)
+ if (branchText != null)
{
- branch = newBranch;
- if (newBranch != null)
- {
- branchViewer.reveal(branch);
- branchViewer.setSelection(new StructuredSelection(branch));
- }
- else
+ String branchPath = branchText.getText();
+ CDOBranch newBranch = session.getBranchManager().getBranch(branchPath);
+ if (newBranch != branch)
{
- branchViewer.setSelection(StructuredSelection.EMPTY);
+ branch = newBranch;
+ if (newBranch != null)
+ {
+ branchViewer.reveal(branch);
+ branchViewer.setSelection(new StructuredSelection(branch));
+ }
+ else
+ {
+ branchViewer.setSelection(StructuredSelection.EMPTY);
+ }
+
+ branchChanged(newBranch);
}
- branchChanged(newBranch);
+ validate();
}
-
- validate();
}
private void setBranchFromViewer()
@@ -192,7 +223,11 @@ public class SelectBranchComposite extends Composite implements ValidationPartic
if (newBranch != branch)
{
branch = newBranch;
- branchText.setText(branch.getPathName());
+ if (branchText != null)
+ {
+ branchText.setText(branch.getPathName());
+ }
+
branchChanged(newBranch);
}
@@ -203,7 +238,10 @@ public class SelectBranchComposite extends Composite implements ValidationPartic
{
if (validationContext != null)
{
- validationContext.setValidationError(branchText.getCombo(), branch != null ? null : "Branch does not exist.");
+ if (branchText != null)
+ {
+ validationContext.setValidationError(branchText.getCombo(), branch != null ? null : "Branch does not exist.");
+ }
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
index 1b76ee9e3e..470efe8b00 100644
--- a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
@@ -8,8 +8,7 @@ Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.emf.internal.cdo.bundle.Activator$Implementation
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
+Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.common;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDORepositoryInfo.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDORepositoryInfo.java
index 2e4c1ea773..7075e9737c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDORepositoryInfo.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDORepositoryInfo.java
@@ -14,7 +14,7 @@ import org.eclipse.emf.cdo.common.CDOCommonRepository;
/**
* Describes a model repository a {@link CDOSession session} is connected to.
- *
+ *
* @author Eike Stepper
* @since 3.0
* @noextend This interface is not intended to be extended by clients.
@@ -23,8 +23,15 @@ import org.eclipse.emf.cdo.common.CDOCommonRepository;
public interface CDORepositoryInfo extends CDOCommonRepository
{
/**
+ * Returns the session.
+ *
+ * @since 4.2
+ */
+ public CDOSession getSession();
+
+ /**
* Returns the approximate current time of this repository by optionally refreshing the approximation from the server.
- *
+ *
* @see CDOCommonRepository#getTimeStamp()
*/
public long getTimeStamp(boolean forceRefresh);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
index b3994f8daf..3e49faed29 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
@@ -47,6 +47,7 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.URIHandler;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
import java.io.File;
import java.io.FileInputStream;
@@ -833,6 +834,20 @@ public class CDOPushTransaction extends Notifier implements CDOTransaction
return delegate.getCommittables();
}
+ /**
+ * @since 4.2
+ */
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate.toString();
+ }
+
public static File createTempFile(CDOTransaction transaction) throws IOException
{
String prefix = "cdo_tx_" + transaction.getSession().getSessionID() + "_" + transaction.getViewID() + "__";
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionContainer.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionContainer.java
index acddbf82f8..f72d66e44c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionContainer.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionContainer.java
@@ -15,14 +15,13 @@ package org.eclipse.emf.cdo.transaction;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
-import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.cdo.view.CDOViewContainer;
import org.eclipse.emf.ecore.resource.ResourceSet;
/**
* Can open new {@link CDOTransaction transactions} and provide access to openend transactions.
- *
+ *
* @author Eike Stepper
* @since 4.1
* @noextend This interface is not intended to be extended by clients.
@@ -33,21 +32,28 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
public interface CDOTransactionContainer extends CDOViewContainer
{
/**
- * Returns an array of all open {@link CDOView views} and {@link CDOTransaction transactions} of this session.
- *
+ * Returns an array of all open {@link CDOTransaction transactions} of this session.
+ *
* @see #openView()
* @see #openTransaction()
*/
public CDOTransaction[] getTransactions();
/**
+ * Returns an array of all {@link CDOTransaction transactions} of this session that are open on the given branch.
+ *
+ * @since 4.2
+ */
+ public CDOTransaction[] getTransactions(CDOBranch branch);
+
+ /**
* @since 4.1
*/
public CDOTransaction getTransaction(int viewID);
/**
* Opens and returns a new {@link CDOTransaction transaction} on the given EMF {@link ResourceSet resource set}.
- *
+ *
* @see #openTransaction()
* @since 4.1
*/
@@ -55,7 +61,7 @@ public interface CDOTransactionContainer extends CDOViewContainer
/**
* Opens and returns a new {@link CDOTransaction transaction} on a new EMF {@link ResourceSet resource set}.
- *
+ *
* @see #openTransaction()
* @since 4.0
*/
@@ -63,7 +69,7 @@ public interface CDOTransactionContainer extends CDOViewContainer
/**
* Opens and returns a new {@link CDOTransaction transaction} on the given EMF {@link ResourceSet resource set}.
- *
+ *
* @see #openTransaction()
* @since 3.0
*/
@@ -71,7 +77,7 @@ public interface CDOTransactionContainer extends CDOViewContainer
/**
* Opens and returns a new {@link CDOTransaction transaction} on the given EMF {@link ResourceSet resource set}.
- *
+ *
* @see #openTransaction()
* @since 3.0
*/
@@ -81,7 +87,7 @@ public interface CDOTransactionContainer extends CDOViewContainer
* Opens and returns a new {@link CDOTransaction transaction} on a new EMF {@link ResourceSet resource set}.
* <p>
* Same as calling <code>openTransaction(new ResourceSetImpl())</code>.
- *
+ *
* @see #openTransaction(ResourceSet)
* @since 3.0
*/
@@ -91,7 +97,7 @@ public interface CDOTransactionContainer extends CDOViewContainer
* Opens and returns a new {@link CDOTransaction transaction} on a new EMF {@link ResourceSet resource set}.
* <p>
* Same as calling <code>openTransaction(new ResourceSetImpl())</code>.
- *
+ *
* @see #openTransaction(ResourceSet)
*/
public CDOTransaction openTransaction();
@@ -102,7 +108,7 @@ public interface CDOTransactionContainer extends CDOViewContainer
* CDOTransaction.enableDurableLocking(true)}.
* <p>
* Same as calling <code>openTransaction(durableLockingID, new ResourceSetImpl())</code>.
- *
+ *
* @see #openTransaction(String,ResourceSet)
* @since 4.0
*/
@@ -112,7 +118,7 @@ public interface CDOTransactionContainer extends CDOViewContainer
* Opens and returns a {@link CDOTransaction transaction} on the given EMF {@link ResourceSet resource set} by
* resuming a transaction that has previously been made durable by calling
* {@link CDOTransaction#enableDurableLocking(boolean) CDOTransaction.enableDurableLocking(true)}.
- *
+ *
* @see #openTransaction(String)
* @since 4.0
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
index 8319c1b802..b3936c5cb6 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
@@ -13,6 +13,7 @@
package org.eclipse.emf.cdo.util;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.CDOCommonRepository;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.revision.CDORevision;
@@ -20,8 +21,10 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.eresource.CDOResourceFactory;
import org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl;
import org.eclipse.emf.cdo.session.CDOCollectionLoadingPolicy;
+import org.eclipse.emf.cdo.session.CDORepositoryInfo;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.session.remote.CDORemoteSessionManager;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.transaction.CDOXATransaction;
import org.eclipse.emf.cdo.view.CDOFeatureAnalyzer;
@@ -171,6 +174,18 @@ public final class CDOUtil
return cdoObject.cdoView().getSession();
}
+ CDOBranch branch = AdapterUtil.adapt(object, CDOBranch.class);
+ if (branch != null)
+ {
+ InternalCDOBranchManager branchManager = (InternalCDOBranchManager)branch.getBranchManager();
+ CDOCommonRepository repository = branchManager.getRepository();
+ if (repository instanceof CDORepositoryInfo)
+ {
+ CDORepositoryInfo repositoryInfo = (CDORepositoryInfo)repository;
+ return repositoryInfo.getSession();
+ }
+ }
+
CDORemoteSessionManager remoteSessionManager = AdapterUtil.adapt(object, CDORemoteSessionManager.class);
if (remoteSessionManager != null)
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewContainer.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewContainer.java
index 3742db315d..6c5d7c576b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewContainer.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewContainer.java
@@ -23,7 +23,7 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
/**
* Can open new {@link CDOView views} and provide access to openend views.
- *
+ *
* @author Eike Stepper
* @since 4.1
* @noextend This interface is not intended to be extended by clients.
@@ -35,19 +35,26 @@ public interface CDOViewContainer extends IContainer<CDOView>
{
/**
* Returns an array of all open {@link CDOView views} and {@link CDOTransaction transactions} of this session.
- *
+ *
* @see #openView()
*/
public CDOView[] getViews();
/**
+ * Returns an array of all {@link CDOView views} and {@link CDOTransaction transactions} of this session that are open on the given branch.
+ *
+ * @since 4.2
+ */
+ public CDOView[] getViews(CDOBranch branch);
+
+ /**
* @since 4.0
*/
public CDOView getView(int viewID);
/**
* Opens and returns a new {@link CDOView view} on the given EMF {@link ResourceSet resource set}.
- *
+ *
* @see #openView()
* @since 4.0
*/
@@ -55,7 +62,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
/**
* Opens and returns a new {@link CDOView view} on a new EMF {@link ResourceSet resource set}.
- *
+ *
* @see #openView()
* @since 4.0
*/
@@ -63,7 +70,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
/**
* Opens and returns a new {@link CDOView view} on the given EMF {@link ResourceSet resource set}.
- *
+ *
* @see #openView()
* @since 3.0
*/
@@ -73,7 +80,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
* Opens and returns a new {@link CDOView view} on a new EMF {@link ResourceSet resource set}.
* <p>
* Same as calling <code>openView(new ResourceSetImpl())</code>.
- *
+ *
* @see #openView(CDOBranch, long, ResourceSet)
* @since 3.0
*/
@@ -83,7 +90,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
* Opens and returns a new {@link CDOView view} on a new EMF {@link ResourceSet resource set}.
* <p>
* Same as calling <code>openView(new ResourceSetImpl())</code>.
- *
+ *
* @see #openView(CDOBranch, long, ResourceSet)
* @since 3.0
*/
@@ -93,7 +100,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
* Opens and returns a new {@link CDOView view} on a new EMF {@link ResourceSet resource set}.
* <p>
* Same as calling <code>openView(new ResourceSetImpl())</code>.
- *
+ *
* @see #openView(CDOBranch, long, ResourceSet)
* @since 3.0
*/
@@ -101,7 +108,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
/**
* Opens and returns a new {@link CDOView view} on the given EMF {@link ResourceSet resource set}.
- *
+ *
* @see #openView(CDOBranch, long, ResourceSet)
* @since 4.0
*/
@@ -111,7 +118,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
* Opens and returns a new {@link CDOView view} on a new EMF {@link ResourceSet resource set}.
* <p>
* Same as calling <code>openView(new ResourceSetImpl())</code>.
- *
+ *
* @see #openView(CDOBranch, long, ResourceSet)
*/
public CDOView openView();
@@ -122,7 +129,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
* CDOView.enableDurableLocking(true)}.
* <p>
* Same as calling <code>openView(durableLockingID, new ResourceSetImpl())</code>.
- *
+ *
* @see #openView(String,ResourceSet)
* @since 4.0
*/
@@ -132,7 +139,7 @@ public interface CDOViewContainer extends IContainer<CDOView>
* Opens and returns a {@link CDOView view} on the given EMF {@link ResourceSet resource set} by resuming a view that
* has previously been made durable by calling {@link CDOView#enableDurableLocking(boolean)
* CDOView.enableDurableLocking(true)}.
- *
+ *
* @see #openView(String)
* @since 4.0
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewTargetChangedEvent.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewTargetChangedEvent.java
index 7450072703..7adfd091e9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewTargetChangedEvent.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewTargetChangedEvent.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
/**
* A {@link CDOViewEvent view event} fired when the branch point of a {@link CDOView view} has changed.
- *
+ *
* @author Victor Roldan Betancort
* @since 3.0
* @noextend This interface is not intended to be extended by clients.
@@ -23,5 +23,10 @@ import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
*/
public interface CDOViewTargetChangedEvent extends CDOViewEvent
{
+ /**
+ * @since 4.2
+ */
+ public CDOBranchPoint getOldBranchPoint();
+
public CDOBranchPoint getBranchPoint();
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
index ee24d8934f..6a0ed8cf4b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
@@ -122,6 +122,8 @@ import org.eclipse.emf.spi.cdo.InternalCDOSession;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
import org.eclipse.emf.spi.cdo.InternalCDOView;
+import org.eclipse.core.runtime.Platform;
+
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -1196,6 +1198,11 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl impleme
fireEvent(new InvalidationEvent(sender, commitInfo));
}
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
@Override
public String toString()
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOTransactionContainerImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOTransactionContainerImpl.java
index 65a39a1800..18d4f79ed3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOTransactionContainerImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOTransactionContainerImpl.java
@@ -27,7 +27,6 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
import org.eclipse.emf.spi.cdo.InternalCDOView;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -52,18 +51,13 @@ public abstract class CDOTransactionContainerImpl extends CDOViewContainerImpl i
public InternalCDOTransaction[] getTransactions()
{
- checkActive();
- List<InternalCDOTransaction> result = new ArrayList<InternalCDOTransaction>();
-
- for (InternalCDOView view : getViews())
- {
- if (view instanceof InternalCDOTransaction)
- {
- result.add((InternalCDOTransaction)view);
- }
- }
+ return getTransactions(null);
+ }
- return result.toArray(new InternalCDOTransaction[result.size()]);
+ public InternalCDOTransaction[] getTransactions(CDOBranch branch)
+ {
+ List<InternalCDOView> transactions = getViews(branch, true);
+ return transactions.toArray(new InternalCDOTransaction[transactions.size()]);
}
public CDOTransaction openTransaction(CDOBranchPoint target, ResourceSet resourceSet)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOViewContainerImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOViewContainerImpl.java
index 5fccdb3748..f5a3ef03b9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOViewContainerImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOViewContainerImpl.java
@@ -32,7 +32,9 @@ import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.spi.cdo.InternalCDOView;
import org.eclipse.emf.spi.cdo.InternalCDOViewSet;
+import java.util.ArrayList;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
/**
@@ -68,10 +70,37 @@ public abstract class CDOViewContainerImpl extends Container<CDOView> implements
*/
public InternalCDOView[] getViews()
{
+ return getViews(null);
+ }
+
+ public InternalCDOView[] getViews(CDOBranch branch)
+ {
+ List<InternalCDOView> views = getViews(branch, false);
+ return views.toArray(new InternalCDOView[views.size()]);
+ }
+
+ protected List<InternalCDOView> getViews(CDOBranch branch, boolean writeable)
+ {
checkActive();
synchronized (views)
{
- return views.toArray(new InternalCDOView[views.size()]);
+ List<InternalCDOView> result = new ArrayList<InternalCDOView>();
+ for (InternalCDOView view : views)
+ {
+ if (branch != null && branch != view.getBranch())
+ {
+ continue;
+ }
+
+ if (writeable && view.isReadOnly())
+ {
+ continue;
+ }
+
+ result.add(view);
+ }
+
+ return result;
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
index cffc64997c..f71fe1f507 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
@@ -23,6 +23,8 @@ import org.eclipse.net4j.util.properties.IProperties;
import org.eclipse.net4j.util.properties.Properties;
import org.eclipse.net4j.util.properties.Property;
+import org.eclipse.core.runtime.Platform;
+
import java.util.Set;
/**
@@ -261,6 +263,11 @@ public class SessionProperties extends Properties<CDOSession> implements CDOComm
});
}
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
public long getTimeStamp()
{
throw new UnsupportedOperationException();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index 6cc8623715..5cf60e458a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -2883,6 +2883,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
return;
}
+ CDOBranch oldBranch = getBranch();
CDOBranch branch = result.getBranch();
boolean branchChanged = !ObjectUtil.equals(branch, getBranch());
if (branchChanged)
@@ -2957,7 +2958,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
{
if (branchChanged)
{
- fireViewTargetChangedEvent(listeners);
+ fireViewTargetChangedEvent(oldBranch.getHead(), listeners);
}
fireEvent(new FinishedEvent(CDOTransactionFinishedEvent.Type.COMMITTED, idMappings), listeners);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
index 0e906796b8..2d94d780a2 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
@@ -91,6 +91,8 @@ import org.eclipse.emf.spi.cdo.InternalCDOObject;
import org.eclipse.emf.spi.cdo.InternalCDOView;
import org.eclipse.emf.spi.cdo.InternalCDOViewSet;
+import org.eclipse.core.runtime.Platform;
+
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
@@ -281,9 +283,9 @@ public abstract class AbstractCDOView extends Lifecycle implements InternalCDOVi
return branchPoint.getTimeStamp();
}
- protected void fireViewTargetChangedEvent(IListener[] listeners)
+ protected void fireViewTargetChangedEvent(CDOBranchPoint oldBranchPoint, IListener[] listeners)
{
- fireEvent(new ViewTargetChangedEvent(branchPoint), listeners);
+ fireEvent(new ViewTargetChangedEvent(oldBranchPoint, branchPoint), listeners);
}
public boolean isDirty()
@@ -1442,6 +1444,11 @@ public abstract class AbstractCDOView extends Lifecycle implements InternalCDOVi
return !isActive();
}
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
@Override
public String toString()
{
@@ -1667,10 +1674,13 @@ public abstract class AbstractCDOView extends Lifecycle implements InternalCDOVi
{
private static final long serialVersionUID = 1L;
- private CDOBranchPoint branchPoint;
+ private final CDOBranchPoint oldBranchPoint;
- public ViewTargetChangedEvent(CDOBranchPoint branchPoint)
+ private final CDOBranchPoint branchPoint;
+
+ public ViewTargetChangedEvent(CDOBranchPoint oldBranchPoint, CDOBranchPoint branchPoint)
{
+ this.oldBranchPoint = CDOBranchUtil.copyBranchPoint(oldBranchPoint);
this.branchPoint = CDOBranchUtil.copyBranchPoint(branchPoint);
}
@@ -1680,6 +1690,11 @@ public abstract class AbstractCDOView extends Lifecycle implements InternalCDOVi
return MessageFormat.format("CDOViewTargetChangedEvent: {0}", branchPoint); //$NON-NLS-1$
}
+ public CDOBranchPoint getOldBranchPoint()
+ {
+ return oldBranchPoint;
+ }
+
public CDOBranchPoint getBranchPoint()
{
return branchPoint;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
index 61c4701b8f..d9791ec8dc 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
@@ -31,6 +31,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionManager;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
import org.eclipse.emf.cdo.common.util.CDOException;
+import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
import org.eclipse.emf.cdo.spi.common.lock.InternalCDOLockState;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager;
@@ -208,7 +209,8 @@ public class CDOViewImpl extends AbstractCDOView
"timeStamp ({0}) < repository creation time ({1})", CDOCommonUtil.formatTimeStamp(timeStamp), CDOCommonUtil.formatTimeStamp(creationTimeStamp))); //$NON-NLS-1$
}
- if (branchPoint.equals(getBranchPoint()))
+ CDOBranchPoint oldBranchPoint = CDOBranchUtil.copyBranchPoint(getBranchPoint());
+ if (branchPoint.equals(oldBranchPoint))
{
return false;
}
@@ -243,7 +245,7 @@ public class CDOViewImpl extends AbstractCDOView
IListener[] listeners = getListeners();
if (listeners != null)
{
- fireViewTargetChangedEvent(listeners);
+ fireViewTargetChangedEvent(oldBranchPoint, listeners);
}
return true;
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/ManagedLabelProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/ManagedLabelProvider.java
new file mode 100644
index 0000000000..2c4d68292d
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/ManagedLabelProvider.java
@@ -0,0 +1,63 @@
+/*
+ * 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.net4j.util.ui;
+
+import org.eclipse.jface.resource.DeviceResourceDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jface.viewers.LabelProvider;
+
+/**
+ * @author Eike Stepper
+ * @since 3.3
+ */
+public class ManagedLabelProvider extends LabelProvider
+{
+ private ResourceManager resourceManager;
+
+ public ManagedLabelProvider()
+ {
+ }
+
+ @Override
+ public void dispose()
+ {
+ if (resourceManager != null)
+ {
+ resourceManager.dispose();
+ resourceManager = null;
+ }
+
+ super.dispose();
+ }
+
+ protected Object getResource(DeviceResourceDescriptor descriptor)
+ {
+ ResourceManager resourceManager = getResourceManager();
+ return resourceManager.get(descriptor);
+ }
+
+ protected final ResourceManager getResourceManager()
+ {
+ if (resourceManager == null)
+ {
+ resourceManager = createResourceManager();
+ }
+
+ return resourceManager;
+ }
+
+ protected LocalResourceManager createResourceManager()
+ {
+ return new LocalResourceManager(JFaceResources.getResources());
+ }
+}
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/TableLabelProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/TableLabelProvider.java
new file mode 100644
index 0000000000..14f9da9174
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/TableLabelProvider.java
@@ -0,0 +1,300 @@
+/*
+ * 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.net4j.util.ui;
+
+import org.eclipse.net4j.util.StringUtil;
+
+import org.eclipse.jface.viewers.ITableColorProvider;
+import org.eclipse.jface.viewers.ITableFontProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Eike Stepper
+ * @since 3.3
+ */
+public class TableLabelProvider<T> extends ManagedLabelProvider implements ITableLabelProvider, ITableColorProvider,
+ ITableFontProvider
+{
+ private final List<Column<T>> columns = new ArrayList<Column<T>>();
+
+ private boolean headerVisible = true;
+
+ private boolean linesVisible;
+
+ public TableLabelProvider()
+ {
+ }
+
+ public TableLabelProvider<T> addColumn(Column<T> column)
+ {
+ columns.add(column);
+ return this;
+ }
+
+ public boolean isHeaderVisible()
+ {
+ return headerVisible;
+ }
+
+ public TableLabelProvider<T> setHeaderVisible(boolean headerVisible)
+ {
+ this.headerVisible = headerVisible;
+ return this;
+ }
+
+ public boolean isLinesVisible()
+ {
+ return linesVisible;
+ }
+
+ public TableLabelProvider<T> setLinesVisible(boolean linesVisible)
+ {
+ this.linesVisible = linesVisible;
+ return this;
+ }
+
+ public Column<T> removeColumn(int columnIndex)
+ {
+ return columns.remove(columnIndex);
+ }
+
+ public Column<T> getColumn(int columnIndex)
+ {
+ return columns.get(columnIndex);
+ }
+
+ public String getColumnText(Object element, int columnIndex)
+ {
+ @SuppressWarnings("unchecked")
+ T t = (T)element;
+ String text = getColumn(columnIndex).getText(t);
+ if (text == null)
+ {
+ return StringUtil.EMPTY;
+ }
+
+ return text;
+ }
+
+ public Image getColumnImage(Object element, int columnIndex)
+ {
+ @SuppressWarnings("unchecked")
+ T t = (T)element;
+ return getColumn(columnIndex).getImage(t);
+ }
+
+ public Color getForeground(Object element, int columnIndex)
+ {
+ @SuppressWarnings("unchecked")
+ T t = (T)element;
+ return getColumn(columnIndex).getForeground(t);
+ }
+
+ public Color getBackground(Object element, int columnIndex)
+ {
+ @SuppressWarnings("unchecked")
+ T t = (T)element;
+ return getColumn(columnIndex).getBackground(t);
+ }
+
+ public Font getFont(Object element, int columnIndex)
+ {
+ @SuppressWarnings("unchecked")
+ T t = (T)element;
+ return getColumn(columnIndex).getFont(t);
+ }
+
+ public TableLabelProvider<T> support(TableViewer tableViewer)
+ {
+ for (Column<T> column : columns)
+ {
+ TableViewerColumn tableViewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
+
+ TableColumn tableColumn = tableViewerColumn.getColumn();
+ tableColumn.setText(column.getHeader());
+ tableColumn.setToolTipText(column.getToolTipText());
+ tableColumn.setWidth(column.getWidth());
+ tableColumn.setAlignment(column.getAlignment());
+ tableColumn.setImage(column.getImage());
+ tableColumn.setMoveable(column.isMoveable());
+ tableColumn.setResizable(column.isResizable());
+ }
+
+ Table table = tableViewer.getTable();
+ table.setHeaderVisible(headerVisible);
+ table.setLinesVisible(linesVisible);
+
+ tableViewer.setLabelProvider(this);
+ return this;
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Column<T>
+ {
+ public static final int DEFAULT_WIDTH = 100;
+
+ private String header = StringUtil.EMPTY;
+
+ private String toolTipText = StringUtil.EMPTY;
+
+ private int width = DEFAULT_WIDTH;
+
+ private int alignment = SWT.LEFT;
+
+ private Image image;
+
+ private boolean moveable;
+
+ private boolean resizable = true;
+
+ public Column()
+ {
+ }
+
+ public Column(String header)
+ {
+ this.header = header;
+ }
+
+ public Column(String header, int width)
+ {
+ this.header = header;
+ this.width = width;
+ }
+
+ public Column(String header, int width, int alignment)
+ {
+ this.header = header;
+ this.width = width;
+ this.alignment = alignment;
+ }
+
+ public String getHeader()
+ {
+ return header;
+ }
+
+ public Column<T> setHeader(String header)
+ {
+ this.header = header;
+ return this;
+ }
+
+ public String getToolTipText()
+ {
+ return toolTipText;
+ }
+
+ public Column<T> setToolTipText(String toolTipText)
+ {
+ this.toolTipText = toolTipText;
+ return this;
+ }
+
+ public int getWidth()
+ {
+ return width;
+ }
+
+ public Column<T> setWidth(int width)
+ {
+ this.width = width;
+ return this;
+ }
+
+ public int getAlignment()
+ {
+ return alignment;
+ }
+
+ public Column<T> setAlignment(int alignment)
+ {
+ this.alignment = alignment;
+ return this;
+ }
+
+ public Image getImage()
+ {
+ return image;
+ }
+
+ public Column<T> setImage(Image image)
+ {
+ this.image = image;
+ return this;
+ }
+
+ public boolean isMoveable()
+ {
+ return moveable;
+ }
+
+ public Column<T> setMoveable(boolean moveable)
+ {
+ this.moveable = moveable;
+ return this;
+ }
+
+ public boolean isResizable()
+ {
+ return resizable;
+ }
+
+ public Column<T> setResizable(boolean resizable)
+ {
+ this.resizable = resizable;
+ return this;
+ }
+
+ public String getText(T element)
+ {
+ if (element == null)
+ {
+ return StringUtil.EMPTY;
+ }
+
+ return element.toString();
+ }
+
+ public Image getImage(T element)
+ {
+ return null;
+ }
+
+ public Color getForeground(T element)
+ {
+ return null;
+ }
+
+ public Color getBackground(T element)
+ {
+ return null;
+ }
+
+ public Font getFont(T element)
+ {
+ return null;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractFilteredIterator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractFilteredIterator.java
new file mode 100644
index 0000000000..5b99bee3a8
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractFilteredIterator.java
@@ -0,0 +1,46 @@
+/*
+ * 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.net4j.util.collection;
+
+import java.util.Iterator;
+
+/**
+ * An abstract base class for custom iterators that {@link #isValid(Object) filter} the elements of a delegate iterator.
+ *
+ * @author Eike Stepper
+ * @since 3.3
+ */
+public abstract class AbstractFilteredIterator<T> extends AbstractIterator<T>
+{
+ private Iterator<T> delegate;
+
+ public AbstractFilteredIterator(Iterator<T> delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ @Override
+ protected Object computeNextElement()
+ {
+ while (delegate.hasNext())
+ {
+ T element = delegate.next();
+ if (isValid(element))
+ {
+ return element;
+ }
+ }
+
+ return END_OF_DATA;
+ }
+
+ protected abstract boolean isValid(T element);
+}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractIterator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractIterator.java
index a503071784..a4bea4ee9e 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractIterator.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractIterator.java
@@ -14,9 +14,8 @@ import java.util.Iterator;
import java.util.NoSuchElementException;
/**
- * An abstract base class for custom iterators that only requires to implement a single {@link #computeNextElement()}
- * method.
- *
+ * An abstract base class for custom iterators that only requires to implement a single {@link #computeNextElement()} method.
+ *
* @author Eike Stepper
* @since 3.2
*/
@@ -27,7 +26,7 @@ public abstract class AbstractIterator<T> implements Iterator<T>
*/
protected static final Object END_OF_DATA = new Object();
- private boolean computed;
+ private boolean nextComputed;
private T next;
@@ -37,13 +36,13 @@ public abstract class AbstractIterator<T> implements Iterator<T>
public final boolean hasNext()
{
- if (computed)
+ if (nextComputed)
{
return true;
}
Object object = computeNextElement();
- computed = true;
+ nextComputed = true;
if (object == END_OF_DATA)
{
@@ -63,7 +62,7 @@ public abstract class AbstractIterator<T> implements Iterator<T>
throw new NoSuchElementException();
}
- computed = false;
+ nextComputed = false;
return next;
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractListIterator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractListIterator.java
new file mode 100644
index 0000000000..7e031fdc2d
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/AbstractListIterator.java
@@ -0,0 +1,67 @@
+/*
+ * 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.net4j.util.collection;
+
+import java.util.NoSuchElementException;
+
+/**
+ * An abstract base class for custom list iterators that only requires to implement the {@link #computeNextElement()} and {@link #computePreviousElement()} methods.
+ *
+ * @author Eike Stepper
+ * @since 3.3
+ */
+public abstract class AbstractListIterator<T> extends AbstractIterator<T>
+{
+ private boolean previousComputed;
+
+ private T previous;
+
+ public AbstractListIterator()
+ {
+ }
+
+ public final boolean hasPrevious()
+ {
+ if (previousComputed)
+ {
+ return true;
+ }
+
+ Object object = computeNextElement();
+ previousComputed = true;
+
+ if (object == END_OF_DATA)
+ {
+ return false;
+ }
+
+ @SuppressWarnings("unchecked")
+ T cast = (T)object;
+ previous = cast;
+ return true;
+ }
+
+ public final T previous()
+ {
+ if (!hasPrevious())
+ {
+ throw new NoSuchElementException();
+ }
+
+ previousComputed = false;
+ return previous;
+ }
+
+ /**
+ * Returns the previous iteration element, or {@link #END_OF_DATA} if the start of the iteration has been reached.
+ */
+ protected abstract Object computePreviousElement();
+}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/BidirectionalIterator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/BidirectionalIterator.java
new file mode 100644
index 0000000000..713ab8a58e
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/BidirectionalIterator.java
@@ -0,0 +1,66 @@
+/*
+ * 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.net4j.util.collection;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+
+/**
+ * @author Eike Stepper
+ * @since 3.3
+ */
+public class BidirectionalIterator<T> implements Iterator<T>
+{
+ private final ListIterator<T> delegate;
+
+ private boolean backward;
+
+ public BidirectionalIterator(ListIterator<T> delegate, boolean backward)
+ {
+ this.delegate = delegate;
+ this.backward = backward;
+ }
+
+ public BidirectionalIterator(ListIterator<T> delegate)
+ {
+ this(delegate, false);
+ }
+
+ public ListIterator<T> getDelegate()
+ {
+ return delegate;
+ }
+
+ public boolean isBackward()
+ {
+ return backward;
+ }
+
+ public void setBackward(boolean backward)
+ {
+ this.backward = backward;
+ }
+
+ public boolean hasNext()
+ {
+ return backward ? delegate.hasPrevious() : delegate.hasNext();
+ }
+
+ public T next()
+ {
+ return backward ? delegate.previous() : delegate.next();
+ }
+
+ public void remove()
+ {
+ delegate.remove();
+ }
+}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/LimitedIterator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/LimitedIterator.java
new file mode 100644
index 0000000000..44f72628e9
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/LimitedIterator.java
@@ -0,0 +1,46 @@
+/*
+ * 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.net4j.util.collection;
+
+import java.util.Iterator;
+
+/**
+ * @author Eike Stepper
+ * @since 3.3
+ */
+public class LimitedIterator<T> extends AbstractFilteredIterator<T>
+{
+ private final int limit;
+
+ private int count;
+
+ public LimitedIterator(Iterator<T> delegate, int limit)
+ {
+ super(delegate);
+ this.limit = limit;
+ }
+
+ public final int getLimit()
+ {
+ return limit;
+ }
+
+ public final int getCount()
+ {
+ return count;
+ }
+
+ @Override
+ protected boolean isValid(T element)
+ {
+ return ++count <= limit;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java
new file mode 100644
index 0000000000..bd6d4de9e2
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java
@@ -0,0 +1,20 @@
+/*
+ * 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.net4j.util.collection;
+
+/**
+ * @author Eike Stepper
+ * @since 3.3
+ */
+public interface Predicate<T>
+{
+ public boolean apply(T element);
+}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/PredicateIterator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/PredicateIterator.java
new file mode 100644
index 0000000000..2a4b1a90d7
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/PredicateIterator.java
@@ -0,0 +1,39 @@
+/*
+ * 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.net4j.util.collection;
+
+import java.util.Iterator;
+
+/**
+ * @author Eike Stepper
+ * @since 3.3
+ */
+public class PredicateIterator<T> extends AbstractFilteredIterator<T>
+{
+ private final Predicate<? super T> predicate;
+
+ public PredicateIterator(Iterator<T> delegate, Predicate<? super T> predicate)
+ {
+ super(delegate);
+ this.predicate = predicate;
+ }
+
+ public Predicate<? super T> getPredicate()
+ {
+ return predicate;
+ }
+
+ @Override
+ protected boolean isValid(T element)
+ {
+ return predicate.apply(element);
+ }
+}

Back to the top