diff --git a/features/org.eclipse.emf.cdo-feature/feature.xml b/features/org.eclipse.emf.cdo-feature/feature.xml
index b7249691a3c..087157e438e 100644
--- a/features/org.eclipse.emf.cdo-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo-feature/feature.xml
@@ -13,7 +13,7 @@
diff --git a/features/org.eclipse.emf.cdo-feature/pom.xml b/features/org.eclipse.emf.cdo-feature/pom.xml
index 57c87afe1d8..ea58410e0d6 100644
--- a/features/org.eclipse.emf.cdo-feature/pom.xml
+++ b/features/org.eclipse.emf.cdo-feature/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo.features
org.eclipse.emf.cdo
- 4.25.1-SNAPSHOT
+ 4.26.0-SNAPSHOT
eclipse-feature
diff --git a/features/org.eclipse.emf.cdo.all-feature/feature.xml b/features/org.eclipse.emf.cdo.all-feature/feature.xml
index e661f545b71..cf02ee8b74a 100644
--- a/features/org.eclipse.emf.cdo.all-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.all-feature/feature.xml
@@ -40,7 +40,7 @@
version="0.0.0"/>
+
+ org.eclipse.emf.cdo.lm.reviews-feature
+
+
+
+
+
+ org.eclipse.pde.FeatureBuilder
+
+
+
+
+ org.eclipse.oomph.version.VersionBuilder
+
+
+ check.maven.pom
+ true
+
+
+ release.path
+ /org.eclipse.emf.cdo.releng/versions/release.xml
+
+
+
+
+
+ org.eclipse.pde.FeatureNature
+ org.eclipse.oomph.version.VersionNature
+
+
+
+ 1396938000000
+
+ 10
+
+ org.eclipse.ui.ide.multiFilter
+ 1.0-projectRelativePath-matches-true-false-target
+
+
+
+
diff --git a/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..99f26c0203a
--- /dev/null
+++ b/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.ltk.core.refactoring.prefs b/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 00000000000..9b58a308595
--- /dev/null
+++ b/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Mon Jul 04 12:36:04 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 00000000000..d5736345023
--- /dev/null
+++ b/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 10:06:10 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.mylyn.team.ui.prefs b/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 00000000000..3556bac0764
--- /dev/null
+++ b/features/org.eclipse.emf.cdo.lm.reviews-feature/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 10:06:10 CET 2010
+commit.comment.template=[${task.id}] ${task.description}\r\n\r\n${task.url}
+eclipse.preferences.version=1
diff --git a/features/org.eclipse.emf.cdo.lm.reviews-feature/build.properties b/features/org.eclipse.emf.cdo.lm.reviews-feature/build.properties
new file mode 100644
index 00000000000..42d1d3cbdb6
--- /dev/null
+++ b/features/org.eclipse.emf.cdo.lm.reviews-feature/build.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2022 Eike Stepper (Loehne, 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
+
+bin.includes = feature.xml,\
+ feature.properties
+src.includes = pom.xml
diff --git a/features/org.eclipse.emf.cdo.lm.reviews-feature/feature.properties b/features/org.eclipse.emf.cdo.lm.reviews-feature/feature.properties
new file mode 100644
index 00000000000..5539546352a
--- /dev/null
+++ b/features/org.eclipse.emf.cdo.lm.reviews-feature/feature.properties
@@ -0,0 +1,8 @@
+# Copyright (c) 2022, 2023 Eike Stepper (Loehne, 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
+
+featureName = CDO Model Repository Lifecycle Management
+description = Contains the CDO lifecycle management client and user interface plugins.
diff --git a/features/org.eclipse.emf.cdo.lm.reviews-feature/feature.xml b/features/org.eclipse.emf.cdo.lm.reviews-feature/feature.xml
new file mode 100644
index 00000000000..7c4ea18161b
--- /dev/null
+++ b/features/org.eclipse.emf.cdo.lm.reviews-feature/feature.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+ %description
+
+
+
+ %copyright
+
+
+
+ %license
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/features/org.eclipse.emf.cdo.lm.reviews-feature/pom.xml b/features/org.eclipse.emf.cdo.lm.reviews-feature/pom.xml
new file mode 100644
index 00000000000..dcf4cf703c3
--- /dev/null
+++ b/features/org.eclipse.emf.cdo.lm.reviews-feature/pom.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ 4.0.0
+
+
+ org.eclipse.emf.cdo
+ org.eclipse.emf.cdo.features
+ 4.7.0-SNAPSHOT
+ ../../releng/org.eclipse.emf.cdo.releng.parent/features
+
+
+ org.eclipse.emf.cdo.features
+ org.eclipse.emf.cdo.lm.reviews
+ 1.0.0-SNAPSHOT
+ eclipse-feature
+
+
diff --git a/features/org.eclipse.emf.cdo.sdk-feature/feature.xml b/features/org.eclipse.emf.cdo.sdk-feature/feature.xml
index bffe4fd7838..6ce5c496d41 100644
--- a/features/org.eclipse.emf.cdo.sdk-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.sdk-feature/feature.xml
@@ -12,7 +12,7 @@
+
+
diff --git a/features/org.eclipse.emf.cdo.sdk-feature/pom.xml b/features/org.eclipse.emf.cdo.sdk-feature/pom.xml
index 12351ee34dd..21175762b89 100644
--- a/features/org.eclipse.emf.cdo.sdk-feature/pom.xml
+++ b/features/org.eclipse.emf.cdo.sdk-feature/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo.features
org.eclipse.emf.cdo.sdk
- 5.14.1-SNAPSHOT
+ 5.14.2-SNAPSHOT
eclipse-feature
diff --git a/features/org.eclipse.emf.cdo.server-feature/feature.xml b/features/org.eclipse.emf.cdo.server-feature/feature.xml
index 60030abe300..5fda460427e 100644
--- a/features/org.eclipse.emf.cdo.server-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.server-feature/feature.xml
@@ -12,7 +12,7 @@
org.eclipse.emf.cdo.features
org.eclipse.emf.cdo.server
- 4.25.1-SNAPSHOT
+ 4.26.0-SNAPSHOT
eclipse-feature
diff --git a/features/org.eclipse.emf.cdo.server.embedded-feature/feature.xml b/features/org.eclipse.emf.cdo.server.embedded-feature/feature.xml
index 3105cb0dfef..d35d5cf76b5 100644
--- a/features/org.eclipse.emf.cdo.server.embedded-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.server.embedded-feature/feature.xml
@@ -12,7 +12,7 @@
org.eclipse.emf.cdo.features
org.eclipse.emf.cdo.server.embedded
- 4.25.1-SNAPSHOT
+ 4.26.0-SNAPSHOT
eclipse-feature
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 baccbc4fed3..5432030176e 100644
--- a/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.common;singleton:=true
-Bundle-Version: 4.22.2.qualifier
+Bundle-Version: 4.23.0.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -15,21 +15,21 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)";visibili
org.eclipse.emf.ecore.change;bundle-version="[2.5.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="[2.5.0,3.0.0)";visibility:=reexport,
org.eclipse.net4j.util;bundle-version="[3.0.0,4.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.common;version="4.22.2",
- org.eclipse.emf.cdo.common.admin;version="4.22.2",
- org.eclipse.emf.cdo.common.branch;version="4.22.2",
- org.eclipse.emf.cdo.common.commit;version="4.22.2",
- org.eclipse.emf.cdo.common.commit.handler;version="4.22.2",
- org.eclipse.emf.cdo.common.id;version="4.22.2",
- org.eclipse.emf.cdo.common.lob;version="4.22.2",
- org.eclipse.emf.cdo.common.lock;version="4.22.2",
- org.eclipse.emf.cdo.common.model;version="4.22.2",
- org.eclipse.emf.cdo.common.protocol;version="4.22.2",
- org.eclipse.emf.cdo.common.revision;version="4.22.2",
- org.eclipse.emf.cdo.common.revision.delta;version="4.22.2",
- org.eclipse.emf.cdo.common.security;version="4.22.2",
- org.eclipse.emf.cdo.common.util;version="4.22.2",
- org.eclipse.emf.cdo.internal.common;version="4.22.2";
+Export-Package: org.eclipse.emf.cdo.common;version="4.23.0",
+ org.eclipse.emf.cdo.common.admin;version="4.23.0",
+ org.eclipse.emf.cdo.common.branch;version="4.23.0",
+ org.eclipse.emf.cdo.common.commit;version="4.23.0",
+ org.eclipse.emf.cdo.common.commit.handler;version="4.23.0",
+ org.eclipse.emf.cdo.common.id;version="4.23.0",
+ org.eclipse.emf.cdo.common.lob;version="4.23.0",
+ org.eclipse.emf.cdo.common.lock;version="4.23.0",
+ org.eclipse.emf.cdo.common.model;version="4.23.0",
+ org.eclipse.emf.cdo.common.protocol;version="4.23.0",
+ org.eclipse.emf.cdo.common.revision;version="4.23.0",
+ org.eclipse.emf.cdo.common.revision.delta;version="4.23.0",
+ org.eclipse.emf.cdo.common.security;version="4.23.0",
+ org.eclipse.emf.cdo.common.util;version="4.23.0",
+ org.eclipse.emf.cdo.internal.common;version="4.23.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -38,9 +38,9 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.22.2",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.common.branch;version="4.22.2";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.ui",
- org.eclipse.emf.cdo.internal.common.bundle;version="4.22.2";x-internal:=true,
- org.eclipse.emf.cdo.internal.common.commit;version="4.22.2";
+ org.eclipse.emf.cdo.internal.common.branch;version="4.23.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.ui",
+ org.eclipse.emf.cdo.internal.common.bundle;version="4.23.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.common.commit;version="4.23.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -49,7 +49,7 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.22.2",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.common.id;version="4.22.2";
+ org.eclipse.emf.cdo.internal.common.id;version="4.23.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -60,9 +60,9 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.22.2",
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.admin,
org.eclipse.emf.cdo.server.admin",
- org.eclipse.emf.cdo.internal.common.lock;version="4.22.2";x-internal:=true,
- org.eclipse.emf.cdo.internal.common.messages;version="4.22.2";x-internal:=true,
- org.eclipse.emf.cdo.internal.common.model;version="4.22.2";
+ org.eclipse.emf.cdo.internal.common.lock;version="4.23.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.common.messages;version="4.23.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.common.model;version="4.23.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -71,7 +71,7 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.22.2",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.common.revision;version="4.22.2";
+ org.eclipse.emf.cdo.internal.common.revision;version="4.23.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -80,7 +80,7 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.22.2",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.common.revision.delta;version="4.22.2";
+ org.eclipse.emf.cdo.internal.common.revision.delta;version="4.23.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -89,7 +89,7 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.22.2",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.common.util;version="4.22.2";
+ org.eclipse.emf.cdo.internal.common.util;version="4.23.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -98,15 +98,15 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.22.2",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.spi.common;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.admin;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.branch;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.commit;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.id;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.lock;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.model;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.protocol;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.revision;version="4.22.2",
- org.eclipse.emf.cdo.spi.common.util;version="4.22.2"
+ org.eclipse.emf.cdo.spi.common;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.admin;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.branch;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.commit;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.id;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.lock;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.model;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.protocol;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.revision;version="4.23.0",
+ org.eclipse.emf.cdo.spi.common.util;version="4.23.0"
Automatic-Module-Name: org.eclipse.emf.cdo.common
Eclipse-RegisterBuddy: org.eclipse.net4j.util
diff --git a/plugins/org.eclipse.emf.cdo.common/pom.xml b/plugins/org.eclipse.emf.cdo.common/pom.xml
index 5590347d213..67d2c169f70 100644
--- a/plugins/org.eclipse.emf.cdo.common/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.common/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.common
- 4.22.2-SNAPSHOT
+ 4.23.0-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchRef.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchRef.java
index b2818c9e10a..12f66288e87 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchRef.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchRef.java
@@ -82,6 +82,23 @@ public CDOBranchPointRef getHeadRef()
return getPointRef(CDOBranchPoint.UNSPECIFIED_DATE);
}
+ /**
+ * @since 4.23
+ */
+ public CDOBranchRef getBaseBranchRef()
+ {
+ if (!isMainBranch())
+ {
+ int lastSlash = branchPath.lastIndexOf(CDOBranch.PATH_SEPARATOR);
+ if (lastSlash != -1)
+ {
+ return new CDOBranchRef(branchPath.substring(0, lastSlash));
+ }
+ }
+
+ return null;
+ }
+
public CDOBranch resolve(CDOBranchManager branchManager)
{
return branchManager.getBranch(branchPath);
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
index 9727f60bfc4..5c1cbcd099c 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
@@ -44,6 +44,8 @@
*/
public class CDOCommitHistoryImpl extends Container implements CDOCommitHistory
{
+ private static final ThreadLocal START_TIME_THREAD_LOCAL = new ThreadLocal<>();
+
private static final CDOCommitInfo[] NO_ELEMENTS = {};
private final TriggerLoadElement triggerLoadElement = new TriggerLoadElementImpl();
@@ -52,6 +54,8 @@ public class CDOCommitHistoryImpl extends Container implements CD
private final CDOBranch branch;
+ private final long startTime;
+
private final IListener branchListener = new IListener()
{
@Override
@@ -83,6 +87,17 @@ public CDOCommitHistoryImpl(CDOCommitInfoManager manager, CDOBranch branch)
super(true);
this.manager = manager;
this.branch = branch;
+
+ Long time = START_TIME_THREAD_LOCAL.get();
+ if (time != null)
+ {
+ startTime = time;
+ START_TIME_THREAD_LOCAL.remove();
+ }
+ else
+ {
+ startTime = CDOBranchPoint.UNSPECIFIED_DATE;
+ }
}
@Override
@@ -97,6 +112,11 @@ public final CDOBranch getBranch()
return branch;
}
+ public final long getStartTime()
+ {
+ return startTime;
+ }
+
@Override
public final int getLoadCount()
{
@@ -534,7 +554,22 @@ public void handleCommitInfo(CDOCommitInfo commitInfo)
protected boolean filterCommitInfo(CDOCommitInfo commitInfo)
{
CDOBranch commitBranch = commitInfo.getBranch();
- return commitBranch.isDeleted() || branch != null && commitBranch != branch;
+ if (commitBranch.isDeleted())
+ {
+ return true;
+ }
+
+ if (branch != null && commitBranch != branch)
+ {
+ return true;
+ }
+
+ if (startTime != CDOBranchPoint.UNSPECIFIED_DATE && commitInfo.getTimeStamp() < startTime)
+ {
+ return true;
+ }
+
+ return false;
}
protected final boolean addCommitInfo(CDOCommitInfo commitInfo)
@@ -659,6 +694,11 @@ private CDOCommitInfo getLastCommitInfo()
return commitInfos.getLast();
}
+ public static void setNextStartTime(long startTime)
+ {
+ START_TIME_THREAD_LOCAL.set(startTime);
+ }
+
/**
* @author Eike Stepper
*/
diff --git a/plugins/org.eclipse.emf.cdo.lm.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.lm.client/META-INF/MANIFEST.MF
index 0572dfbe555..e56e5dedd25 100644
--- a/plugins/org.eclipse.emf.cdo.lm.client/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.lm.client/META-INF/MANIFEST.MF
@@ -10,7 +10,7 @@ Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.eclipse.emf.cdo.lm.client;version="1.4.0",
- org.eclipse.emf.cdo.lm.internal.client;version="1.4.0";x-friends:="org.eclipse.emf.cdo.lm.ui",
+ org.eclipse.emf.cdo.lm.internal.client;version="1.4.0";x-friends:="org.eclipse.emf.cdo.lm.ui,org.eclipse.emf.cdo.lm.reviews.ui",
org.eclipse.emf.cdo.lm.internal.client.bundle;version="1.4.0";x-internal:=true,
org.eclipse.emf.cdo.lm.internal.client.properties;version="1.4.0";x-internal:=true
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
diff --git a/plugins/org.eclipse.emf.cdo.lm.client/src/org/eclipse/emf/cdo/lm/internal/client/LMNamingStrategy.java b/plugins/org.eclipse.emf.cdo.lm.client/src/org/eclipse/emf/cdo/lm/internal/client/LMNamingStrategy.java
index c5ee36675fb..8564f8b4097 100644
--- a/plugins/org.eclipse.emf.cdo.lm.client/src/org/eclipse/emf/cdo/lm/internal/client/LMNamingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.lm.client/src/org/eclipse/emf/cdo/lm/internal/client/LMNamingStrategy.java
@@ -23,6 +23,11 @@ private LMNamingStrategy()
public static String getChangeBranchName(String changeLabel)
{
- return "change-" + changeLabel.trim().replace('/', '-').replace(' ', '-');
+ return "change-" + sanitizeBranchName(changeLabel);
+ }
+
+ public static String sanitizeBranchName(String branchName)
+ {
+ return branchName.trim().replace('/', '-').replace(' ', '-');
}
}
diff --git a/plugins/org.eclipse.emf.cdo.lm.client/src/org/eclipse/emf/cdo/lm/internal/client/SystemDescriptor.java b/plugins/org.eclipse.emf.cdo.lm.client/src/org/eclipse/emf/cdo/lm/internal/client/SystemDescriptor.java
index 22db3672900..0bbbb973f8f 100644
--- a/plugins/org.eclipse.emf.cdo.lm.client/src/org/eclipse/emf/cdo/lm/internal/client/SystemDescriptor.java
+++ b/plugins/org.eclipse.emf.cdo.lm.client/src/org/eclipse/emf/cdo/lm/internal/client/SystemDescriptor.java
@@ -855,7 +855,7 @@ private void resolveDependencies(ModuleDefinition rootDefinition, Assembly assem
List ius = new ArrayList<>();
system.forEachBaseline(baseline -> {
- if (baseline instanceof FixedBaseline)
+ if (baseline instanceof Delivery || baseline instanceof Drop)
{
FixedBaseline fixedBaseline = (FixedBaseline)baseline;
String moduleName = fixedBaseline.getModule().getName();
@@ -1158,20 +1158,25 @@ public void deleteChange(Change change, IProgressMonitor monitor) throws Concurr
@Override
public Delivery createDelivery(Stream stream, Change change, LMMerger merger, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException
+ {
+ return createDelivery(stream, change, change, merger, monitor);
+ }
+
+ public Delivery createDelivery(Stream stream, Change change, FloatingBaseline mergeSource, LMMerger merger, IProgressMonitor monitor) throws CommitException
{
Delivery[] result = { null };
CommitException[] commitException = { null };
String moduleName = stream.getModule().getName();
- withModuleSession(moduleName, session -> {
- CDOBranchRef sourceBranchRef = change.getBranch();
+ withModuleSession(moduleName, moduleSession -> {
+ CDOBranchRef sourceBranchRef = mergeSource.getBranch();
CDOBranchRef targetBranchRef = stream.getBranch();
- CDOBranchManager branchManager = session.getBranchManager();
+ CDOBranchManager branchManager = moduleSession.getBranchManager();
CDOBranch sourceBranch = sourceBranchRef.resolve(branchManager);
CDOBranch targetBranch = targetBranchRef.resolve(branchManager);
- CDOCommitInfoManager commitInfoManager = session.getCommitInfoManager();
+ CDOCommitInfoManager commitInfoManager = moduleSession.getCommitInfoManager();
long sourceCommitTime = commitInfoManager.getLastCommitOfBranch(sourceBranch, true);
CDOBranchPointRef sourceBranchPointRef = sourceBranchRef.getPointRef(sourceCommitTime);
@@ -1183,8 +1188,8 @@ public Delivery createDelivery(Stream stream, Change change, LMMerger merger, IP
LMMerger2 merger2 = (LMMerger2)merger;
LMMergeInfos infos = new LMMergeInfos();
- infos.setSession(session);
- infos.setSourceBaseline(change);
+ infos.setSession(moduleSession);
+ infos.setSourceBaseline(mergeSource);
infos.setSourceBranchPoint(sourceBranchPoint);
infos.setTargetBaseline(stream);
infos.setTargetBranch(targetBranch);
@@ -1193,7 +1198,7 @@ public Delivery createDelivery(Stream stream, Change change, LMMerger merger, IP
}
else
{
- targetCommitTime = merger.mergeDelivery(session, sourceBranchPoint, targetBranch);
+ targetCommitTime = merger.mergeDelivery(moduleSession, sourceBranchPoint, targetBranch);
}
if (targetCommitTime != CDOBranchPoint.INVALID_DATE)
@@ -1243,7 +1248,7 @@ public Assembly createEmptyAssembly()
return assembly;
}
- private void addDependencies(ModuleDefinition from, FixedBaseline to)
+ public void addDependencies(ModuleDefinition from, FixedBaseline to)
{
for (DependencyDefinition dependencyDefinition : from.getDependencies())
{
diff --git a/plugins/org.eclipse.emf.cdo.lm.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.lm.edit/META-INF/MANIFEST.MF
index bc77a48b836..084794abd1a 100644
--- a/plugins/org.eclipse.emf.cdo.lm.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.lm.edit/META-INF/MANIFEST.MF
@@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.lm.edit;singleton:=true
Automatic-Module-Name: org.eclipse.emf.cdo.lm.edit
-Bundle-Version: 1.1.1.qualifier
+Bundle-Version: 1.1.2.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.emf.cdo.lm.provider.LMEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.emf.cdo.lm.provider;version="1.1.1"
+Export-Package: org.eclipse.emf.cdo.lm.provider;version="1.1.2"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.cdo.edit;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.lm;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
diff --git a/plugins/org.eclipse.emf.cdo.lm.edit/pom.xml b/plugins/org.eclipse.emf.cdo.lm.edit/pom.xml
index 6bf4fefeac0..caea48d647c 100644
--- a/plugins/org.eclipse.emf.cdo.lm.edit/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.lm.edit/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.lm.edit
- 1.1.1-SNAPSHOT
+ 1.1.2-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.lm.edit/src/org/eclipse/emf/cdo/lm/provider/ChangeItemProvider.java b/plugins/org.eclipse.emf.cdo.lm.edit/src/org/eclipse/emf/cdo/lm/provider/ChangeItemProvider.java
index 8464e9eea2b..f1512475fbf 100644
--- a/plugins/org.eclipse.emf.cdo.lm.edit/src/org/eclipse/emf/cdo/lm/provider/ChangeItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.lm.edit/src/org/eclipse/emf/cdo/lm/provider/ChangeItemProvider.java
@@ -15,6 +15,8 @@
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
@@ -127,7 +129,46 @@ protected void addDeliveriesPropertyDescriptor(Object object)
{
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Change_deliveries_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Change_deliveries_feature", "_UI_Change_type"),
- LMPackage.Literals.CHANGE__DELIVERIES, true, false, true, null, null, null));
+ LMPackage.Literals.CHANGE__DELIVERIES, false, false, false, null, null, null));
+ }
+
+ @Override
+ protected Object wrap(EObject object, EStructuralFeature feature, Object value, int index)
+ {
+ return super.wrap(object, feature, value, index);
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Collection extends EStructuralFeature> getChildrenFeatures(Object object)
+ {
+ if (childrenFeatures == null)
+ {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(LMPackage.Literals.CHANGE__DELIVERIES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child)
+ {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/META-INF/MANIFEST.MF
index c0480820c52..f6559494306 100644
--- a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/META-INF/MANIFEST.MF
@@ -3,15 +3,17 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.lm.reviews.edit;singleton:=true
Automatic-Module-Name: org.eclipse.emf.cdo.lm.reviews.edit
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.emf.cdo.lm.reviews.provider.ReviewsEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.emf.cdo.lm.reviews.provider;version="1.0.1"
+Export-Package: org.eclipse.emf.cdo.lm.reviews.provider;version="1.0.2"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.cdo.lm.reviews;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.lm;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
- org.eclipse.emf.cdo.lm.edit;bundle-version="[1.0.0,2.0.0)";visibility:=reexport
+ org.eclipse.emf.cdo.lm.edit;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
+ org.eclipse.emf.cdo.lm.modules;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
+ org.eclipse.emf.cdo.lm.modules.edit;bundle-version="[1.0.0,2.0.0)";visibility:=reexport
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Comment1.png b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Comment1.png
new file mode 100644
index 00000000000..7bc9233ea63
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Comment1.png differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Comment7.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Comment7.gif
new file mode 100644
index 00000000000..c495731c682
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Comment7.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/DeliveryReview - Kopie.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/DeliveryReview - Kopie.gif
new file mode 100644
index 00000000000..86da159fcc3
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/DeliveryReview - Kopie.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/DropReview - Kopie.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/DropReview - Kopie.gif
new file mode 100644
index 00000000000..8144d114e06
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/DropReview - Kopie.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/JSF_SELECTMANYCHECKBOX1 - Kopie.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/JSF_SELECTMANYCHECKBOX1 - Kopie.gif
new file mode 100644
index 00000000000..2e2370d3179
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/JSF_SELECTMANYCHECKBOX1 - Kopie.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/JSF_SELECTMANYCHECKBOX1.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/JSF_SELECTMANYCHECKBOX1.gif
new file mode 100644
index 00000000000..2e2370d3179
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/JSF_SELECTMANYCHECKBOX1.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Review.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Review.gif
new file mode 100644
index 00000000000..dcab3514a38
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/Review.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/_drop_ovr.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/_drop_ovr.gif
new file mode 100644
index 00000000000..e3d386a0210
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/_drop_ovr.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/_review_ovr.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/_review_ovr.gif
new file mode 100644
index 00000000000..efc39b067ae
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/_review_ovr.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/chat.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/chat.gif
new file mode 100644
index 00000000000..62c99217518
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/chat.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/insert-comment.ico b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/insert-comment.ico
new file mode 100644
index 00000000000..3baed8d9e78
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/insert-comment.ico differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/review.png b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/review.png
new file mode 100644
index 00000000000..8258b30aaa0
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/review.png differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/template_obj.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/template_obj.gif
new file mode 100644
index 00000000000..c0d9d95c268
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/OLD/template_obj.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/Comment.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/Comment.gif
index 498364f1c1a..7199615b1e2 100644
Binary files a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/Comment.gif and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/Comment.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/DeliveryReview.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/DeliveryReview.gif
index a17dc7d88e9..79694aba279 100644
Binary files a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/DeliveryReview.gif and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/DeliveryReview.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/DropReview.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/DropReview.gif
index 35ef84e20e2..a6731d05919 100644
Binary files a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/DropReview.gif and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/DropReview.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/Heading.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/Heading.gif
new file mode 100644
index 00000000000..2c843c44627
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/Heading.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/ReleaseReview.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/ReleaseReview.gif
new file mode 100644
index 00000000000..ce937e65c64
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/ReleaseReview.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/ReviewTemplate.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/ReviewTemplate.gif
index be22463d291..dcab3514a38 100644
Binary files a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/ReviewTemplate.gif and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/obj16/ReviewTemplate.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/ovr16/Resolved.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/ovr16/Resolved.gif
new file mode 100644
index 00000000000..01f71adcc4f
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/ovr16/Resolved.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/ovr16/Unresolved.gif b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/ovr16/Unresolved.gif
new file mode 100644
index 00000000000..0b727b433b5
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/icons/full/ovr16/Unresolved.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/plugin.properties
index 43dc960b198..78fc4a0b077 100644
--- a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/plugin.properties
@@ -18,38 +18,59 @@ _UI_CreateSibling_description = Create a new sibling of type {0} for the selecte
_UI_PropertyDescriptor_description = The {0} of the {1}
-_UI_Commentable_type = Commentable
-_UI_Comment_type = Comment
-_UI_ReviewTemplate_type = Review Template
-_UI_Review_type = Review
-_UI_DeliveryReview_type = Delivery Review
-_UI_DropReview_type = Drop Review
_UI_Unknown_type = Object
-
_UI_Unknown_datatype= Value
+_UI_Unknown_feature = Unspecified
+_UI_Drop = Drop
-_UI_Commentable_comments_feature = Comments
+_UI_CommentStatus_None_literal = None
+_UI_CommentStatus_Resolved_literal = Resolved
+_UI_CommentStatus_Unresolved_literal = Unresolved
_UI_Comment_commentable_feature = Commentable
-_UI_Comment_text_feature = Text
_UI_Comment_status_feature = Status
-_UI_ReviewTemplate_type_feature = Type
-_UI_ReviewTemplate_reviewers_feature = Reviewers
-_UI_Review_type_feature = Type
-_UI_Review_author_feature = Author
-_UI_Review_reviewers_feature = Reviewers
+_UI_Comment_text_feature = Text
+_UI_Comment_type = Comment
+_UI_Commentable_commentCount_feature = Comment Count
+_UI_Commentable_comments_feature = Comments
+_UI_Commentable_resolvedCount_feature = Resolved Count
+_UI_Commentable_type = Commentable
+_UI_Commentable_unresolvedCount_feature = Unresolved Count
+_UI_DeliveryReview_base_feature = Base
+_UI_DeliveryReview_branch_feature = Branch
+_UI_DeliveryReview_deliveries_feature = Deliveries
+_UI_DeliveryReview_impact_feature = Impact
+_UI_DeliveryReview_label_feature = Label
+_UI_DeliveryReview_rebaseCount_feature = Rebase Count
_UI_DeliveryReview_sourceChange_feature = Source Change
_UI_DeliveryReview_sourceCommit_feature = Source Commit
_UI_DeliveryReview_targetCommit_feature = Target Commit
-_UI_DropReview_targetTimeStamp_feature = Target Time Stamp
+_UI_DeliveryReview_type = Delivery Review
+_UI_DropReview_delivery_feature = Delivery
+_UI_DropReview_dropLabel_feature = Drop Label
_UI_DropReview_dropType_feature = Drop Type
-_UI_Unknown_feature = Unspecified
-
-_UI_CommentStatus_None_literal = None
-_UI_CommentStatus_Unresolved_literal = Unresolved
-_UI_CommentStatus_Resolved_literal = Resolved
-_UI_ReviewType_Delivery_literal = Delivery
-_UI_ReviewType_Drop_literal = Drop
-_UI_ReviewStatus_Open_literal = Open
+_UI_DropReview_targetTimeStamp_feature = Target Time Stamp
+_UI_DropReview_type = Drop Review
+_UI_Heading_type = Heading
+_UI_ReviewStatus_Abandoned_literal = Abandoned
_UI_ReviewStatus_Conflict_literal = Conflict
+_UI_ReviewStatus_Deleted_literal = Deleted
_UI_ReviewStatus_Merged_literal = Merged
-_UI_ReviewStatus_Abandoned_literal = Abandoned
+_UI_ReviewStatus_New_literal = New
+_UI_ReviewStatus_Open_literal = Open
+_UI_ReviewStatus_Outdated_literal = Outdated
+_UI_ReviewStatus_Restoring_literal = Restoring
+_UI_ReviewStatus_SourceOutdated_literal = Source Outdated
+_UI_ReviewStatus_Submitted_literal = Submitted
+_UI_ReviewStatus_TargetOutdated_literal = Target Outdated
+_UI_ReviewTemplate_reviewers_feature = Reviewers
+_UI_ReviewTemplate_type = Review Template
+_UI_ReviewTemplate_type_feature = Type
+_UI_ReviewType_Delivery_literal = Delivery
+_UI_ReviewType_Drop_literal = Drop
+_UI_Review_author_feature = Author
+_UI_Review_id_feature = Id
+_UI_Review_reviewers_feature = Reviewers
+_UI_Review_status_feature = Status
+_UI_Review_type = Review
+_UI_Review_type_feature = Type
+_UI_Commentable_review_feature = Review
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/pom.xml b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/pom.xml
index 281bec6e581..3211a9bfced 100644
--- a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.lm.reviews.edit
- 1.0.1-SNAPSHOT
+ 1.0.2-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/src/org/eclipse/emf/cdo/lm/reviews/provider/CommentItemProvider.java b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/src/org/eclipse/emf/cdo/lm/reviews/provider/CommentItemProvider.java
index 8107c9e8562..f823b6e4626 100644
--- a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/src/org/eclipse/emf/cdo/lm/reviews/provider/CommentItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/src/org/eclipse/emf/cdo/lm/reviews/provider/CommentItemProvider.java
@@ -11,14 +11,17 @@
package org.eclipse.emf.cdo.lm.reviews.provider;
import org.eclipse.emf.cdo.lm.reviews.Comment;
+import org.eclipse.emf.cdo.lm.reviews.CommentStatus;
import org.eclipse.emf.cdo.lm.reviews.ReviewsPackage;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.StyledString;
+import org.eclipse.emf.edit.provider.StyledString.Style;
import org.eclipse.emf.edit.provider.ViewerNotification;
import java.util.Collection;
@@ -32,6 +35,12 @@
*/
public class CommentItemProvider extends CommentableItemProvider
{
+ private static final Style STYLE_UNRESOLVED = Style.newBuilder().setForegroundColor(URI.createURI("color://rgb/220/40/40")).toStyle();
+
+ private static final Style STYLE_RESOLVED = Style.newBuilder().setForegroundColor(URI.createURI("color://rgb/20/180/20")).toStyle();
+
+ private ItemPropertyDescriptor statusPropertyDescriptor;
+
/**
* This constructs an instance from a factory and a notifier.
*
@@ -72,20 +81,22 @@ protected void addTextPropertyDescriptor(Object object)
{
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Comment_text_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Comment_text_feature", "_UI_Comment_type"),
- ReviewsPackage.Literals.COMMENT__TEXT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ ReviewsPackage.Literals.COMMENT__TEXT, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
* This adds a property descriptor for the Status feature.
*
*
- * @generated
+ * @generated NOT
*/
protected void addStatusPropertyDescriptor(Object object)
{
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ // Remember the statusPropertyDescriptor for appendStatus() below.
+ statusPropertyDescriptor = createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Comment_status_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Comment_status_feature", "_UI_Comment_type"),
- ReviewsPackage.Literals.COMMENT__STATUS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ ReviewsPackage.Literals.COMMENT__STATUS, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null);
+ itemPropertyDescriptors.add(statusPropertyDescriptor);
}
/**
@@ -100,6 +111,13 @@ public Object getImage(Object object)
return overlayImage(object, getResourceLocator().getImage("full/obj16/Comment"));
}
+ @Override
+ protected Object overlayImage(Object object, Object image)
+ {
+ image = super.overlayImage(object, image);
+ return CommentableItemProvider.overlayCommentableImage((Comment)object, image);
+ }
+
/**
*
*
@@ -127,22 +145,34 @@ public String getText(Object object)
* This returns the label styled text for the adapted class.
*
*
- * @generated
+ * @generated NOT
*/
@Override
public Object getStyledText(Object object)
{
- String label = ((Comment)object).getText();
- StyledString styledLabel = new StyledString();
- if (label == null || label.length() == 0)
+ Comment comment = (Comment)object;
+ StyledString styledString = new StyledString(getString("_UI_Comment_type"), StyledString.Style.QUALIFIER_STYLER).append(" ").append(comment.getText());
+
+ CommentStatus status = comment.getStatus();
+ Style style = null;
+ if (status == CommentStatus.UNRESOLVED)
{
- styledLabel.append(getString("_UI_Comment_type"), StyledString.Style.QUALIFIER_STYLER);
+ style = STYLE_UNRESOLVED;
}
- else
+ else if (status == CommentStatus.RESOLVED)
{
- styledLabel.append(getString("_UI_Comment_type"), StyledString.Style.QUALIFIER_STYLER).append(" " + label);
+ style = STYLE_RESOLVED;
+ }
+
+ if (style != null)
+ {
+ getPropertyDescriptors(comment); // Ensure that the descriptors are initialized.
+
+ String statusLabel = statusPropertyDescriptor.getLabelProvider(comment).getText(status);
+ styledString.append(" ").append("[" + statusLabel + "]", style);
}
- return styledLabel;
+
+ return styledString;
}
/**
@@ -150,20 +180,26 @@ public Object getStyledText(Object object)
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
*
*
- * @generated
+ * @generated NOT
*/
@Override
public void notifyChanged(Notification notification)
{
updateChildren(notification);
+ Object notifier = notification.getNotifier();
switch (notification.getFeatureID(Comment.class))
{
case ReviewsPackage.COMMENT__TEXT:
+ fireNotifyChanged(new ViewerNotification(notification, notifier, false, true));
+ return;
+
case ReviewsPackage.COMMENT__STATUS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(new ViewerNotification(notification, notifier, false, true));
+ CommentableItemProvider.propagateNotification(this, notification, notifier);
return;
}
+
super.notifyChanged(notification);
}
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/src/org/eclipse/emf/cdo/lm/reviews/provider/CommentableItemProvider.java b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/src/org/eclipse/emf/cdo/lm/reviews/provider/CommentableItemProvider.java
index f2654fd0640..54a0ed01fda 100644
--- a/plugins/org.eclipse.emf.cdo.lm.reviews.edit/src/org/eclipse/emf/cdo/lm/reviews/provider/CommentableItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.lm.reviews.edit/src/org/eclipse/emf/cdo/lm/reviews/provider/CommentableItemProvider.java
@@ -12,16 +12,23 @@
import org.eclipse.emf.cdo.etypes.provider.ModelElementItemProvider;
import org.eclipse.emf.cdo.lm.reviews.Commentable;
-import org.eclipse.emf.cdo.lm.reviews.ReviewsFactory;
import org.eclipse.emf.cdo.lm.reviews.ReviewsPackage;
+import org.eclipse.emf.cdo.lm.reviews.impl.CommentableImpl;
+import org.eclipse.emf.cdo.lm.reviews.impl.CommentableImpl.CommentStatistics;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedImage;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.StyledString;
import org.eclipse.emf.edit.provider.ViewerNotification;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -57,10 +64,69 @@ public List getPropertyDescriptors(Object object)
{
super.getPropertyDescriptors(object);
+ addReviewPropertyDescriptor(object);
+ addCommentCountPropertyDescriptor(object);
+ addUnresolvedCountPropertyDescriptor(object);
+ addResolvedCountPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
+ /**
+ * This adds a property descriptor for the Review feature.
+ *
+ *
+ * @generated
+ */
+ protected void addReviewPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Commentable_review_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Commentable_review_feature", "_UI_Commentable_type"),
+ ReviewsPackage.Literals.COMMENTABLE__REVIEW, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Comment Count feature.
+ *
+ *
+ * @generated
+ */
+ protected void addCommentCountPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Commentable_commentCount_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Commentable_commentCount_feature", "_UI_Commentable_type"),
+ ReviewsPackage.Literals.COMMENTABLE__COMMENT_COUNT, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Unresolved Count feature.
+ *
+ *
+ * @generated
+ */
+ protected void addUnresolvedCountPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Commentable_unresolvedCount_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Commentable_unresolvedCount_feature", "_UI_Commentable_type"),
+ ReviewsPackage.Literals.COMMENTABLE__UNRESOLVED_COUNT, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Resolved Count feature.
+ *
+ *
+ * @generated
+ */
+ protected void addResolvedCountPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Commentable_resolvedCount_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Commentable_resolvedCount_feature", "_UI_Commentable_type"),
+ ReviewsPackage.Literals.COMMENTABLE__RESOLVED_COUNT, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ }
+
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
@@ -126,7 +192,9 @@ public String getText(Object object)
@Override
public Object getStyledText(Object object)
{
- return new StyledString(getString("_UI_Commentable_type"));
+ Commentable commentable = (Commentable)object;
+ return new StyledString(getString("_UI_Commentable_type"), StyledString.Style.QUALIFIER_STYLER).append(" ")
+ .append(Integer.toString(commentable.getCommentCount()));
}
/**
@@ -134,19 +202,22 @@ public Object getStyledText(Object object)
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
*
*
- * @generated
+ * @generated NOT
*/
@Override
public void notifyChanged(Notification notification)
{
updateChildren(notification);
+ Object notifier = notification.getNotifier();
switch (notification.getFeatureID(Commentable.class))
{
case ReviewsPackage.COMMENTABLE__COMMENTS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ fireNotifyChanged(new ViewerNotification(notification, notifier, true, true));
+ propagateNotification(this, notification, notifier);
return;
}
+
super.notifyChanged(notification);
}
@@ -161,8 +232,45 @@ public void notifyChanged(Notification notification)
protected void collectNewChildDescriptors(Collection
- * @generated
- */
-public class DeliveryReviewTest extends ReviewTest
-{
-
- /**
- *
- *
- * @generated
- */
- public static void main(String[] args)
- {
- TestRunner.run(DeliveryReviewTest.class);
- }
-
- /**
- * Constructs a new Delivery Review test case with the given name.
- *
- *
- * @generated
- */
- public DeliveryReviewTest(String name)
- {
- super(name);
- }
-
- /**
- * Returns the fixture for this Delivery Review test case.
- *
- *
- * @generated
- */
- @Override
- protected DeliveryReview getFixture()
- {
- return (DeliveryReview)fixture;
- }
-
- /**
- *
- *
- *
- * @generated
- */
- @Override
- protected void setUp() throws Exception
- {
- setFixture(ReviewsFactory.eINSTANCE.createDeliveryReview());
- }
-
- /**
- *
- *
- *
- * @generated
- */
- @Override
- protected void tearDown() throws Exception
- {
- setFixture(null);
- }
-
- /**
- * Tests the '{@link org.eclipse.emf.cdo.lm.FloatingBaseline#getBase() Get Base}' operation.
- *
- *
- * @see org.eclipse.emf.cdo.lm.FloatingBaseline#getBase()
- * @generated
- */
- public void testGetBase()
- {
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.emf.cdo.lm.FloatingBaseline#getDeliveries() Get Deliveries}' operation.
- *
- *
- * @see org.eclipse.emf.cdo.lm.FloatingBaseline#getDeliveries()
- * @generated
- */
- public void testGetDeliveries()
- {
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.emf.cdo.lm.FloatingBaseline#getBranch() Get Branch}' operation.
- *
- *
- * @see org.eclipse.emf.cdo.lm.FloatingBaseline#getBranch()
- * @generated
- */
- public void testGetBranch()
- {
- fail();
- }
-
-} // DeliveryReviewTest
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/DropReviewTest.java b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/DropReviewTest.java
deleted file mode 100644
index 634c4dfeba6..00000000000
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/DropReviewTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2023 Eike Stepper (Loehne, 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.lm.reviews.tests;
-
-import org.eclipse.emf.cdo.lm.reviews.DropReview;
-import org.eclipse.emf.cdo.lm.reviews.ReviewsFactory;
-
-/**
- *
- * A test case for the model object 'Drop Review'.
- *
- *
- * The following operations are tested:
- *
- * - {@link org.eclipse.emf.cdo.lm.FixedBaseline#getBasedChanges() Get Based Changes}
- *
- *
- * @generated
- */
-public class DropReviewTest extends ReviewTest
-{
-
- /**
- *
- *
- * @generated
- */
- public static void main(String[] args)
- {
- TestRunner.run(DropReviewTest.class);
- }
-
- /**
- * Constructs a new Drop Review test case with the given name.
- *
- *
- * @generated
- */
- public DropReviewTest(String name)
- {
- super(name);
- }
-
- /**
- * Returns the fixture for this Drop Review test case.
- *
- *
- * @generated
- */
- @Override
- protected DropReview getFixture()
- {
- return (DropReview)fixture;
- }
-
- /**
- *
- *
- *
- * @generated
- */
- @Override
- protected void setUp() throws Exception
- {
- setFixture(ReviewsFactory.eINSTANCE.createDropReview());
- }
-
- /**
- *
- *
- *
- * @generated
- */
- @Override
- protected void tearDown() throws Exception
- {
- setFixture(null);
- }
-
- /**
- * Tests the '{@link org.eclipse.emf.cdo.lm.FixedBaseline#getBasedChanges() Get Based Changes}' operation.
- *
- *
- * @see org.eclipse.emf.cdo.lm.FixedBaseline#getBasedChanges()
- * @generated
- */
- public void testGetBasedChanges()
- {
- fail();
- }
-
-} // DropReviewTest
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewTemplateTest.java b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewTemplateTest.java
deleted file mode 100644
index bac7b0ae4b5..00000000000
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewTemplateTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2023 Eike Stepper (Loehne, 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.lm.reviews.tests;
-
-import org.eclipse.emf.cdo.lm.reviews.ReviewTemplate;
-import org.eclipse.emf.cdo.lm.reviews.ReviewsFactory;
-
-/**
- *
- * A test case for the model object 'Review Template'.
- *
- * @generated
- */
-public class ReviewTemplateTest extends CommentableTest
-{
-
- /**
- *
- *
- * @generated
- */
- public static void main(String[] args)
- {
- TestRunner.run(ReviewTemplateTest.class);
- }
-
- /**
- * Constructs a new Review Template test case with the given name.
- *
- *
- * @generated
- */
- public ReviewTemplateTest(String name)
- {
- super(name);
- }
-
- /**
- * Returns the fixture for this Review Template test case.
- *
- *
- * @generated
- */
- @Override
- protected ReviewTemplate getFixture()
- {
- return (ReviewTemplate)fixture;
- }
-
- /**
- *
- *
- *
- * @generated
- */
- @Override
- protected void setUp() throws Exception
- {
- setFixture(ReviewsFactory.eINSTANCE.createReviewTemplate());
- }
-
- /**
- *
- *
- *
- * @generated
- */
- @Override
- protected void tearDown() throws Exception
- {
- setFixture(null);
- }
-
-} // ReviewTemplateTest
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewTest.java b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewTest.java
deleted file mode 100644
index 7a191a9767a..00000000000
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2023 Eike Stepper (Loehne, 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.lm.reviews.tests;
-
-import org.eclipse.emf.cdo.lm.reviews.Review;
-
-/**
- *
- * A test case for the model object 'Review'.
- *
- *
- * The following features are tested:
- *
- * - {@link org.eclipse.emf.cdo.lm.reviews.Review#getType() Type}
- *
- *
- * @generated
- */
-public abstract class ReviewTest extends TestCase
-{
-
- /**
- * The fixture for this Review test case.
- *
- *
- * @generated
- */
- protected Review fixture = null;
-
- /**
- * Constructs a new Review test case with the given name.
- *
- *
- * @generated
- */
- public ReviewTest(String name)
- {
- super(name);
- }
-
- /**
- * Sets the fixture for this Review test case.
- *
- *
- * @generated
- */
- protected void setFixture(Review fixture)
- {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Review test case.
- *
- *
- * @generated
- */
- protected Review getFixture()
- {
- return fixture;
- }
-
- /**
- * Tests the '{@link org.eclipse.emf.cdo.lm.reviews.Review#getType() Type}' feature getter.
- *
- *
- * @see org.eclipse.emf.cdo.lm.reviews.Review#getType()
- * @generated
- */
- public void testGetType()
- {
- fail();
- }
-
-} // ReviewTest
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewsExample.java b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewsExample.java
deleted file mode 100644
index 19e0965c34b..00000000000
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewsExample.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2023 Eike Stepper (Loehne, 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.lm.reviews.tests;
-
-import org.eclipse.emf.cdo.lm.reviews.Comment;
-import org.eclipse.emf.cdo.lm.reviews.ReviewsFactory;
-import org.eclipse.emf.cdo.lm.reviews.ReviewsPackage;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.util.Diagnostician;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- *
- * A sample utility for the 'reviews' package.
- *
- * @generated
- */
-public class ReviewsExample
-{
- /**
- *
- * Load all the argument file paths or URIs as instances of the model.
- *
- * @param args the file paths or URIs.
- * @generated
- */
- public static void main(String[] args)
- {
- // Create a resource set to hold the resources.
- //
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Register the appropriate resource factory to handle all file extensions.
- //
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
-
- // Register the package to ensure it is available during loading.
- //
- resourceSet.getPackageRegistry().put(ReviewsPackage.eNS_URI, ReviewsPackage.eINSTANCE);
-
- // If there are no arguments, emit an appropriate usage message.
- //
- if (args.length == 0)
- {
- System.out.println("Enter a list of file paths or URIs that have content like this:");
- try
- {
- Resource resource = resourceSet.createResource(URI.createURI("http:///My.reviews"));
- Comment root = ReviewsFactory.eINSTANCE.createComment();
- resource.getContents().add(root);
- resource.save(System.out, null);
- }
- catch (IOException exception)
- {
- exception.printStackTrace();
- }
- }
- else
- {
- // Iterate over all the arguments.
- //
- for (int i = 0; i < args.length; ++i)
- {
- // Construct the URI for the instance file.
- // The argument is treated as a file path only if it denotes an existing file.
- // Otherwise, it's directly treated as a URL.
- //
- File file = new File(args[i]);
- URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()) : URI.createURI(args[i]);
-
- try
- {
- // Demand load resource for this file.
- //
- Resource resource = resourceSet.getResource(uri, true);
- System.out.println("Loaded " + uri);
-
- // Validate the contents of the loaded resource.
- //
- for (EObject eObject : resource.getContents())
- {
- Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
- if (diagnostic.getSeverity() != Diagnostic.OK)
- {
- printDiagnostic(diagnostic, "");
- }
- }
- }
- catch (RuntimeException exception)
- {
- System.out.println("Problem loading " + uri);
- exception.printStackTrace();
- }
- }
- }
- }
-
- /**
- *
- * Prints diagnostics with indentation.
- *
- * @param diagnostic the diagnostic to print.
- * @param indent the indentation for printing.
- * @generated
- */
- protected static void printDiagnostic(Diagnostic diagnostic, String indent)
- {
- System.out.print(indent);
- System.out.println(diagnostic.getMessage());
- for (Diagnostic child : diagnostic.getChildren())
- {
- printDiagnostic(child, indent + " ");
- }
- }
-
-} // ReviewsExample
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewsTests.java b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewsTests.java
deleted file mode 100644
index 1213e942448..00000000000
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/ReviewsTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2023 Eike Stepper (Loehne, 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.lm.reviews.tests;
-
-/**
- *
- * A test suite for the 'reviews' package.
- *
- * @generated
- */
-public class ReviewsTests extends TestSuite
-{
-
- /**
- *
- *
- * @generated
- */
- public static void main(String[] args)
- {
- TestRunner.run(suite());
- }
-
- /**
- *
- *
- * @generated
- */
- public static TestSuite suite()
- {
- TestSuite suite = new ReviewsTests("reviews Tests");
- suite.addTestSuite(CommentTest.class);
- suite.addTestSuite(ReviewTemplateTest.class);
- suite.addTestSuite(DeliveryReviewTest.class);
- suite.addTestSuite(DropReviewTest.class);
- return suite;
- }
-
- /**
- *
- *
- * @generated
- */
- public ReviewsTests(String name)
- {
- super(name);
- }
-
-} // ReviewsTests
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/TestCase.java b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/TestCase.java
deleted file mode 100644
index 8ca9ee46359..00000000000
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/TestCase.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2023 Eike Stepper (Loehne, 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.lm.reviews.tests;
-
-/**
- * @author Eike Stepper
- */
-public class TestCase
-{
- private String name;
-
- public TestCase(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void fail()
- {
- throw new RuntimeException("Test failed");
- }
-
- protected void setUp() throws Exception
- {
- }
-
- protected void tearDown() throws Exception
- {
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/util/ReviewsAdapterFactory.java b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/util/ReviewsAdapterFactory.java
index 36b5625fb54..4f34771e84d 100644
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/util/ReviewsAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/util/ReviewsAdapterFactory.java
@@ -21,6 +21,7 @@
import org.eclipse.emf.cdo.lm.reviews.Commentable;
import org.eclipse.emf.cdo.lm.reviews.DeliveryReview;
import org.eclipse.emf.cdo.lm.reviews.DropReview;
+import org.eclipse.emf.cdo.lm.reviews.Heading;
import org.eclipse.emf.cdo.lm.reviews.Review;
import org.eclipse.emf.cdo.lm.reviews.ReviewTemplate;
import org.eclipse.emf.cdo.lm.reviews.ReviewsPackage;
@@ -104,6 +105,12 @@ public Adapter caseComment(Comment object)
return createCommentAdapter();
}
+ @Override
+ public Adapter caseHeading(Heading object)
+ {
+ return createHeadingAdapter();
+ }
+
@Override
public Adapter caseReviewTemplate(ReviewTemplate object)
{
@@ -221,6 +228,21 @@ public Adapter createCommentAdapter()
return null;
}
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.lm.reviews.Heading Heading}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.lm.reviews.Heading
+ * @generated
+ */
+ public Adapter createHeadingAdapter()
+ {
+ return null;
+ }
+
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.lm.reviews.ReviewTemplate Review Template}'.
*
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/util/ReviewsSwitch.java b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/util/ReviewsSwitch.java
index 51ee594d6a8..70108db6e7e 100644
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/util/ReviewsSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/util/ReviewsSwitch.java
@@ -21,6 +21,7 @@
import org.eclipse.emf.cdo.lm.reviews.Commentable;
import org.eclipse.emf.cdo.lm.reviews.DeliveryReview;
import org.eclipse.emf.cdo.lm.reviews.DropReview;
+import org.eclipse.emf.cdo.lm.reviews.Heading;
import org.eclipse.emf.cdo.lm.reviews.Review;
import org.eclipse.emf.cdo.lm.reviews.ReviewTemplate;
import org.eclipse.emf.cdo.lm.reviews.ReviewsPackage;
@@ -97,6 +98,10 @@ protected T doSwitch(int classifierID, EObject theEObject)
Commentable commentable = (Commentable)theEObject;
T result = caseCommentable(commentable);
if (result == null)
+ {
+ result = caseSystemElement(commentable);
+ }
+ if (result == null)
{
result = caseModelElement(commentable);
}
@@ -115,6 +120,10 @@ protected T doSwitch(int classifierID, EObject theEObject)
result = caseCommentable(comment);
}
if (result == null)
+ {
+ result = caseSystemElement(comment);
+ }
+ if (result == null)
{
result = caseModelElement(comment);
}
@@ -124,6 +133,32 @@ protected T doSwitch(int classifierID, EObject theEObject)
}
return result;
}
+ case ReviewsPackage.HEADING:
+ {
+ Heading heading = (Heading)theEObject;
+ T result = caseHeading(heading);
+ if (result == null)
+ {
+ result = caseComment(heading);
+ }
+ if (result == null)
+ {
+ result = caseCommentable(heading);
+ }
+ if (result == null)
+ {
+ result = caseSystemElement(heading);
+ }
+ if (result == null)
+ {
+ result = caseModelElement(heading);
+ }
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
case ReviewsPackage.REVIEW_TEMPLATE:
{
ReviewTemplate reviewTemplate = (ReviewTemplate)theEObject;
@@ -133,6 +168,10 @@ protected T doSwitch(int classifierID, EObject theEObject)
result = caseCommentable(reviewTemplate);
}
if (result == null)
+ {
+ result = caseSystemElement(reviewTemplate);
+ }
+ if (result == null)
{
result = caseModelElement(reviewTemplate);
}
@@ -297,6 +336,22 @@ public T caseComment(Comment object)
return null;
}
+ /**
+ * Returns the result of interpreting the object as an instance of 'Heading'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Heading'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHeading(Heading object)
+ {
+ return null;
+ }
+
/**
* Returns the result of interpreting the object as an instance of 'Review Template'.
*
diff --git a/plugins/org.eclipse.emf.cdo.lm.server/CDOServer (LM).launch b/plugins/org.eclipse.emf.cdo.lm.server/CDOServer (LM).launch
index 22d6477f740..91e0a12d2d1 100644
--- a/plugins/org.eclipse.emf.cdo.lm.server/CDOServer (LM).launch
+++ b/plugins/org.eclipse.emf.cdo.lm.server/CDOServer (LM).launch
@@ -94,6 +94,8 @@
+
+
diff --git a/plugins/org.eclipse.emf.cdo.lm.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.lm.server/META-INF/MANIFEST.MF
index 8d7f509cc98..510ea976f3e 100644
--- a/plugins/org.eclipse.emf.cdo.lm.server/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.lm.server/META-INF/MANIFEST.MF
@@ -1,22 +1,23 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.lm.server;singleton:=true
-Bundle-Version: 1.3.1.qualifier
+Bundle-Version: 1.4.0.qualifier
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.emf.cdo.lm.internal.server;version="1.3.1";x-internal:=true,
- org.eclipse.emf.cdo.lm.internal.server.bundle;version="1.3.1";x-internal:=true,
- org.eclipse.emf.cdo.lm.server;version="1.3.1"
+Export-Package: org.eclipse.emf.cdo.lm.internal.server;version="1.4.0";x-internal:=true,
+ org.eclipse.emf.cdo.lm.internal.server.bundle;version="1.4.0";x-internal:=true,
+ org.eclipse.emf.cdo.lm.server;version="1.4.0"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.emf.cdo.server;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.emf.cdo.server;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j.jvm;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.net4j;bundle-version="[4.0.0,5.0.0)",
org.eclipse.emf.cdo.server.embedded;bundle-version="[4.0.0,5.0.0)",
org.eclipse.emf.cdo.server.security;bundle-version="[4.0.0,5.0.0)";resolution:=optional,
- org.eclipse.emf.cdo.lm;bundle-version="[1.0.0,2.0.0)";visibility:=reexport
+ org.eclipse.emf.cdo.lm;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
+ org.eclipse.emf.cdo.lm.reviews;bundle-version="[1.0.0,2.0.0)";visibility:=reexport
Automatic-Module-Name: org.eclipse.emf.cdo.lm.server
Bundle-Activator: org.eclipse.emf.cdo.lm.internal.server.bundle.OM$Activator
diff --git a/plugins/org.eclipse.emf.cdo.lm.server/config/cdo-server.xml b/plugins/org.eclipse.emf.cdo.lm.server/config/cdo-server.xml
index 729752e8502..ceda4080d6c 100644
--- a/plugins/org.eclipse.emf.cdo.lm.server/config/cdo-server.xml
+++ b/plugins/org.eclipse.emf.cdo.lm.server/config/cdo-server.xml
@@ -125,6 +125,10 @@
+
+
+
+
diff --git a/plugins/org.eclipse.emf.cdo.lm.server/pom.xml b/plugins/org.eclipse.emf.cdo.lm.server/pom.xml
index ad11d376b26..d30be5a950b 100644
--- a/plugins/org.eclipse.emf.cdo.lm.server/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.lm.server/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.lm.server
- 1.3.1-SNAPSHOT
+ 1.4.0-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.lm.server/src/org/eclipse/emf/cdo/lm/server/AbstractLifecycleManager.java b/plugins/org.eclipse.emf.cdo.lm.server/src/org/eclipse/emf/cdo/lm/server/AbstractLifecycleManager.java
index 8fde073f7eb..ea4e1a5f4af 100644
--- a/plugins/org.eclipse.emf.cdo.lm.server/src/org/eclipse/emf/cdo/lm/server/AbstractLifecycleManager.java
+++ b/plugins/org.eclipse.emf.cdo.lm.server/src/org/eclipse/emf/cdo/lm/server/AbstractLifecycleManager.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.lm.server;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchRef;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion;
@@ -22,6 +23,7 @@
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
import org.eclipse.emf.cdo.common.util.CDOException;
import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.lm.FloatingBaseline;
import org.eclipse.emf.cdo.lm.LMFactory;
import org.eclipse.emf.cdo.lm.LMPackage;
import org.eclipse.emf.cdo.lm.Module;
@@ -38,6 +40,7 @@
import org.eclipse.emf.cdo.security.Role;
import org.eclipse.emf.cdo.security.User;
import org.eclipse.emf.cdo.server.CDOServerUtil;
+import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.IRepository.WriteAccessHandler;
import org.eclipse.emf.cdo.server.IRepositoryProtector;
import org.eclipse.emf.cdo.server.IStoreAccessor.CommitContext;
@@ -63,6 +66,7 @@
import org.eclipse.net4j.util.WrappedException;
import org.eclipse.net4j.util.collection.Pair;
import org.eclipse.net4j.util.container.IManagedContainer;
+import org.eclipse.net4j.util.event.Event;
import org.eclipse.net4j.util.factory.ProductCreationException;
import org.eclipse.net4j.util.lifecycle.ILifecycle;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
@@ -95,6 +99,7 @@
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
+import java.util.function.Predicate;
/**
* @author Eike Stepper
@@ -119,6 +124,10 @@ public abstract class AbstractLifecycleManager extends Lifecycle implements LMPa
private CDOSession systemSession;
+ private CDOView systemView;
+
+ private System system;
+
private String moduleDefinitionPath;
private final Map moduleRepositories = new HashMap<>();
@@ -130,13 +139,24 @@ public abstract class AbstractLifecycleManager extends Lifecycle implements LMPa
@Override
public void handleTransactionBeforeCommitting(ITransaction transaction, CommitContext commitContext, OMMonitor monitor) throws RuntimeException
{
- handleCommit(commitContext);
+ if (isMainBranch(commitContext))
+ {
+ handleCommit(commitContext);
+ }
}
@Override
public void handleTransactionAfterCommitted(ITransaction transaction, CommitContext commitContext, OMMonitor monitor)
{
- // Do nothing.
+ if (isMainBranch(commitContext))
+ {
+ fireEvent(new SystemCommitEvent(commitContext));
+ }
+ }
+
+ private boolean isMainBranch(CommitContext commitContext)
+ {
+ return commitContext.getBranchPoint().getBranch().isMainBranch();
}
};
@@ -160,6 +180,14 @@ public final IJVMConnector getConnector()
return connector;
}
+ /**
+ * @since 1.4
+ */
+ public final System getSystem()
+ {
+ return system;
+ }
+
public InternalRepository getSystemRepository()
{
return systemRepository;
@@ -257,6 +285,12 @@ protected void onDeactivated(ILifecycle lifecycle)
}
}
+ @Override
+ public String toString()
+ {
+ return super.toString() + "[system=" + systemName + "]";
+ }
+
@Override
protected void doBeforeActivate() throws Exception
{
@@ -297,6 +331,11 @@ protected void doActivate() throws Exception
List> moduleInfos = new ArrayList<>();
initSystemRepository(systemSession, (moduleName, moduleTypeName) -> moduleInfos.add(Pair.create(moduleName, moduleTypeName)));
+ systemView = systemSession.openView();
+
+ CDOResource systemResource = systemView.getResource(System.RESOURCE_PATH);
+ system = (System)systemResource.getContents().get(0);
+
for (Pair info : moduleInfos)
{
String moduleName = info.getElement1();
@@ -454,52 +493,9 @@ else if (eClass == STREAM)
addedContent -> handleBaselineAddition(commitContext, addedContent), //
removeFeatureDelta -> handleBaselineDeletion(commitContext, revisionDelta, removeFeatureDelta));
}
-
- // TODO Implement more server-side validations.
}
createNewModuleInfos(commitContext, newModules);
-
- // InternalCDORevision[] newObjects = commitContext.getNewObjects();
- // if (newObjects != null) {
- // for (int i = 0; i < newObjects.length; i++) {
- // InternalCDORevision addedStream = newObjects[i];
- // if (addedStream.getEClass() == STREAM) {
- // CDOID moduleID = (CDOID) addedStream.getContainerID();
- //
- // handleListDelta(commitContext, revision, MODULE__STREAMS, true, addedStream
- // -> {
- // CDOID streamID = addedStream.getID();
- // CDOID moduleID = (CDOID) addedStream.getContainerID();
- // CDOID baseDropID = (CDOID) addedStream.getValue(STREAM__BASE);
- //
- // // Fork and wait to avoid a mess with StoreThreadLocal.
- // long startTimeStamp = executeAgainstModuleSession(commitContext, moduleID,
- // session -> {
- // if (CDOIDUtil.isNull(baseDropID)) {
- // return session.getRepositoryInfo().getCreationTime();
- // }
- //
- // InternalCDORevision baseDrop = (InternalCDORevision) commitContext
- // .getRevision(baseDropID);
- // CDOBranchPointRef baseBranchPoint = (CDOBranchPointRef) baseDrop
- // .getValue(DROP__BRANCH_POINT);
- // return baseBranchPoint.getTimeStamp();
- // });
- //
- // commitContext.modify(context -> {
- // for (CDOIDAndVersion newObject : context.getChangeSetData().getNewObjects())
- // {
- // if (newObject.getID() == streamID) {
- // InternalCDORevision streamRevision = (InternalCDORevision) newObject;
- // streamRevision.set(STREAM__START_TIME_STAMP, 0, startTimeStamp);
- // }
- // }
- // });
- // });
- // }
- // }
- // }
}
}
@@ -558,38 +554,7 @@ protected void handleModuleDeletion(CommitContext commitContext, InternalCDORevi
protected void handleBaselineAddition(CommitContext commitContext, InternalCDORevision addedContent)
{
- // if (addedContent.getEClass() == DROP)
- // {
- // CDOID dropID = addedContent.getID();
- //
- // CDOID streamID = (CDOID)addedContent.getContainerID();
- // InternalCDORevision stream = (InternalCDORevision)commitContext.getRevision(streamID);
- //
- // String branchPath = getBranch(stream).getBranchPath();
- //
- // CDOID moduleID = (CDOID)stream.getContainerID();
- // AtomicReference moduleDefinitionHolder = new AtomicReference<>();
- //
- // // Fork and wait to avoid a mess with StoreThreadLocal.
- // CDOBranchPointRef branchPointRef = executeAgainstModuleSession(commitContext, moduleID, session -> {
- // CDOBranch branch = session.getBranchManager().getBranch(branchPath);
- // CDOBranchPoint branchPoint = branch.getPoint(commitContext.getBranchPoint().getTimeStamp());
- // return new CDOBranchPointRef(branchPoint);
- // });
- //
- // commitContext.modify(context -> {
- // CDOChangeSetData changeSetData = context.getChangeSetData();
- // List newObjects = changeSetData.getNewObjects();
- // for (CDOIDAndVersion newObject : newObjects)
- // {
- // if (newObject.getID() == dropID)
- // {
- // InternalCDORevision dropRevision = (InternalCDORevision)newObject;
- // dropRevision.set(DROP__BRANCH_POINT, 0, branchPointRef.getURI());
- // }
- // }
- // });
- // }
+ fireEvent(new NewBaselineEvent(commitContext, addedContent));
}
/**
@@ -614,29 +579,17 @@ protected void createNewModuleInfos(CommitContext commitContext, List {
for (CDOIDAndVersion newObject : context.getChangeSetData().getNewObjects())
{
if (newObject.getID() == initialStreamID)
{
InternalCDORevision streamRevision = (InternalCDORevision)newObject;
- streamRevision.set(STREAM__START_TIME_STAMP, 0, creationTime);
+ streamRevision.set(STREAM__START_TIME_STAMP, 0, moduleCreationTime);
}
}
});
@@ -707,6 +659,21 @@ protected void addModule(String moduleName, String moduleTypeName) throws Except
properties.put(LMRepositoryProperties.MODULE_NAME, moduleName);
properties.put(LMRepositoryProperties.MODULE_TYPE_NAME, moduleTypeName);
+ moduleRepository.addHandler(new WriteAccessHandler()
+ {
+ @Override
+ public void handleTransactionBeforeCommitting(ITransaction transaction, CommitContext commitContext, OMMonitor monitor) throws RuntimeException
+ {
+ // Do nothing.
+ }
+
+ @Override
+ public void handleTransactionAfterCommitted(ITransaction transaction, CommitContext commitContext, OMMonitor monitor)
+ {
+ fireEvent(new ModuleCommitEvent(moduleName, moduleTypeName, commitContext));
+ }
+ });
+
CDOServerUtil.addRepository(container, moduleRepository);
securitySupport.addModuleRepository(moduleRepository, moduleName, moduleTypeName);
moduleRepositories.put(moduleName, moduleRepository);
@@ -743,6 +710,32 @@ protected CDONet4jSessionConfiguration createSessionConfiguration(String reposit
return configuration;
}
+ private FloatingBaseline determineBaseline(String moduleName, CDOBranch branch)
+ {
+ CDOBranchRef branchRef = new CDOBranchRef(branch);
+ FloatingBaseline[] result = { null };
+
+ Module module = system.getModule(moduleName);
+ if (module != null)
+ {
+ module.forEachBaseline(baseline -> {
+ if (baseline instanceof FloatingBaseline)
+ {
+ FloatingBaseline floatingBaseline = (FloatingBaseline)baseline;
+ if (floatingBaseline.getBranch().equals(branchRef))
+ {
+ result[0] = floatingBaseline;
+ return true;
+ }
+ }
+
+ return false;
+ });
+ }
+
+ return result[0];
+ }
+
@SuppressWarnings("unused")
private R executeAgainstModuleSession(CommitContext commitContext, CDOID moduleID, Function function)
{
@@ -830,30 +823,52 @@ private static void deactivate(Map map)
map.clear();
}
- public static CDOBranchRef getBranch(CDORevision floatingBaseline)
+ private static AbstractLifecycleManager of(IManagedContainer container, Predicate predicate)
{
- String branchPath = null;
-
- EClass eClass = floatingBaseline.getEClass();
- if (eClass == STREAM)
+ for (Object element : container.getElements(AbstractLifecycleManager.Factory.PRODUCT_GROUP))
{
- branchPath = (String)floatingBaseline.data().get(STREAM__MAINTENANCE_BRANCH, 0);
- if (branchPath == null)
+ if (element instanceof AbstractLifecycleManager)
{
- branchPath = (String)floatingBaseline.data().get(STREAM__DEVELOPMENT_BRANCH, 0);
+ AbstractLifecycleManager lifecycleManager = (AbstractLifecycleManager)element;
+ if (predicate.test(lifecycleManager))
+ {
+ return lifecycleManager;
+ }
}
}
- else if (eClass == CHANGE)
- {
- branchPath = (String)floatingBaseline.data().get(CHANGE__BRANCH, 0);
- }
- if (branchPath == null)
- {
- return null;
- }
+ return null;
+ }
- return new CDOBranchRef(branchPath);
+ /**
+ * @since 1.4
+ */
+ public static AbstractLifecycleManager of(IManagedContainer container, String systemName)
+ {
+ return of(container, lm -> Objects.equals(lm.getSystemName(), systemName));
+ }
+
+ /**
+ * @since 1.4
+ */
+ public static AbstractLifecycleManager of(IManagedContainer container, IRepository repository)
+ {
+ return of(container, lm -> {
+ if (lm.getSystemRepository() == repository)
+ {
+ return true;
+ }
+
+ for (InternalRepository moduleRepository : lm.getModuleRepositories().values())
+ {
+ if (moduleRepository == repository)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ });
}
static
@@ -917,6 +932,38 @@ protected void addModule(String moduleName) throws Exception
throw new UnsupportedOperationException();
}
+ /**
+ * @deprecated As of 1.4 not used anymore. Doesn't work with DeliveryReviews.
+ */
+ @Deprecated
+ public static CDOBranchRef getBranch(CDORevision floatingBaseline)
+ {
+ // String branchPath = null;
+ //
+ // EClass eClass = floatingBaseline.getEClass();
+ // if (eClass == STREAM)
+ // {
+ // branchPath = (String)floatingBaseline.data().get(STREAM__MAINTENANCE_BRANCH, 0);
+ // if (branchPath == null)
+ // {
+ // branchPath = (String)floatingBaseline.data().get(STREAM__DEVELOPMENT_BRANCH, 0);
+ // }
+ // }
+ // else if (eClass == CHANGE)
+ // {
+ // branchPath = (String)floatingBaseline.data().get(CHANGE__BRANCH, 0);
+ // }
+ //
+ // if (branchPath == null)
+ // {
+ // return null;
+ // }
+ //
+ // return new CDOBranchRef(branchPath);
+
+ throw new UnsupportedOperationException();
+ }
+
/**
* @author Eike Stepper
* @since 1.2
@@ -966,6 +1013,165 @@ public String toString()
}
}
+ /**
+ * @author Eike Stepper
+ * @since 1.4
+ */
+ public final class ModuleCommitEvent extends Event
+ {
+ private static final long serialVersionUID = 1L;
+
+ private final String moduleName;
+
+ private final String moduleTypeName;
+
+ private final CommitContext commitContext;
+
+ private transient FloatingBaseline commitBaseline;
+
+ private ModuleCommitEvent(String moduleName, String moduleTypeName, CommitContext commitContext)
+ {
+ super(AbstractLifecycleManager.this);
+ this.moduleName = moduleName;
+ this.moduleTypeName = moduleTypeName;
+ this.commitContext = commitContext;
+ }
+
+ @Override
+ public AbstractLifecycleManager getSource()
+ {
+ return (AbstractLifecycleManager)super.getSource();
+ }
+
+ public String getSystemName()
+ {
+ return getSource().getSystemName();
+ }
+
+ public String getModuleName()
+ {
+ return moduleName;
+ }
+
+ public String getModuleTypeName()
+ {
+ return moduleTypeName;
+ }
+
+ public CommitContext getCommitContext()
+ {
+ return commitContext;
+ }
+
+ public CDOBranch getCommitBranch()
+ {
+ return commitContext.getBranchPoint().getBranch();
+ }
+
+ public FloatingBaseline getCommitBaseline()
+ {
+ if (commitBaseline == null)
+ {
+ CDOBranch branch = getCommitBranch();
+ commitBaseline = determineBaseline(moduleName, branch);
+ }
+
+ return commitBaseline;
+ }
+
+ @Override
+ protected String formatAdditionalParameters()
+ {
+ return "moduleName=" + moduleName + ", moduleTypeName=" + moduleTypeName + ", commitContext=" + commitContext;
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ * @since 1.4
+ */
+ public final class SystemCommitEvent extends Event
+ {
+ private static final long serialVersionUID = 1L;
+
+ private final CommitContext commitContext;
+
+ private SystemCommitEvent(CommitContext commitContext)
+ {
+ super(AbstractLifecycleManager.this);
+ this.commitContext = commitContext;
+ }
+
+ @Override
+ public AbstractLifecycleManager getSource()
+ {
+ return (AbstractLifecycleManager)super.getSource();
+ }
+
+ public String getSystemName()
+ {
+ return getSource().getSystemName();
+ }
+
+ public CommitContext getCommitContext()
+ {
+ return commitContext;
+ }
+
+ @Override
+ protected String formatAdditionalParameters()
+ {
+ return "commitContext=" + commitContext;
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ * @since 1.4
+ */
+ public final class NewBaselineEvent extends Event
+ {
+ private static final long serialVersionUID = 1L;
+
+ private final CommitContext commitContext;
+
+ private final CDORevision newBaseline;
+
+ private NewBaselineEvent(CommitContext commitContext, CDORevision newBaseline)
+ {
+ super(AbstractLifecycleManager.this);
+ this.commitContext = commitContext;
+ this.newBaseline = newBaseline;
+ }
+
+ @Override
+ public AbstractLifecycleManager getSource()
+ {
+ return (AbstractLifecycleManager)super.getSource();
+ }
+
+ public String getSystemName()
+ {
+ return getSource().getSystemName();
+ }
+
+ public CommitContext getCommitContext()
+ {
+ return commitContext;
+ }
+
+ public CDORevision getNewBaseline()
+ {
+ return newBaseline;
+ }
+
+ @Override
+ protected String formatAdditionalParameters()
+ {
+ return "commitContext=" + commitContext + ", newBaseline=" + newBaseline;
+ }
+ }
+
/**
* @author Eike Stepper
*/
diff --git a/plugins/org.eclipse.emf.cdo.lm.server/src/org/eclipse/emf/cdo/lm/server/LMAppExtension.java b/plugins/org.eclipse.emf.cdo.lm.server/src/org/eclipse/emf/cdo/lm/server/LMAppExtension.java
index af2083b2787..31ed9d884cb 100644
--- a/plugins/org.eclipse.emf.cdo.lm.server/src/org/eclipse/emf/cdo/lm/server/LMAppExtension.java
+++ b/plugins/org.eclipse.emf.cdo.lm.server/src/org/eclipse/emf/cdo/lm/server/LMAppExtension.java
@@ -15,6 +15,7 @@
import org.eclipse.emf.cdo.lm.ModuleType;
import org.eclipse.emf.cdo.lm.Process;
import org.eclipse.emf.cdo.lm.internal.server.bundle.OM;
+import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.spi.server.AppExtension;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.RepositoryConfigurator;
@@ -50,7 +51,7 @@ public class LMAppExtension extends AppExtension
"org.eclipse.emf.cdo.lm.server.LMAppExtension.DEFAULT_LIFECYCLE_MANAGER_TYPE", //
XMLLifecycleManager.Factory.DEFAULT_TYPE);
- private final Map lifecycleManagers = new HashMap<>();
+ private static final Map LIFECYCLE_MANAGERS = Collections.synchronizedMap(new HashMap<>());
public LMAppExtension()
{
@@ -82,7 +83,7 @@ protected void start(InternalRepository repository, Element repositoryConfig) th
@Override
protected void stop(InternalRepository repository) throws Exception
{
- XMLLifecycleManager lifecycleManager = lifecycleManagers.get(repository);
+ XMLLifecycleManager lifecycleManager = LIFECYCLE_MANAGERS.remove(repository);
if (lifecycleManager != null)
{
OM.LOG.info("Deactivating lifecycle manager of repository " + repository.getName());
@@ -93,13 +94,13 @@ protected void stop(InternalRepository repository) throws Exception
private void configureLifecycleManager(InternalRepository repository, Element lmElement)
{
String systemName = getAttribute(lmElement, "systemName");
- if (systemName == null || systemName.isEmpty())
+ if (StringUtil.isEmpty(systemName))
{
throw new IllegalStateException("A systemName must be specified for the lifecycle manager of repository " + repository.getName()); //$NON-NLS-1$
}
String moduleDefinitionPath = getAttribute(lmElement, "moduleDefinitionPath");
- if (moduleDefinitionPath == null || moduleDefinitionPath.isEmpty())
+ if (StringUtil.isEmpty(moduleDefinitionPath))
{
moduleDefinitionPath = "module.md";
}
@@ -129,7 +130,7 @@ private void configureLifecycleManager(InternalRepository repository, Element lm
OM.LOG.info("Activating lifecycle manager of repository " + repository.getName());
lifecycleManager.activate();
- lifecycleManagers.put(repository, lifecycleManager);
+ LIFECYCLE_MANAGERS.put(repository, lifecycleManager);
}
/**
@@ -144,7 +145,7 @@ protected XMLLifecycleManager createLifecycleManager(InternalRepository reposito
{
IManagedContainer container = repository.getContainer();
String lifecycleManagerType = getDefaultLifecycleManagerType();
- return getContainerElement(lmElement, lifecycleManagerType, container);
+ return getContainerElement(lmElement, lifecycleManagerType, "systemName", container);
}
/**
@@ -248,7 +249,7 @@ private Collection getNamedChildren(Element lmElement, String childTagNam
return result;
}
- private T getContainerElement(Element element, String defaultType, IManagedContainer container)
+ private T getContainerElement(Element element, String defaultType, String descriptionAttribute, IManagedContainer container)
{
String type = getAttribute(element, "type"); //$NON-NLS-1$
if (StringUtil.isEmpty(type))
@@ -256,7 +257,12 @@ private T getContainerElement(Element element, String defaultType, IManagedC
type = defaultType;
}
- String description = getAttribute(element, "description"); //$NON-NLS-1$
+ if (StringUtil.isEmpty(descriptionAttribute))
+ {
+ descriptionAttribute = "description";//$NON-NLS-1$
+ }
+
+ String description = getAttribute(element, descriptionAttribute);
if (StringUtil.isEmpty(description))
{
Map properties = RepositoryConfigurator.getProperties(element, 1, null, container);
@@ -269,6 +275,14 @@ private T getContainerElement(Element element, String defaultType, IManagedC
return containerElement;
}
+ /**
+ * @since 1.4
+ */
+ public static XMLLifecycleManager getLifecycleManager(IRepository repository)
+ {
+ return LIFECYCLE_MANAGERS.get(repository);
+ }
+
/**
* @deprecated As of 1.2 no longer supported.
*/
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.lm.ui/.settings/org.eclipse.jdt.core.prefs
index 4fb4d146356..70935027c46 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/.settings/org.eclipse.jdt.core.prefs
@@ -132,7 +132,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.lm.ui/META-INF/MANIFEST.MF
index 654940acf3a..5225e6e9f54 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/META-INF/MANIFEST.MF
@@ -3,21 +3,21 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.lm.ui;singleton:=true
Automatic-Module-Name: org.eclipse.emf.cdo.lm.ui
-Bundle-Version: 1.0.3.qualifier
+Bundle-Version: 1.0.4.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.emf.cdo.lm.ui.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.emf.cdo.lm.ui;version="1.0.3";x-internal:=true,
- org.eclipse.emf.cdo.lm.ui.actions;version="1.0.3";x-internal:=true,
- org.eclipse.emf.cdo.lm.ui.bundle;version="1.0.3";x-internal:=true,
- org.eclipse.emf.cdo.lm.ui.decorators;version="1.0.3";x-internal:=true,
- org.eclipse.emf.cdo.lm.ui.dialogs;version="1.0.3";x-internal:=true,
- org.eclipse.emf.cdo.lm.ui.properties;version="1.0.3";x-internal:=true,
- org.eclipse.emf.cdo.lm.ui.providers;version="1.0.3";x-internal:=true,
- org.eclipse.emf.cdo.lm.ui.views;version="1.0.3";x-internal:=true,
- org.eclipse.emf.cdo.lm.ui.widgets;version="1.0.3";x-internal:=true
+Export-Package: org.eclipse.emf.cdo.lm.ui;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui",
+ org.eclipse.emf.cdo.lm.ui.actions;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui",
+ org.eclipse.emf.cdo.lm.ui.bundle;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui",
+ org.eclipse.emf.cdo.lm.ui.decorators;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui",
+ org.eclipse.emf.cdo.lm.ui.dialogs;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui",
+ org.eclipse.emf.cdo.lm.ui.properties;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui",
+ org.eclipse.emf.cdo.lm.ui.providers;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui",
+ org.eclipse.emf.cdo.lm.ui.views;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui",
+ org.eclipse.emf.cdo.lm.ui.widgets;version="1.0.4";x-friends:="org.eclipse.emf.cdo.lm.reviews.ui"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.equinox.p2.metadata;bundle-version="[2.3.0,3.0.0)",
org.eclipse.net4j.util.ui;bundle-version="[3.0.0,4.0.0)",
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/plugin.properties b/plugins/org.eclipse.emf.cdo.lm.ui/plugin.properties
index 5cc1de0edd3..9fb9b73ab30 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/plugin.properties
@@ -13,7 +13,7 @@ providerName = Eclipse Modeling Project
view.name = Systems
view.name.0 = Module Checkouts
decorator.label = Available Updates Decorator
-command.name = Install Updates
-command.label = Install Updates...
-command.tooltip = Install the available updates into the checkout
+install.updates.name = Install Updates
+install.updates.label = Install Updates...
+install.updates.tooltip = Install the available updates into the checkout
page.name = Module
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/plugin.xml b/plugins/org.eclipse.emf.cdo.lm.ui/plugin.xml
index abd7881d042..228f510ad64 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/plugin.xml
@@ -67,7 +67,7 @@
@@ -92,9 +92,9 @@
+ tooltip="%install.updates.tooltip">
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/pom.xml b/plugins/org.eclipse.emf.cdo.lm.ui/pom.xml
index a99d8133b03..982bef94088 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.lm.ui
- 1.0.3-SNAPSHOT
+ 1.0.4-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/CheckoutAction.java b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/CheckoutAction.java
index 04054873ef7..248061a763f 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/CheckoutAction.java
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/CheckoutAction.java
@@ -15,6 +15,10 @@
import org.eclipse.emf.cdo.lm.provider.LMEditPlugin;
import org.eclipse.emf.cdo.lm.ui.bundle.OM;
+import org.eclipse.net4j.util.StringUtil;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
@@ -30,17 +34,22 @@ public class CheckoutAction extends LMAction
{
private String checkoutLabel;
- public CheckoutAction(IWorkbenchPage page, String text, Baseline baseline)
+ public CheckoutAction(IWorkbenchPage page, ResourceLocator resourceLocator, String text, Baseline baseline)
{
super(page, //
text == null ? "Checkout " + baseline.getTypeAndName() + INTERACTIVE : text, //
- "Create a checkout for the selected " + LMEditPlugin.INSTANCE.getString("_UI_" + baseline.eClass().getName() + "_type").toLowerCase(), //
+ "Create a checkout for the selected " + resourceLocator.getString("_UI_" + baseline.eClass().getName() + "_type").toLowerCase(), //
OM.getImageDescriptor("icons/checkout.gif"), //
- "Create a checkout for the selected " + LMEditPlugin.INSTANCE.getString("_UI_" + baseline.eClass().getName() + "_type").toLowerCase() + ".", //
+ "Create a checkout for the selected " + resourceLocator.getString("_UI_" + baseline.eClass().getName() + "_type").toLowerCase() + ".", //
"icons/Checkout.png", //
baseline);
}
+ public CheckoutAction(IWorkbenchPage page, String text, Baseline baseline)
+ {
+ this(page, LMEditPlugin.INSTANCE, text, baseline);
+ }
+
public CheckoutAction(IWorkbenchPage page, Baseline baseline)
{
this(page, null, baseline);
@@ -66,6 +75,7 @@ protected void fillDialogArea(LMDialog dialog, Composite parent)
Text checkoutLabelText = new Text(parent, SWT.BORDER | SWT.SINGLE);
checkoutLabelText.setLayoutData(GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).create());
checkoutLabelText.setText(checkoutLabel);
+ checkoutLabelText.selectAll();
checkoutLabelText.addModifyListener(e -> {
checkoutLabel = checkoutLabelText.getText();
validateDialog();
@@ -89,7 +99,7 @@ protected String doValidate(LMDialog dialog)
@Override
protected void doRun(Baseline baseline, IProgressMonitor progressMonitor) throws Exception
{
- checkout(baseline, progressMonitor);
+ checkout(baseline, checkoutLabel, progressMonitor);
}
public static String getCheckoutLabel(Baseline baseline)
@@ -97,9 +107,13 @@ public static String getCheckoutLabel(Baseline baseline)
return "Module " + baseline.getModule().getName() + " - " + baseline.getTypeAndName();
}
- public static void checkout(Baseline baseline, IProgressMonitor monitor) throws Exception
+ public static void checkout(Baseline baseline, String checkoutLabel, IProgressMonitor monitor) throws Exception
{
- String checkoutLabel = getCheckoutLabel(baseline);
+ if (StringUtil.isEmpty(checkoutLabel))
+ {
+ checkoutLabel = getCheckoutLabel(baseline);
+ }
+
IAssemblyManager.INSTANCE.createDescriptor(checkoutLabel, baseline, monitor);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/LMAction.java b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/LMAction.java
index 669542d1c1e..289dbd90900 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/LMAction.java
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/LMAction.java
@@ -22,6 +22,8 @@
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -102,13 +104,18 @@ protected Image getBannerImage(LMDialog dialog)
{
if (bannerImage == null && bannerImagePath != null)
{
- ImageDescriptor descriptor = OM.Activator.INSTANCE.loadImageDescriptor(bannerImagePath);
+ ImageDescriptor descriptor = getImageDescriptor(bannerImagePath);
bannerImage = descriptor.createImage(getDisplay());
}
return bannerImage;
}
+ protected ImageDescriptor getImageDescriptor(String imagePath)
+ {
+ return OM.Activator.INSTANCE.loadImageDescriptor(imagePath);
+ }
+
protected boolean isDialogNeeded()
{
return true;
@@ -203,6 +210,12 @@ protected Point getInitialLocation(Point initialSize)
return LMAction.this.getInitialLocation(this, initialSize);
}
+ @Override
+ protected boolean isResizable()
+ {
+ return true;
+ }
+
@Override
protected void configureShell(Shell newShell)
{
@@ -274,4 +287,31 @@ private void _configureShell(Shell newShell)
super.configureShell(newShell);
}
}
+
+ /**
+ * @author Eike Stepper
+ */
+ public static abstract class NewElement extends LMAction
+ {
+ private final StructuredViewer viewer;
+
+ public NewElement(IWorkbenchPage page, StructuredViewer viewer, String text, String toolTipText, ImageDescriptor image, String bannerMessage,
+ String bannerImagePath, CONTEXT context)
+ {
+ super(page, text, toolTipText, image, bannerMessage, bannerImagePath, context);
+ this.viewer = viewer;
+ }
+
+ @Override
+ protected final void doRun(CONTEXT context, IProgressMonitor monitor) throws Exception
+ {
+ CDOObject element = newElement(context, monitor);
+ if (element != null)
+ {
+ UIUtil.asyncExec(() -> viewer.setSelection(new StructuredSelection(element)));
+ }
+ }
+
+ protected abstract CDOObject newElement(CONTEXT context, IProgressMonitor monitor) throws Exception;
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewChangeAction.java b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewChangeAction.java
index a40761f68df..e4724e2ad4e 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewChangeAction.java
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewChangeAction.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.lm.ui.actions;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.lm.Baseline;
import org.eclipse.emf.cdo.lm.Change;
@@ -32,6 +33,7 @@
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
@@ -43,7 +45,7 @@
/**
* @author Eike Stepper
*/
-public class NewChangeAction extends LMAction
+public class NewChangeAction extends LMAction.NewElement
{
private ISystemDescriptor systemDescriptor;
@@ -63,9 +65,9 @@ public class NewChangeAction extends LMAction
private Text checkoutLabelText;
- public NewChangeAction(IWorkbenchPage page, Stream stream, FixedBaseline base)
+ public NewChangeAction(IWorkbenchPage page, StructuredViewer viewer, Stream stream, FixedBaseline base)
{
- super(page, //
+ super(page, viewer, //
"New Change" + INTERACTIVE, //
"Add a new change to stream '" + stream.getName() + "'", //
ExtendedImageRegistry.INSTANCE.getImageDescriptor(LMEditPlugin.INSTANCE.getImage("full/obj16/Change")), //
@@ -220,7 +222,7 @@ protected String doValidate(LMDialog dialog)
}
@Override
- protected void doRun(Stream stream, IProgressMonitor monitor) throws Exception
+ protected CDOObject newElement(Stream stream, IProgressMonitor monitor) throws Exception
{
monitor.beginTask("", checkout ? 2 : 1);
@@ -232,7 +234,7 @@ protected void doRun(Stream stream, IProgressMonitor monitor) throws Exception
{
try
{
- CheckoutAction.checkout(change, SubMonitor.convert(monitor, 1));
+ CheckoutAction.checkout(change, checkoutLabelString, SubMonitor.convert(monitor, 1));
}
catch (Exception ex)
{
@@ -246,6 +248,7 @@ protected void doRun(Stream stream, IProgressMonitor monitor) throws Exception
}
monitor.done();
+ return change;
}
private String getCheckoutLabel()
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewDeliveryAction.java b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewDeliveryAction.java
index 919f8125dce..428498f1188 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewDeliveryAction.java
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewDeliveryAction.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.lm.ui.actions;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
import org.eclipse.emf.cdo.lm.Baseline;
import org.eclipse.emf.cdo.lm.Change;
@@ -31,6 +32,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
@@ -41,7 +43,7 @@
/**
* @author Eike Stepper
*/
-public class NewDeliveryAction extends LMAction
+public class NewDeliveryAction extends LMAction.NewElement
{
private static final LMMerger2 MERGER = new InteractiveDeliveryMerger();
@@ -59,9 +61,9 @@ public class NewDeliveryAction extends LMAction
private Button deleteCheckoutsButton;
- public NewDeliveryAction(IWorkbenchPage page, Stream stream, Change change)
+ public NewDeliveryAction(IWorkbenchPage page, StructuredViewer viewer, Stream stream, Change change)
{
- super(page, //
+ super(page, viewer, //
(change == null ? "New Delivery" : "Deliver to " + stream.getTypeAndName()) + INTERACTIVE, //
"Add a new delivery to stream '" + stream.getName() + "'", //
ExtendedImageRegistry.INSTANCE.getImageDescriptor(LMEditPlugin.INSTANCE.getImage("full/obj16/Delivery")), //
@@ -180,7 +182,7 @@ protected String doValidate(LMDialog dialog)
}
@Override
- protected void doRun(Stream stream, IProgressMonitor monitor) throws Exception
+ protected CDOObject newElement(Stream stream, IProgressMonitor monitor) throws Exception
{
Delivery delivery = systemDescriptor.createDelivery(stream, change, MERGER, monitor);
@@ -199,5 +201,7 @@ protected void doRun(Stream stream, IProgressMonitor monitor) throws Exception
}
}
}
+
+ return delivery;
}
}
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewDropAction.java b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewDropAction.java
index 430da8da236..ee9aeb8abf1 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewDropAction.java
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewDropAction.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.lm.ui.actions;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.lm.Drop;
import org.eclipse.emf.cdo.lm.DropType;
@@ -31,6 +32,7 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
@@ -42,7 +44,7 @@
/**
* @author Eike Stepper
*/
-public class NewDropAction extends LMAction
+public class NewDropAction extends LMAction.NewElement
{
private static final long INVALID_DATE = CDOBranchPoint.INVALID_DATE;
@@ -66,9 +68,9 @@ public class NewDropAction extends LMAction
private Text labelText;
- public NewDropAction(IWorkbenchPage page, Stream stream, DropType dropType)
+ public NewDropAction(IWorkbenchPage page, StructuredViewer viewer, Stream stream, DropType dropType)
{
- super(page, //
+ super(page, viewer, //
"New " + dropType.getName() + INTERACTIVE, //
"Add a new " + dropType.getName().toLowerCase() + " to stream '" + stream.getName() + "'", //
ExtendedImageRegistry.INSTANCE.getImageDescriptor(LMEditPlugin.INSTANCE.getImage(dropType.isRelease() ? "full/obj16/Release" : "full/obj16/Drop")), //
@@ -160,9 +162,9 @@ protected String doValidate(LMDialog dialog)
}
@Override
- protected void doRun(Stream stream, IProgressMonitor monitor) throws Exception
+ protected CDOObject newElement(Stream stream, IProgressMonitor monitor) throws Exception
{
- systemDescriptor.createDrop(stream, dropType, timeStamp, labelString, monitor);
+ return systemDescriptor.createDrop(stream, dropType, timeStamp, labelString, monitor);
}
private void scheduleVersionExtraction(FloatingBaseline baseline)
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewModuleAction.java b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewModuleAction.java
index 97ce8f73e57..40fcb311c09 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewModuleAction.java
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewModuleAction.java
@@ -10,7 +10,9 @@
*/
package org.eclipse.emf.cdo.lm.ui.actions;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.lm.LMFactory;
+import org.eclipse.emf.cdo.lm.Module;
import org.eclipse.emf.cdo.lm.ModuleType;
import org.eclipse.emf.cdo.lm.Process;
import org.eclipse.emf.cdo.lm.System;
@@ -30,6 +32,7 @@
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
@@ -42,7 +45,7 @@
/**
* @author Eike Stepper
*/
-public class NewModuleAction extends LMAction
+public class NewModuleAction extends LMAction.NewElement
{
private static final ModuleType NO_MODULE_TYPE = LMFactory.eINSTANCE.createModuleType("");
@@ -54,9 +57,9 @@ public class NewModuleAction extends LMAction
private CommonStreamParameters streamParameters;
- public NewModuleAction(IWorkbenchPage page, System system)
+ public NewModuleAction(IWorkbenchPage page, TreeViewer viewer, System system)
{
- super(page, //
+ super(page, viewer, //
"New Module" + INTERACTIVE, //
"Add a new module to system '" + system.getName() + "'", //
ExtendedImageRegistry.INSTANCE.getImageDescriptor(LMEditPlugin.INSTANCE.getImage("full/obj16/Module")), //
@@ -166,9 +169,10 @@ protected String doValidate(LMDialog dialog)
}
@Override
- protected void doRun(System system, IProgressMonitor monitor) throws Exception
+ protected CDOObject newElement(System system, IProgressMonitor monitor) throws Exception
{
- systemDescriptor.createModule(name, type, streamParameters, monitor);
+ Module module = systemDescriptor.createModule(name, type, streamParameters, monitor);
+ return module.getStreams().get(0);
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewStreamAction.java b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewStreamAction.java
index ba158099ff2..88e3d53b2dd 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewStreamAction.java
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/actions/NewStreamAction.java
@@ -31,6 +31,7 @@
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
@@ -40,7 +41,7 @@
/**
* @author Eike Stepper
*/
-public class NewStreamAction extends LMAction
+public class NewStreamAction extends LMAction.NewElement
{
private static final int INVALID_VERSION = -1;
@@ -58,9 +59,9 @@ public class NewStreamAction extends LMAction
private CommonStreamParameters streamParameters;
- public NewStreamAction(IWorkbenchPage page, AdapterFactory adapterFactory, Module module)
+ public NewStreamAction(IWorkbenchPage page, StructuredViewer viewer, AdapterFactory adapterFactory, Module module)
{
- super(page, //
+ super(page, viewer, //
"New Stream" + INTERACTIVE, //
"Add a new stream to module '" + module.getName() + "'", //
ExtendedImageRegistry.INSTANCE.getImageDescriptor(LMEditPlugin.INSTANCE.getImage("full/obj16/Stream")), //
@@ -168,9 +169,9 @@ protected String doValidate(LMDialog dialog)
}
@Override
- protected void doRun(Module module, IProgressMonitor monitor) throws Exception
+ protected CDOObject newElement(Module module, IProgressMonitor monitor) throws Exception
{
- systemDescriptor.createStream(module, base, streamParameters, monitor);
+ return systemDescriptor.createStream(module, base, streamParameters, monitor);
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/views/SystemsView.java b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/views/SystemsView.java
index 322e3205dfa..44af8884f8f 100644
--- a/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/views/SystemsView.java
+++ b/plugins/org.eclipse.emf.cdo.lm.ui/src/org/eclipse/emf/cdo/lm/ui/views/SystemsView.java
@@ -12,6 +12,8 @@
import org.eclipse.emf.cdo.lm.Baseline;
import org.eclipse.emf.cdo.lm.Change;
+import org.eclipse.emf.cdo.lm.Delivery;
+import org.eclipse.emf.cdo.lm.Drop;
import org.eclipse.emf.cdo.lm.DropType;
import org.eclipse.emf.cdo.lm.FixedBaseline;
import org.eclipse.emf.cdo.lm.Module;
@@ -38,8 +40,10 @@
import org.eclipse.net4j.ui.shared.SharedIcons;
import org.eclipse.net4j.util.container.ContainerEventAdapter;
import org.eclipse.net4j.util.container.IContainer;
+import org.eclipse.net4j.util.container.IPluginContainer;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.net4j.util.ui.MenuFiller;
import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.net4j.util.ui.actions.SafeAction;
import org.eclipse.net4j.util.ui.views.MultiViewersView;
@@ -63,6 +67,7 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
@@ -187,7 +192,7 @@ public void run()
else if (element instanceof System)
{
System system = (System)element;
- manager.add(new NewModuleAction(page, system));
+ manager.add(new NewModuleAction(page, treeViewer, system));
manager.add(new Action("Close")
{
@@ -202,41 +207,43 @@ public void run()
else if (element instanceof Module)
{
Module module = (Module)element;
- manager.add(new NewStreamAction(page, adapterFactory, module));
+ manager.add(new NewStreamAction(page, treeViewer, adapterFactory, module));
manager.add(new DeleteModuleAction(page, module));
}
else if (element instanceof Baseline)
{
Baseline baseline = (Baseline)element;
- manager.add(new CheckoutAction(page, baseline));
- manager.add(new Separator());
-
- if (baseline instanceof FixedBaseline)
+ if (baseline instanceof Delivery || baseline instanceof Drop)
{
FixedBaseline fixedBaseline = (FixedBaseline)baseline;
- Stream stream = fixedBaseline.getStream();
+ manager.add(new CheckoutAction(page, baseline));
+ manager.add(new Separator());
- manager.add(new NewChangeAction(page, stream, fixedBaseline));
+ Stream stream = fixedBaseline.getStream();
+ manager.add(new NewChangeAction(page, treeViewer, stream, fixedBaseline));
manager.add(new Separator());
}
else if (baseline instanceof Stream)
{
Stream stream = (Stream)baseline;
-
- manager.add(new NewChangeAction(page, stream, null));
- manager.add(new NewDeliveryAction(page, stream, null));
+ manager.add(new CheckoutAction(page, baseline));
+ manager.add(new Separator());
+ manager.add(new NewChangeAction(page, treeViewer, stream, null));
+ manager.add(new NewDeliveryAction(page, treeViewer, stream, null));
manager.add(new Separator());
EList possibleDropTypes = stream.getSystem().getProcess().getDropTypes();
for (DropType dropType : possibleDropTypes)
{
- manager.add(new NewDropAction(page, stream, dropType));
+ manager.add(new NewDropAction(page, treeViewer, stream, dropType));
}
}
else if (baseline instanceof Change)
{
Change change = (Change)baseline;
+ manager.add(new CheckoutAction(page, baseline));
+ manager.add(new Separator());
if (change.getDeliveries().isEmpty())
{
@@ -248,13 +255,18 @@ else if (baseline instanceof Change)
{
if (change.getDeliveryPoint(s) == null)
{
- manager.add(new NewDeliveryAction(page, s, change));
+ manager.add(new NewDeliveryAction(page, treeViewer, s, change));
}
}
}
}
- manager.add(new Separator());
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+
+ IPluginContainer.INSTANCE.forEachElement( //
+ MenuFiller.Factory.PRODUCT_GROUP, MenuFiller.class, //
+ filler -> filler.fillMenu(page, viewer, manager, element));
+
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.lm/.settings/.api_filters b/plugins/org.eclipse.emf.cdo.lm/.settings/.api_filters
index b71167fb172..3f55e146cb9 100644
--- a/plugins/org.eclipse.emf.cdo.lm/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo.lm/.settings/.api_filters
@@ -48,6 +48,14 @@
+
+
+
+
+
+
+
+
diff --git a/plugins/org.eclipse.emf.cdo.lm/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.lm/META-INF/MANIFEST.MF
index a2276945e4d..46ea2eb41bf 100644
--- a/plugins/org.eclipse.emf.cdo.lm/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.lm/META-INF/MANIFEST.MF
@@ -1,16 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.lm;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.emf.cdo.lm;version="1.2.0",
- org.eclipse.emf.cdo.lm.impl;version="1.2.0",
- org.eclipse.emf.cdo.lm.util;version="1.2.0"
+Export-Package: org.eclipse.emf.cdo.lm;version="1.3.0",
+ org.eclipse.emf.cdo.lm.impl;version="1.3.0",
+ org.eclipse.emf.cdo.lm.util;version="1.3.0"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.lm.modules;bundle-version="[1.0.0,2.0.0)";visibility:=reexport
diff --git a/plugins/org.eclipse.emf.cdo.lm/model/LM.aird b/plugins/org.eclipse.emf.cdo.lm/model/LM.aird
index f87f1530f38..dd7560d3d91 100644
--- a/plugins/org.eclipse.emf.cdo.lm/model/LM.aird
+++ b/plugins/org.eclipse.emf.cdo.lm/model/LM.aird
@@ -8,7 +8,7 @@
platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore
-
+
@@ -389,7 +389,7 @@
-
+
@@ -636,7 +636,7 @@
-
+
@@ -700,7 +700,7 @@
-
+
@@ -859,7 +859,7 @@
-
+
diff --git a/plugins/org.eclipse.emf.cdo.lm/model/LM.genmodel b/plugins/org.eclipse.emf.cdo.lm/model/LM.genmodel
index 9ce3d13b10a..287490cbcc5 100644
--- a/plugins/org.eclipse.emf.cdo.lm/model/LM.genmodel
+++ b/plugins/org.eclipse.emf.cdo.lm/model/LM.genmodel
@@ -112,7 +112,8 @@
-
+
diff --git a/plugins/org.eclipse.emf.cdo.lm/pom.xml b/plugins/org.eclipse.emf.cdo.lm/pom.xml
index 5a0de5cc609..ec247c9f620 100644
--- a/plugins/org.eclipse.emf.cdo.lm/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.lm/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.lm
- 1.2.0-SNAPSHOT
+ 1.3.0-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Baseline.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Baseline.java
index 8a7d49e7719..5d8730160ea 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Baseline.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Baseline.java
@@ -36,8 +36,11 @@
*/
public interface Baseline extends StreamElement
{
- public static final Comparator COMPARATOR = Comparator.comparingLong(BaselineImpl::time).thenComparingInt(BaselineImpl::change)
- .thenComparing(BaselineImpl::name).reversed();
+ public static final Comparator COMPARATOR = //
+ Comparator.comparingLong(BaselineImpl::time) //
+ .thenComparingInt(BaselineImpl::type) //
+ .thenComparing(BaselineImpl::name) //
+ .reversed();
/**
* Returns the value of the 'Stream' container reference.
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Module.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Module.java
index 087857f8d96..fd6ddcb6edb 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Module.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Module.java
@@ -16,6 +16,7 @@
import java.util.Comparator;
import java.util.function.Consumer;
+import java.util.function.Predicate;
/**
* A representation of the model object
@@ -129,4 +130,9 @@ public interface Module extends SystemElement
public void forEachBaseline(Consumer consumer);
+ /**
+ * @since 1.3
+ */
+ public boolean forEachBaseline(Predicate predicate);
+
} // Module
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Stream.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Stream.java
index 0670a621be3..e5dae0bf6dc 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Stream.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/Stream.java
@@ -16,6 +16,7 @@
import org.eclipse.emf.common.util.EList;
import java.util.function.Consumer;
+import java.util.function.Predicate;
/**
* A representation of the model object
@@ -340,6 +341,11 @@ public interface Stream extends FloatingBaseline
public void forEachBaseline(Consumer consumer);
+ /**
+ * @since 1.3
+ */
+ public boolean forEachBaseline(Predicate predicate);
+
public Baseline getBaseline(String baselineName);
public Delivery getDelivery(Change change);
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/System.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/System.java
index 6eb5325280a..d333ce9a1fe 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/System.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/System.java
@@ -15,6 +15,7 @@
import org.eclipse.emf.common.util.EList;
import java.util.function.Consumer;
+import java.util.function.Predicate;
/**
* A representation of the model object
@@ -113,4 +114,9 @@ public interface System extends ModelElement
public void forEachBaseline(Consumer consumer);
+ /**
+ * @since 1.3
+ */
+ public boolean forEachBaseline(Predicate predicate);
+
} // System
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/BaselineImpl.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/BaselineImpl.java
index e9a1144f815..f448702cd62 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/BaselineImpl.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/BaselineImpl.java
@@ -15,6 +15,8 @@
import org.eclipse.emf.cdo.etypes.impl.ModelElementImpl;
import org.eclipse.emf.cdo.lm.Baseline;
import org.eclipse.emf.cdo.lm.Change;
+import org.eclipse.emf.cdo.lm.Delivery;
+import org.eclipse.emf.cdo.lm.Drop;
import org.eclipse.emf.cdo.lm.LMPackage;
import org.eclipse.emf.cdo.lm.Module;
import org.eclipse.emf.cdo.lm.Stream;
@@ -339,6 +341,34 @@ public static long time(Object o)
return CDOBranchPoint.UNSPECIFIED_DATE;
}
+ /**
+ * @since 1.3
+ */
+ public static int type(Object o)
+ {
+ if (o instanceof Change)
+ {
+ return 500;
+ }
+
+ if (o instanceof Drop)
+ {
+ return ((Drop)o).isRelease() ? 400 : 300;
+ }
+
+ if (o instanceof Delivery)
+ {
+ return 200;
+ }
+
+ if (o instanceof ExtendedBaseline)
+ {
+ return ((ExtendedBaseline)o).getSortPriority();
+ }
+
+ return 10000; // Unknown.
+ }
+
public static int change(Object o)
{
if (o instanceof Change)
@@ -349,4 +379,20 @@ public static int change(Object o)
return 0;
}
+ /**
+ * @since 1.3
+ */
+ public static int extended(Object o)
+ {
+ if (o instanceof Baseline)
+ {
+ if (!(o instanceof Stream || o instanceof Change || o instanceof Delivery || o instanceof Drop))
+ {
+ return 1;
+ }
+ }
+
+ return 0;
+ }
+
} // BaselineImpl
diff --git a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/TestSuite.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/ExtendedBaseline.java
similarity index 53%
rename from plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/TestSuite.java
rename to plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/ExtendedBaseline.java
index b13de703af1..eb3bd80c2f3 100644
--- a/plugins/org.eclipse.emf.cdo.lm.reviews/src/org/eclipse/emf/cdo/lm/reviews/tests/TestSuite.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/ExtendedBaseline.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2024 Eike Stepper (Loehne, 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
@@ -8,26 +8,15 @@
* Contributors:
* Eike Stepper - initial API and implementation
*/
-package org.eclipse.emf.cdo.lm.reviews.tests;
+package org.eclipse.emf.cdo.lm.impl;
+
+import org.eclipse.emf.cdo.lm.Baseline;
/**
* @author Eike Stepper
+ * @since 1.3
*/
-public class TestSuite
+public interface ExtendedBaseline extends Baseline
{
- private String name;
-
- public TestSuite(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void addTestSuite(Class> c)
- {
- }
+ public int getSortPriority();
}
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/FixedBaselineImpl.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/FixedBaselineImpl.java
index d6da32ddd95..3fc5d7c5f6c 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/FixedBaselineImpl.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/FixedBaselineImpl.java
@@ -115,24 +115,7 @@ public EList getDependencies()
@Override
public EList getBasedChanges()
{
- EList result = new BasicEList<>();
-
- for (Stream stream : getModule().getStreams())
- {
- for (Baseline baseline : stream.getContents())
- {
- if (baseline instanceof Change)
- {
- Change change = (Change)baseline;
- if (change.getBase() == this)
- {
- result.add(change);
- }
- }
- }
- }
-
- return result;
+ return getBasedChanges(this);
}
/**
@@ -263,4 +246,29 @@ public long getBaseTimeStamp()
return branchPoint.getTimeStamp();
}
+ /**
+ * @since 1.3
+ */
+ public static EList getBasedChanges(FixedBaseline fixedBaseline)
+ {
+ EList result = new BasicEList<>();
+
+ for (Stream stream : fixedBaseline.getModule().getStreams())
+ {
+ for (Baseline baseline : stream.getContents())
+ {
+ if (baseline instanceof Change)
+ {
+ Change change = (Change)baseline;
+ if (change.getBase() == fixedBaseline)
+ {
+ result.add(change);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
} // FixedBaselineImpl
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/FloatingBaselineImpl.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/FloatingBaselineImpl.java
index 1496f5267e3..0949f4af2c4 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/FloatingBaselineImpl.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/FloatingBaselineImpl.java
@@ -201,7 +201,15 @@ public boolean isFloating()
@Override
public CDOBranchPointRef getBranchPoint()
{
- CDOBranchRef branch = getBranch();
+ return getBranchPoint(this);
+ }
+
+ /**
+ * @since 1.3
+ */
+ public static CDOBranchPointRef getBranchPoint(FloatingBaseline floatingBaseline)
+ {
+ CDOBranchRef branch = floatingBaseline.getBranch();
if (branch == null)
{
return null;
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/ModuleImpl.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/ModuleImpl.java
index 9249c07ffe1..55bcbdf9aa7 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/ModuleImpl.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/ModuleImpl.java
@@ -27,6 +27,7 @@
import java.util.Collection;
import java.util.Objects;
import java.util.function.Consumer;
+import java.util.function.Predicate;
/**
* An implementation of the model object
@@ -354,7 +355,7 @@ public java.util.stream.Stream getAllBaselines()
for (Stream stream : getStreams())
{
- java.util.stream.Stream element = stream.getContents().stream();
+ java.util.stream.Stream element = java.util.stream.Stream.of(stream);
if (result == null)
{
result = element;
@@ -363,6 +364,9 @@ public java.util.stream.Stream getAllBaselines()
{
result = java.util.stream.Stream.concat(result, element);
}
+
+ element = stream.getContents().stream();
+ result = java.util.stream.Stream.concat(result, element);
}
return result;
@@ -377,6 +381,20 @@ public void forEachBaseline(Consumer consumer)
}
}
+ @Override
+ public boolean forEachBaseline(Predicate predicate)
+ {
+ for (Stream stream : getStreams())
+ {
+ if (stream.forEachBaseline(predicate))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
public static String name(Object o)
{
if (o instanceof org.eclipse.emf.cdo.lm.Module)
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/StreamImpl.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/StreamImpl.java
index 50409dd554f..dec08f785ff 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/StreamImpl.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/StreamImpl.java
@@ -34,6 +34,7 @@
import java.util.Collections;
import java.util.Objects;
import java.util.function.Consumer;
+import java.util.function.Predicate;
/**
* An implementation of the model object
@@ -866,12 +867,33 @@ public String getName()
@Override
public void forEachBaseline(Consumer consumer)
{
+ consumer.accept(this);
+
for (Baseline baseline : getContents())
{
consumer.accept(baseline);
}
}
+ @Override
+ public boolean forEachBaseline(Predicate predicate)
+ {
+ if (predicate.test(this))
+ {
+ return true;
+ }
+
+ for (Baseline baseline : getContents())
+ {
+ if (predicate.test(baseline))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
@Override
public Baseline getBaseline(String baselineName)
{
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/SystemImpl.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/SystemImpl.java
index 5a680f5ab78..2472b122c24 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/SystemImpl.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/impl/SystemImpl.java
@@ -26,6 +26,7 @@
import java.util.Collection;
import java.util.Objects;
import java.util.function.Consumer;
+import java.util.function.Predicate;
/**
* An implementation of the model object
@@ -326,6 +327,20 @@ public void forEachBaseline(Consumer consumer)
}
}
+ @Override
+ public boolean forEachBaseline(Predicate predicate)
+ {
+ for (Module module : getModules())
+ {
+ if (module.forEachBaseline(predicate))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
/**
* @since 1.2
*/
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/util/CoreDeliveryMerger.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/util/CoreDeliveryMerger.java
new file mode 100644
index 00000000000..95717ed6853
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/util/CoreDeliveryMerger.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2024 Eike Stepper (Loehne, 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.lm.util;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.util.CDOException;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.transaction.CDOMerger;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+
+import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
+
+/**
+ * @author Eike Stepper
+ * @since 1.3
+ */
+public class CoreDeliveryMerger implements LMMerger
+{
+ public CoreDeliveryMerger()
+ {
+ }
+
+ @Override
+ public long mergeDelivery(CDOSession session, CDOBranchPoint sourceBranchPoint, CDOBranch targetBranch)
+ {
+ CDOTransaction transaction = openTransaction(session, targetBranch);
+
+ try
+ {
+ CDOMerger merger = createMerger();
+ if (transaction.merge(sourceBranchPoint, merger) != null)
+ {
+ CDOCommitInfo commitInfo = transaction.commit();
+ return commitInfo.getTimeStamp();
+ }
+ }
+ catch (Exception ex)
+ {
+ transaction.rollback();
+ throw new CDOException(ex);
+ }
+ finally
+ {
+ transaction.close();
+ }
+
+ return CDOBranchPoint.INVALID_DATE;
+ }
+
+ protected CDOTransaction openTransaction(CDOSession session, CDOBranch branch)
+ {
+ return session.openTransaction(branch);
+ }
+
+ protected CDOMerger createMerger()
+ {
+ return new DefaultCDOMerger.PerFeature.ManyValued();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/util/LMMerger.java b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/util/LMMerger.java
index a1a42a2db65..42f0957189d 100644
--- a/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/util/LMMerger.java
+++ b/plugins/org.eclipse.emf.cdo.lm/src/org/eclipse/emf/cdo/lm/util/LMMerger.java
@@ -12,47 +12,14 @@
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
-import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
-import org.eclipse.emf.cdo.common.util.CDOException;
import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-
-import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
/**
* @author Eike Stepper
*/
public interface LMMerger
{
- public static final LMMerger CORE = new LMMerger()
- {
- @Override
- public long mergeDelivery(CDOSession session, CDOBranchPoint sourceBranchPoint, CDOBranch targetBranch)
- {
- CDOTransaction transaction = session.openTransaction(targetBranch);
-
- try
- {
- DefaultCDOMerger cdoMerger = new DefaultCDOMerger.PerFeature.ManyValued();
- if (transaction.merge(sourceBranchPoint, cdoMerger) != null)
- {
- CDOCommitInfo commitInfo = transaction.commit();
- return commitInfo.getTimeStamp();
- }
- }
- catch (Exception ex)
- {
- transaction.rollback();
- throw new CDOException(ex);
- }
- finally
- {
- transaction.close();
- }
-
- return CDOBranchPoint.INVALID_DATE;
- }
- };
+ public static final LMMerger CORE = new CoreDeliveryMerger();
/**
* Merges the changes from the given source branch point into the given target branch and returns the time stamp of the
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 6bb2b47bd84..8148532b2b5 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.net4j; singleton:=true
-Bundle-Version: 4.6.3.qualifier
+Bundle-Version: 4.6.4.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -10,11 +10,11 @@ Bundle-Activator: org.eclipse.emf.cdo.internal.net4j.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
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.6.3";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.ui,org.eclipse.emf.cdo.examples",
- org.eclipse.emf.cdo.internal.net4j.bundle;version="4.6.3";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.net4j.messages;version="4.6.3";x-internal:=true,
- org.eclipse.emf.cdo.internal.net4j.protocol;version="4.6.3";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.ui,org.eclipse.emf.cdo.examples",
- org.eclipse.emf.cdo.internal.net4j.testrecorder;version="4.6.3";x-internal:=true,
- org.eclipse.emf.cdo.net4j;version="4.6.3"
+Export-Package: org.eclipse.emf.cdo.internal.net4j;version="4.6.4";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.ui,org.eclipse.emf.cdo.examples",
+ org.eclipse.emf.cdo.internal.net4j.bundle;version="4.6.4";x-friends:="org.eclipse.emf.cdo.tests",
+ org.eclipse.emf.cdo.internal.net4j.messages;version="4.6.4";x-internal:=true,
+ org.eclipse.emf.cdo.internal.net4j.protocol;version="4.6.4";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.ui,org.eclipse.emf.cdo.examples",
+ org.eclipse.emf.cdo.internal.net4j.testrecorder;version="4.6.4";x-internal:=true,
+ org.eclipse.emf.cdo.net4j;version="4.6.4"
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.emf.cdo.net4j
diff --git a/plugins/org.eclipse.emf.cdo.net4j/pom.xml b/plugins/org.eclipse.emf.cdo.net4j/pom.xml
index 0eca9a56a54..fbea491edb8 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.net4j/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.net4j
- 4.6.3-SNAPSHOT
+ 4.6.4-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
index ea16fd5280b..5824f3cf75c 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
@@ -48,6 +48,7 @@
import org.eclipse.net4j.util.concurrent.ConcurrencyUtil;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+import org.eclipse.net4j.util.io.ExtendedIOUtil;
import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
@@ -65,6 +66,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
/**
* @author Eike Stepper
@@ -77,7 +79,9 @@ public class CommitTransactionRequest extends CDOClientRequestWithMonitoring commitProperties;
+
+ private final CDOBranchPoint commitMergeSource;
private final CDOCommitData commitData;
@@ -117,6 +121,7 @@ public CommitTransactionRequest(CDOClientProtocol protocol, short signalID, Inte
}
commitComment = context.getCommitComment();
+ commitProperties = context.getCommitProperties();
commitMergeSource = context.getCommitMergeSource();
commitData = context.getCommitData();
lobs = context.getLobs();
@@ -160,6 +165,7 @@ protected void requestingCommit(CDODataOutput out) throws IOException
out.writeXLong(getLastUpdateTime());
out.writeXInt(commitNumber);
out.writeString(commitComment);
+ ExtendedIOUtil.writeProperties(out, commitProperties);
CDOBranchUtil.writeBranchPointOrNull(out, commitMergeSource);
out.writeXLong(transaction.options().getOptimisticLockingTimeout());
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
index 47af70e64c1..6e76773538e 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server.net4j;singleton:=true
-Bundle-Version: 4.7.0.qualifier
+Bundle-Version: 4.7.1.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -12,7 +12,7 @@ Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
org.eclipse.emf.cdo.server;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.server.internal.net4j.bundle;version="4.7.0";x-internal:=true,
- org.eclipse.emf.cdo.server.internal.net4j.protocol;version="4.7.0";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.server.net4j;version="4.7.0"
+Export-Package: org.eclipse.emf.cdo.server.internal.net4j.bundle;version="4.7.1";x-internal:=true,
+ org.eclipse.emf.cdo.server.internal.net4j.protocol;version="4.7.1";x-friends:="org.eclipse.emf.cdo.tests",
+ org.eclipse.emf.cdo.server.net4j;version="4.7.1"
Automatic-Module-Name: org.eclipse.emf.cdo.server.net4j
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/pom.xml b/plugins/org.eclipse.emf.cdo.server.net4j/pom.xml
index 4630cb64c00..6fa621510f0 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.server.net4j
- 4.7.0-SNAPSHOT
+ 4.7.1-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
index 537d63be7f4..ae2594f8af4 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
@@ -42,6 +42,7 @@
import org.eclipse.emf.cdo.spi.server.InternalView;
import org.eclipse.net4j.util.WrappedException;
+import org.eclipse.net4j.util.io.ExtendedIOUtil;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.emf.ecore.EClass;
@@ -118,6 +119,7 @@ protected void indicatingRead(CDODataInput in, OMMonitor monitor) throws Excepti
long lastUpdateTime = in.readXLong();
int commitNumber = in.readXInt();
String commitComment = in.readString();
+ Map commitProperties = ExtendedIOUtil.readProperties(in);
CDOBranchPoint commitMergeSource = CDOBranchUtil.readBranchPointOrNull(in);
long optimisticLockingTimeout = in.readXLong();
@@ -267,6 +269,7 @@ public int compare(InternalCDORevision r1, InternalCDORevision r2)
commitContext.setDetachedObjectTypes(detachedObjectTypes);
commitContext.setDetachedObjectVersions(detachedObjectVersions);
commitContext.setCommitComment(commitComment);
+ commitContext.setCommitProperties(commitProperties);
commitContext.setCommitMergeSource(commitMergeSource);
commitContext.setLobs(getIndicationStream());
commitContext.setLocksOnNewObjects(locksOnNewObjects);
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 9b06b6462ae..f5156f42612 100644
--- a/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server;singleton:=true
-Bundle-Version: 4.20.0.qualifier
+Bundle-Version: 4.21.0.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -10,16 +10,16 @@ Bundle-Activator: org.eclipse.emf.cdo.internal.server.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .
Require-Bundle: org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.internal.server;version="4.20.0";
+Export-Package: org.eclipse.emf.cdo.internal.server;version="4.21.0";
x-friends:="org.eclipse.emf.cdo.server.db,
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.workspace,
org.eclipse.emf.cdo.server.embedded",
- org.eclipse.emf.cdo.internal.server.bundle;version="4.20.0";x-internal:=true,
- org.eclipse.emf.cdo.internal.server.mem;version="4.20.0";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.server.syncing;version="4.20.0";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.server;version="4.20.0",
- org.eclipse.emf.cdo.server.mem;version="4.20.0",
- org.eclipse.emf.cdo.spi.server;version="4.20.0"
+ org.eclipse.emf.cdo.internal.server.bundle;version="4.21.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.server.mem;version="4.21.0";x-friends:="org.eclipse.emf.cdo.tests",
+ org.eclipse.emf.cdo.internal.server.syncing;version="4.21.0";x-friends:="org.eclipse.emf.cdo.tests",
+ org.eclipse.emf.cdo.server;version="4.21.0",
+ org.eclipse.emf.cdo.server.mem;version="4.21.0",
+ org.eclipse.emf.cdo.spi.server;version="4.21.0"
Automatic-Module-Name: org.eclipse.emf.cdo.server
diff --git a/plugins/org.eclipse.emf.cdo.server/pom.xml b/plugins/org.eclipse.emf.cdo.server/pom.xml
index ed7a0c6e68c..2c8f805b5ca 100644
--- a/plugins/org.eclipse.emf.cdo.server/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.server/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.server
- 4.20.0-SNAPSHOT
+ 4.21.0-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingCommitContext.java
index 3c3a61ff916..0199ad9f11f 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingCommitContext.java
@@ -68,6 +68,12 @@ public String getCommitComment()
return getDelegate().getCommitComment();
}
+ @Override
+ public Map getCommitProperties()
+ {
+ return getDelegate().getCommitProperties();
+ }
+
@Override
public InternalCDOPackageRegistry getPackageRegistry()
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
index 9214bc2d53f..2d5fcfa9889 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
@@ -149,6 +149,8 @@ public class TransactionCommitContext implements InternalCommitContext
private String commitComment;
+ private Map commitProperties;
+
private CDOBranchPoint commitMergeSource;
private boolean usingEcore;
@@ -284,6 +286,12 @@ public String getCommitComment()
return commitComment;
}
+ @Override
+ public Map getCommitProperties()
+ {
+ return commitProperties;
+ }
+
@Override
public CDOBranchPoint getCommitMergeSource()
{
@@ -702,6 +710,12 @@ public void setCommitComment(String commitComment)
this.commitComment = commitComment;
}
+ @Override
+ public void setCommitProperties(Map commitProperties)
+ {
+ this.commitProperties = commitProperties;
+ }
+
@Override
public void setCommitMergeSource(CDOBranchPoint commitMergeSource)
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
index 05efc62a154..3cf140de303 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
@@ -1137,6 +1137,12 @@ public String getCommitComment()
return WriteThroughCommitContext.this.getCommitComment();
}
+ @Override
+ public Map getCommitProperties()
+ {
+ return WriteThroughCommitContext.this.getCommitProperties();
+ }
+
@Override
public CDOBranchPoint getCommitMergeSource()
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
index 43e8bae761a..96c8e7b9bef 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
@@ -305,6 +305,11 @@ public interface CommitContext extends CDORevisionProvider
*/
public String getCommitComment();
+ /**
+ * @since 4.21
+ */
+ public Map getCommitProperties();
+
/**
* @since 4.6
*/
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
index 3e8a2fee258..d8981bc5307 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
@@ -170,6 +170,11 @@ public void runLoop(int index, InternalCommitContext commitContext, OMMonitor mo
public void setCommitComment(String comment);
+ /**
+ * @since 4.21
+ */
+ public void setCommitProperties(Map properties);
+
/**
* @since 4.6
*/
diff --git a/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch b/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
index f553a9a090e..1d1bef73728 100644
--- a/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
+++ b/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
@@ -2,11 +2,11 @@
-
+
-
+
@@ -62,6 +62,7 @@
+
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 f84b712ae50..5c0bfc65cd3 100644
--- a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.ui;singleton:=true
-Bundle-Version: 4.16.1.qualifier
+Bundle-Version: 4.16.2.qualifier
Bundle-Activator: org.eclipse.emf.cdo.internal.ui.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -29,7 +29,7 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";reso
org.eclipse.emf.ecp.ui.view.swt;bundle-version="[1.5.0,2.0.0)";resolution:=optional;x-installation:=greedy,
org.eclipse.jdt.ui;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
org.eclipse.ui.editors;bundle-version="[3.5.0,4.0.0)";resolution:=optional
-Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
+Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -39,7 +39,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare,
org.eclipse.emf.cdo.lm.ui",
- org.eclipse.emf.cdo.internal.ui.actions;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.actions;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -48,9 +48,9 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.actions.delegates;version="4.16.1";x-internal:=true,
- org.eclipse.emf.cdo.internal.ui.bundle;version="4.16.1";x-internal:=true,
- org.eclipse.emf.cdo.internal.ui.dialogs;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.actions.delegates;version="4.16.2";x-internal:=true,
+ org.eclipse.emf.cdo.internal.ui.bundle;version="4.16.2";x-internal:=true,
+ org.eclipse.emf.cdo.internal.ui.dialogs;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -59,7 +59,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.dnd;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.dnd;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -68,7 +68,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.editor;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.editor;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -77,7 +77,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.filters;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.filters;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -86,7 +86,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.handlers;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.handlers;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -95,7 +95,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.history;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.history;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -104,7 +104,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.messages;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.messages;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -113,7 +113,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.perspectives;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.perspectives;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -122,7 +122,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.preferences;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.preferences;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -131,7 +131,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.transfer;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.transfer;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -140,7 +140,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.views;version="4.16.1";
+ org.eclipse.emf.cdo.internal.ui.views;version="4.16.2";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -149,6 +149,6 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.16.1";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.ui;version="4.16.1",
- org.eclipse.emf.cdo.ui.widgets;version="4.16.1"
+ org.eclipse.emf.cdo.ui;version="4.16.2",
+ org.eclipse.emf.cdo.ui.widgets;version="4.16.2"
Automatic-Module-Name: org.eclipse.emf.cdo.ui
diff --git a/plugins/org.eclipse.emf.cdo.ui/pom.xml b/plugins/org.eclipse.emf.cdo.ui/pom.xml
index b4746aaf379..cc28024523c 100644
--- a/plugins/org.eclipse.emf.cdo.ui/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.ui/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo.ui
- 4.16.1-SNAPSHOT
+ 4.16.2-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDORemoteTopicsView.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDORemoteTopicsView.java
index dd59864926a..7a68beb4fa0 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDORemoteTopicsView.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDORemoteTopicsView.java
@@ -21,7 +21,6 @@
import org.eclipse.emf.cdo.ui.CDOTopicProvider.Topic;
import org.eclipse.emf.cdo.ui.CDOTopicProvider.Topic.TopicChangedEvent;
import org.eclipse.emf.cdo.ui.UserInfo;
-import org.eclipse.emf.cdo.ui.UserInfo.Manager;
import org.eclipse.emf.cdo.ui.UserInfo.Manager.UserChangedEvent;
import org.eclipse.emf.cdo.ui.shared.SharedIcons;
@@ -109,7 +108,7 @@ public class CDORemoteTopicsView extends ViewPart implements ISelectionProvider,
private static final boolean EXPAND_SELECTION = //
OMPlatform.INSTANCE.isProperty("org.eclipse.emf.cdo.ui.CDORemoteTopicsView.EXPAND_SELECTION"); //$NON-NLS-1$
- private Manager userInfoManager;
+ private UserInfo.Manager userInfoManager;
private AutoCloseable userInfoListener;
diff --git a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
index dbf9f200ac9..b7d86036752 100644
--- a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo; singleton:=true
-Bundle-Version: 4.24.0.qualifier
+Bundle-Version: 4.25.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -10,28 +10,28 @@ Bundle-Activator: org.eclipse.emf.internal.cdo.bundle.Activator$Implementation
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
org.eclipse.emf.cdo.common;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo;version="4.24.0",
- org.eclipse.emf.cdo.eresource;version="4.24.0",
- org.eclipse.emf.cdo.eresource.impl;version="4.24.0",
- org.eclipse.emf.cdo.eresource.util;version="4.24.0",
- org.eclipse.emf.cdo.eresource.validation;version="4.24.0",
- org.eclipse.emf.cdo.etypes;version="4.24.0",
- org.eclipse.emf.cdo.etypes.impl;version="4.24.0",
- org.eclipse.emf.cdo.etypes.util;version="4.24.0",
- org.eclipse.emf.cdo.session;version="4.24.0",
- org.eclipse.emf.cdo.session.remote;version="4.24.0",
- org.eclipse.emf.cdo.transaction;version="4.24.0",
- org.eclipse.emf.cdo.util;version="4.24.0",
- org.eclipse.emf.cdo.view;version="4.24.0",
- org.eclipse.emf.internal.cdo;version="4.24.0",
- org.eclipse.emf.internal.cdo.analyzer;version="4.24.0";
+Export-Package: org.eclipse.emf.cdo;version="4.25.0",
+ org.eclipse.emf.cdo.eresource;version="4.25.0",
+ org.eclipse.emf.cdo.eresource.impl;version="4.25.0",
+ org.eclipse.emf.cdo.eresource.util;version="4.25.0",
+ org.eclipse.emf.cdo.eresource.validation;version="4.25.0",
+ org.eclipse.emf.cdo.etypes;version="4.25.0",
+ org.eclipse.emf.cdo.etypes.impl;version="4.25.0",
+ org.eclipse.emf.cdo.etypes.util;version="4.25.0",
+ org.eclipse.emf.cdo.session;version="4.25.0",
+ org.eclipse.emf.cdo.session.remote;version="4.25.0",
+ org.eclipse.emf.cdo.transaction;version="4.25.0",
+ org.eclipse.emf.cdo.util;version="4.25.0",
+ org.eclipse.emf.cdo.view;version="4.25.0",
+ org.eclipse.emf.internal.cdo;version="4.25.0",
+ org.eclipse.emf.internal.cdo.analyzer;version="4.25.0";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.bundle;version="4.24.0";x-friends:="org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.messages;version="4.24.0";x-internal:=true,
- org.eclipse.emf.internal.cdo.object;version="4.24.0";
+ org.eclipse.emf.internal.cdo.bundle;version="4.25.0";x-friends:="org.eclipse.emf.cdo.ui",
+ org.eclipse.emf.internal.cdo.messages;version="4.25.0";x-internal:=true,
+ org.eclipse.emf.internal.cdo.object;version="4.25.0";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
@@ -40,12 +40,12 @@ Export-Package: org.eclipse.emf.cdo;version="4.24.0",
org.eclipse.emf.cdo.explorer,
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.edit",
- org.eclipse.emf.internal.cdo.query;version="4.24.0";
+ org.eclipse.emf.internal.cdo.query;version="4.25.0";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.session;version="4.24.0";
+ org.eclipse.emf.internal.cdo.session;version="4.25.0";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
@@ -55,23 +55,23 @@ Export-Package: org.eclipse.emf.cdo;version="4.24.0",
org.eclipse.emf.cdo.security.ui,
org.eclipse.emf.cdo.explorer,
org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.internal.cdo.session.remote;version="4.24.0";
+ org.eclipse.emf.internal.cdo.session.remote;version="4.25.0";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.transaction;version="4.24.0";
+ org.eclipse.emf.internal.cdo.transaction;version="4.25.0";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.internal.cdo.util;version="4.24.0";
+ org.eclipse.emf.internal.cdo.util;version="4.25.0";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.view;version="4.24.0";
+ org.eclipse.emf.internal.cdo.view;version="4.25.0";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
@@ -79,6 +79,6 @@ Export-Package: org.eclipse.emf.cdo;version="4.24.0",
org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.explorer,
org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.spi.cdo;version="4.24.0"
+ org.eclipse.emf.spi.cdo;version="4.25.0"
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.emf.cdo
diff --git a/plugins/org.eclipse.emf.cdo/pom.xml b/plugins/org.eclipse.emf.cdo/pom.xml
index 5a3f1a7cb60..611645a69fe 100644
--- a/plugins/org.eclipse.emf.cdo/pom.xml
+++ b/plugins/org.eclipse.emf.cdo/pom.xml
@@ -25,7 +25,7 @@
org.eclipse.emf.cdo
org.eclipse.emf.cdo
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
eclipse-plugin
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java
index 7e59a1881fa..f72430213b7 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java
@@ -72,6 +72,11 @@ public interface CDOCommitContext extends CDOBranchProvider
*/
public String getCommitComment();
+ /**
+ * @since 4.25
+ */
+ public Map getCommitProperties();
+
/**
* @since 4.6
*/
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 ef9c0d25bad..9c792350b28 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
@@ -1284,6 +1284,18 @@ public void setCommitComment(String comment)
delegate.setCommitComment(comment);
}
+ @Override
+ public String getCommitProperty(String key)
+ {
+ return delegate.getCommitProperty(key);
+ }
+
+ @Override
+ public String setCommitProperty(String key, String value)
+ {
+ return delegate.setCommitProperty(key, value);
+ }
+
/**
* @since 4.0
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransaction.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransaction.java
index b9a6fa2fef0..6babbe5edb4 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransaction.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransaction.java
@@ -252,6 +252,16 @@ public interface CDOTransaction extends CDOView, CDOCommonTransaction, CDOUserTr
*/
public void setCommitComment(String comment);
+ /**
+ * @since 4.25
+ */
+ public String getCommitProperty(String key);
+
+ /**
+ * @since 4.25
+ */
+ public String setCommitProperty(String key, String value);
+
/**
* @since 4.0
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java
index 1b5509024d2..6a92f410dc3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java
@@ -106,6 +106,7 @@ public CDOCommitInfo commit(InternalCDOTransaction transaction, IProgressMonitor
String comment = transaction.getCommitComment();
transaction.setCommitComment(null);
+ transaction.setCommitProperties(null);
CDOBranchPoint mergeSource = transaction.getCommitMergeSource();
transaction.setCommitMergeSource(null);
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 d9cd80154ce..effa7155c29 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
@@ -282,6 +282,8 @@ protected CDOTransactionHandler2[] newArray(int length)
private String commitComment;
+ private final Map commitProperties = new HashMap<>();
+
private CommitToken commitToken;
private CDOBranchPoint commitMergeSource;
@@ -4209,6 +4211,83 @@ public void setCommitComment(String comment)
}
}
+ @Override
+ public Map getCommitProperties()
+ {
+ synchronized (getViewMonitor())
+ {
+ lockView();
+
+ try
+ {
+ return new HashMap<>(commitProperties);
+ }
+ finally
+ {
+ unlockView();
+ }
+ }
+ }
+
+ @Override
+ public void setCommitProperties(Map properties)
+ {
+ synchronized (getViewMonitor())
+ {
+ lockView();
+
+ try
+ {
+ commitProperties.clear();
+
+ if (properties != null)
+ {
+ commitProperties.putAll(properties);
+ }
+ }
+ finally
+ {
+ unlockView();
+ }
+ }
+ }
+
+ @Override
+ public String getCommitProperty(String key)
+ {
+ synchronized (getViewMonitor())
+ {
+ lockView();
+
+ try
+ {
+ return commitProperties.get(key);
+ }
+ finally
+ {
+ unlockView();
+ }
+ }
+ }
+
+ @Override
+ public String setCommitProperty(String key, String value)
+ {
+ synchronized (getViewMonitor())
+ {
+ lockView();
+
+ try
+ {
+ return commitProperties.put(key, value);
+ }
+ finally
+ {
+ unlockView();
+ }
+ }
+ }
+
@Override
public CDOBranchPoint getCommitMergeSource()
{
@@ -4804,6 +4883,12 @@ public String getCommitComment()
return transaction.getCommitComment();
}
+ @Override
+ public Map getCommitProperties()
+ {
+ return transaction.getCommitProperties();
+ }
+
@Override
public CDOBranchPoint getCommitMergeSource()
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java
index 92357e04d99..11fe9e91553 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java
@@ -148,6 +148,12 @@ public String getCommitComment()
return delegateCommitContext.getCommitComment();
}
+ @Override
+ public Map getCommitProperties()
+ {
+ return delegateCommitContext.getCommitProperties();
+ }
+
@Override
public CDOBranchPoint getCommitMergeSource()
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
index 30a84504e9b..96fee9c620f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
@@ -53,6 +53,16 @@ public interface InternalCDOTransaction extends CDOTransaction, InternalCDOUserT
*/
public CommitToken getCommitToken();
+ /**
+ * @since 4.25
+ */
+ public Map getCommitProperties();
+
+ /**
+ * @since 4.25
+ */
+ public void setCommitProperties(Map properties);
+
/**
* @since 4.6
*/
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/fsm/FiniteStateMachine.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/fsm/FiniteStateMachine.java
index e285afc89b5..6ccb8991ca2 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/fsm/FiniteStateMachine.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/fsm/FiniteStateMachine.java
@@ -17,6 +17,7 @@
import org.eclipse.net4j.util.lifecycle.Lifecycle;
import org.eclipse.net4j.util.om.trace.ContextTracer;
+import java.io.PrintStream;
import java.text.MessageFormat;
/**
@@ -170,6 +171,40 @@ else if (transition == FAIL)
}
}
+ /**
+ * @since 3.25
+ */
+ public void dump(PrintStream out)
+ {
+ out.println(getClass().getSimpleName());
+
+ for (STATE state : states)
+ {
+ out.println(" " + state);
+
+ for (EVENT event : events)
+ {
+ System.out.print(" " + event + " --> ");
+
+ int s = state.ordinal();
+ int e = event.ordinal();
+ ITransition transition = transitions[s][e];
+ if (transition == IGNORE)
+ {
+ System.out.println("IGNORE");
+ }
+ else if (transition == FAIL)
+ {
+ System.out.println("FAIL");
+ }
+ else
+ {
+ System.out.println(transition.getClass().getSimpleName());
+ }
+ }
+ }
+ }
+
@SuppressWarnings("unchecked")
protected ITransition createIgnoreTransition(STATE state, EVENT event)
{
@@ -231,50 +266,6 @@ private void checkTransition(ITransition transition)
}
}
- /**
- * A {@link ITransition transition} that does nothing.
- *
- * @author Eike Stepper
- * @deprecated Use {@link FiniteStateMachine#IGNORE}
- */
- @Deprecated
- public static class IgnoreTransition implements ITransition, Enum>, Object, Object>
- {
- @Override
- public void execute(Object subject, Enum> state, Enum> event, Object data)
- {
- // Do nothing
- }
-
- @Override
- public String toString()
- {
- return "IGNORE"; //$NON-NLS-1$
- }
- }
-
- /**
- * A {@link ITransition transition} that throws an {@link IllegalStateException}.
- *
- * @author Eike Stepper
- * @deprecated Use {@link FiniteStateMachine#FAIL}
- */
- @Deprecated
- public static class FailTransition implements ITransition, Enum>, Object, Object>
- {
- @Override
- public void execute(Object subject, Enum> state, Enum> event, Object data)
- {
- // Do nothing
- }
-
- @Override
- public String toString()
- {
- return "FAIL"; //$NON-NLS-1$
- }
- }
-
/**
* A {@link ITransition transition} that does nothing.
*
@@ -302,10 +293,13 @@ public String toString()
*/
private static class InternalFailTransition implements ITransition, Enum>, Object, Object>
{
+ /**
+ * Causes an {@link IllegalStateException} to be thrown in {@link FiniteStateMachine#process(Object, Enum, Object)}.
+ */
@Override
public void execute(Object subject, Enum> state, Enum> event, Object data)
{
- // Do nothing
+ // Do nothing.
}
@Override
@@ -386,4 +380,48 @@ public Enum> getNewState()
return newState;
}
}
+
+ /**
+ * A {@link ITransition transition} that does nothing.
+ *
+ * @author Eike Stepper
+ * @deprecated Use {@link FiniteStateMachine#IGNORE}
+ */
+ @Deprecated
+ public static class IgnoreTransition implements ITransition, Enum>, Object, Object>
+ {
+ @Override
+ public void execute(Object subject, Enum> state, Enum> event, Object data)
+ {
+ // Do nothing
+ }
+
+ @Override
+ public String toString()
+ {
+ return "IGNORE"; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * A {@link ITransition transition} that throws an {@link IllegalStateException}.
+ *
+ * @author Eike Stepper
+ * @deprecated Use {@link FiniteStateMachine#FAIL}
+ */
+ @Deprecated
+ public static class FailTransition implements ITransition, Enum>, Object, Object>
+ {
+ @Override
+ public void execute(Object subject, Enum> state, Enum> event, Object data)
+ {
+ // Do nothing
+ }
+
+ @Override
+ public String toString()
+ {
+ return "FAIL"; //$NON-NLS-1$
+ }
+ }
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/fsm/ITransition.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/fsm/ITransition.java
index 00539ea3e52..2848955604b 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/fsm/ITransition.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/fsm/ITransition.java
@@ -11,10 +11,11 @@
package org.eclipse.net4j.util.fsm;
/**
- * Encpsulates the logic to be executed when an event arrives for a subject in a particular state.
+ * Encapsulates the logic to be executed when an event arrives for a subject in a particular state.
*
* @author Eike Stepper
*/
+@FunctionalInterface
public interface ITransition, EVENT extends Enum>, SUBJECT, DATA>
{
public void execute(SUBJECT subject, STATE state, EVENT event, DATA data);
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java
index deab77c3ef1..f4aeef7d37c 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java
@@ -32,6 +32,9 @@
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
/**
* @author Eike Stepper
@@ -469,6 +472,39 @@ public static > T readEnum(DataInput in, Class type) throws
return literals[ordinal - Byte.MIN_VALUE - 1];
}
+ /**
+ * @since 3.25
+ */
+ public static void writeProperties(DataOutput out, Map properties) throws IOException
+ {
+ int size = properties == null ? 0 : properties.size();
+ writeVarInt(out, size);
+
+ for (Entry entry : properties.entrySet())
+ {
+ writeString(out, entry.getKey());
+ writeString(out, entry.getValue());
+ }
+ }
+
+ /**
+ * @since 3.25
+ */
+ public static Map readProperties(DataInput in) throws IOException
+ {
+ int size = readVarInt(in);
+ Map properties = new HashMap<>(size);
+
+ for (int i = 0; i < size; i++)
+ {
+ String key = readString(in);
+ String value = readString(in);
+ properties.put(key, value);
+ }
+
+ return properties;
+ }
+
/**
* @since 3.4
*/
diff --git a/releng/org.eclipse.emf.cdo.releng.parent/features/pom.xml b/releng/org.eclipse.emf.cdo.releng.parent/features/pom.xml
index c3f494704d6..5fe7b18e873 100644
--- a/releng/org.eclipse.emf.cdo.releng.parent/features/pom.xml
+++ b/releng/org.eclipse.emf.cdo.releng.parent/features/pom.xml
@@ -39,6 +39,7 @@ Eike Stepper - initial API and implementation
../../../features/org.eclipse.emf.cdo.examples.installer-feature
../../../features/org.eclipse.emf.cdo.license-feature
../../../features/org.eclipse.emf.cdo.lm-feature
+ ../../../features/org.eclipse.emf.cdo.lm.reviews-feature
../../../features/org.eclipse.emf.cdo.migrator-feature
../../../features/org.eclipse.emf.cdo.sdk-feature
../../../features/org.eclipse.emf.cdo.server-feature
diff --git a/releng/org.eclipse.emf.cdo.releng.parent/plugins/pom.xml b/releng/org.eclipse.emf.cdo.releng.parent/plugins/pom.xml
index 7e7c2fd54ee..7e9839cbc08 100644
--- a/releng/org.eclipse.emf.cdo.releng.parent/plugins/pom.xml
+++ b/releng/org.eclipse.emf.cdo.releng.parent/plugins/pom.xml
@@ -65,6 +65,10 @@ Eike Stepper - initial API and implementation
../../../plugins/org.eclipse.emf.cdo.lm.edit
../../../plugins/org.eclipse.emf.cdo.lm.modules
../../../plugins/org.eclipse.emf.cdo.lm.modules.edit
+ ../../../plugins/org.eclipse.emf.cdo.lm.reviews
+ ../../../plugins/org.eclipse.emf.cdo.lm.reviews.edit
+ ../../../plugins/org.eclipse.emf.cdo.lm.reviews.server
+ ../../../plugins/org.eclipse.emf.cdo.lm.reviews.ui
../../../plugins/org.eclipse.emf.cdo.lm.security
../../../plugins/org.eclipse.emf.cdo.lm.security.edit
../../../plugins/org.eclipse.emf.cdo.lm.server