diff options
13 files changed, 639 insertions, 69 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchPointRef.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchPointRef.java new file mode 100644 index 0000000000..6906b44c43 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchPointRef.java @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2020 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.common.branch; + +import org.eclipse.emf.cdo.common.protocol.CDODataInput; +import org.eclipse.emf.cdo.common.protocol.CDODataOutput; +import org.eclipse.emf.cdo.internal.common.messages.Messages; + +import org.eclipse.net4j.util.ObjectUtil; + +import java.io.IOException; +import java.io.Serializable; + +/** + * References a {@link CDOBranchPoint}. + * + * @author Eike Stepper + * @since 4.10 + */ +public final class CDOBranchPointRef implements Serializable +{ + private static final long serialVersionUID = 1L; + + public static final String URI_SEPARATOR = "#"; //$NON-NLS-1$ + + public static final String BASE = "BASE"; + + public static final String HEAD = "HEAD"; + + private String branchPath; + + private long timeStamp; + + public CDOBranchPointRef() + { + } + + public CDOBranchPointRef(CDOBranchPoint branchPoint) + { + this(branchPoint.getBranch().getPathName(), branchPoint.getTimeStamp()); + } + + public CDOBranchPointRef(String branchPath, long timeStamp) + { + this.branchPath = branchPath.intern(); + this.timeStamp = timeStamp; + } + + public CDOBranchPointRef(String uri) + { + if (uri == null) + { + throw new IllegalArgumentException(Messages.getString("CDOClassifierRef.1") + uri); //$NON-NLS-1$ + } + + int hash = uri.lastIndexOf(URI_SEPARATOR); + if (hash == -1) + { + branchPath = uri; + timeStamp = CDOBranchPoint.UNSPECIFIED_DATE; + return; + } + + branchPath = uri.substring(0, hash); + String timeStampSpec = uri.substring(hash + 1); + + if (HEAD.equals(timeStampSpec)) + { + timeStamp = CDOBranchPoint.UNSPECIFIED_DATE; + } + else if (BASE.equals(timeStampSpec)) + { + timeStamp = CDOBranchPoint.INVALID_DATE; + } + else + { + timeStamp = Long.valueOf(timeStampSpec); + } + } + + public CDOBranchPointRef(CDODataInput in) throws IOException + { + this(in.readCDOPackageURI(), in.readLong()); + } + + public void write(CDODataOutput out) throws IOException + { + out.writeCDOPackageURI(branchPath); + out.writeLong(timeStamp); + } + + public String getURI() + { + return branchPath + URI_SEPARATOR + getTimeStampSpec(); + } + + public String getBranchPath() + { + return branchPath; + } + + public long getTimeStamp() + { + return timeStamp; + } + + public String getTimeStampSpec() + { + if (isHead()) + { + return HEAD; + } + + if (isBase()) + { + return BASE; + } + + return Long.toString(timeStamp); + } + + public boolean isBase() + { + return timeStamp == CDOBranchPoint.INVALID_DATE; + } + + public boolean isHead() + { + return timeStamp == CDOBranchPoint.UNSPECIFIED_DATE; + } + + public CDOBranchPoint resolve(CDOBranchManager branchManager) + { + CDOBranch branch = branchManager.getBranch(branchPath); + if (branch == null) + { + return null; + } + + return branch.getPoint(timeStamp); + } + + @Override + public boolean equals(Object obj) + { + if (obj == this) + { + return true; + } + + if (obj != null && obj.getClass() == CDOBranchPointRef.class) + { + CDOBranchPointRef that = (CDOBranchPointRef)obj; + return ObjectUtil.equals(branchPath, that.branchPath) && timeStamp == that.timeStamp; + } + + return false; + } + + @Override + public int hashCode() + { + return branchPath.hashCode() ^ Long.hashCode(timeStamp); + } + + @Override + public String toString() + { + return getURI(); + } + + /** + * Provides {@link CDOBranchPointRef branch point references}. + * + * @author Eike Stepper + */ + public interface Provider + { + public CDOBranchPointRef getBranchPointRef(); + } +} 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 new file mode 100644 index 0000000000..d33cf919ae --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/branch/CDOBranchRef.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2020 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.common.branch; + +import org.eclipse.emf.cdo.common.protocol.CDODataInput; +import org.eclipse.emf.cdo.common.protocol.CDODataOutput; + +import org.eclipse.net4j.util.ObjectUtil; + +import java.io.IOException; +import java.io.Serializable; + +/** + * References a {@link CDOBranch}. + * + * @author Eike Stepper + * @since 4.10 + */ +public final class CDOBranchRef implements Serializable +{ + private static final long serialVersionUID = 1L; + + private String branchPath; + + public CDOBranchRef() + { + } + + public CDOBranchRef(CDOBranch branch) + { + this(branch.getBranch().getPathName()); + } + + public CDOBranchRef(String branchPath) + { + this.branchPath = branchPath.intern(); + } + + public CDOBranchRef(CDODataInput in) throws IOException + { + this(in.readCDOPackageURI()); + } + + public void write(CDODataOutput out) throws IOException + { + out.writeCDOPackageURI(branchPath); + } + + public String getBranchPath() + { + return branchPath; + } + + public boolean isMainBranch() + { + return CDOBranch.MAIN_BRANCH_NAME.equals(branchPath); + } + + public CDOBranchPoint resolve(CDOBranchManager branchManager) + { + return branchManager.getBranch(branchPath); + } + + @Override + public boolean equals(Object obj) + { + if (obj == this) + { + return true; + } + + if (obj != null && obj.getClass() == CDOBranchRef.class) + { + CDOBranchRef that = (CDOBranchRef)obj; + return ObjectUtil.equals(branchPath, that.branchPath); + } + + return false; + } + + @Override + public int hashCode() + { + return branchPath.hashCode(); + } + + @Override + public String toString() + { + return branchPath; + } + + /** + * Provides {@link CDOBranchRef branch references}. + * + * @author Eike Stepper + */ + public interface Provider + { + public CDOBranchRef getBranchRef(); + } +} diff --git a/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF index 5d0e4e8148..27e12e4bd6 100644 --- a/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.emf.cdo.edit; singleton:=true -Bundle-Version: 4.5.0.qualifier +Bundle-Version: 4.5.1.qualifier Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -13,8 +13,8 @@ Require-Bundle: org.eclipse.emf.edit;bundle-version="[2.5.0,3.0.0)";visibility:= org.eclipse.emf.ecore;bundle-version="[2.5.0,3.0.0)";visibility:=reexport, org.eclipse.emf.ecore.edit;bundle-version="[2.5.0,3.0.0)";visibility:=reexport, org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport -Export-Package: org.eclipse.emf.cdo.edit;version="4.5.0", +Export-Package: org.eclipse.emf.cdo.edit;version="4.5.1", org.eclipse.emf.cdo.eresource.provider;version="4.2.100", org.eclipse.emf.cdo.etypes.provider;version="4.2.100", - org.eclipse.emf.cdo.internal.edit.messages;version="4.5.0";x-internal:=true + org.eclipse.emf.cdo.internal.edit.messages;version="4.5.1";x-internal:=true Automatic-Module-Name: org.eclipse.emf.cdo.edit diff --git a/plugins/org.eclipse.emf.cdo.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.edit/plugin.properties index 3861dad686..f261472fc2 100644 --- a/plugins/org.eclipse.emf.cdo.edit/plugin.properties +++ b/plugins/org.eclipse.emf.cdo.edit/plugin.properties @@ -19,45 +19,45 @@ _UI_CreateSibling_description = Create a new sibling of type {0} for the selecte _UI_PropertyDescriptor_description = The {0} of the {1} -_UI_CDOResource_type = CDO Resource _UI_Unknown_type = Object - _UI_Unknown_datatype= Value - -_UI_CDOResource_resourceSet_feature = Resource Set -_UI_CDOResource_uRI_feature = URI -_UI_CDOResource_contents_feature = Contents -_UI_CDOResource_modified_feature = Modified -_UI_CDOResource_loaded_feature = Loaded -_UI_CDOResource_trackingModification_feature = Tracking Modification -_UI_CDOResource_errors_feature = Errors -_UI_CDOResource_warnings_feature = Warnings -_UI_CDOResource_path_feature = Path _UI_Unknown_feature = Unspecified -_UI_CDOResource_timeStamp_feature = Time Stamp -_UI_CDOResourceNode_type = CDO Resource Node -_UI_CDOResourceFolder_type = CDO Resource Folder -_UI_CDOResourceNode_folder_feature = Folder -_UI_CDOResourceNode_name_feature = Name -_UI_CDOResourceNode_path_feature = Path -_UI_CDOResourceFolder_contents_feature = Contents -_UI_CDOResourceFolder_nodes_feature = Nodes -_UI_ModelElement_type = Model Element -_UI_Annotation_type = Annotation -_UI_ModelElement_annotations_feature = Annotations -_UI_Annotation_source_feature = Source + + +_UI_Annotation_contents_feature = Contents _UI_Annotation_details_feature = Details _UI_Annotation_modelElement_feature = Model Element -_UI_Annotation_contents_feature = Contents +_UI_Annotation_references_description = Objects referenced by this annotation _UI_Annotation_references_feature = References _UI_Annotation_source_description = An identifier, typically an absolute URI, that uniquely identifies this kind of annotation -_UI_Annotation_references_description = Objects referenced by this annotation -_UI_CDOResourceLeaf_type = CDO Resource Leaf -_UI_CDOFileResource_type = CDO File Resource -_UI_CDOBinaryResource_type = CDO Binary Resource -_UI_CDOTextResouurce_type = CDO Text Resouurce +_UI_Annotation_source_feature = Source +_UI_Annotation_type = Annotation _UI_CDOBinaryResource_contents_feature = Contents -_UI_CDOTextResouurce_contents_feature = Contents -_UI_CDOTextResource_type = CDO Text Resource +_UI_CDOBinaryResource_type = CDO Binary Resource +_UI_CDOFileResource_type = CDO File Resource +_UI_CDOResourceFolder_contents_feature = Contents +_UI_CDOResourceFolder_nodes_feature = Nodes +_UI_CDOResourceFolder_type = CDO Resource Folder +_UI_CDOResourceLeaf_type = CDO Resource Leaf +_UI_CDOResourceNode_folder_feature = Folder +_UI_CDOResourceNode_name_feature = Name +_UI_CDOResourceNode_path_feature = Path +_UI_CDOResourceNode_type = CDO Resource Node +_UI_CDOResource_contents_feature = Contents +_UI_CDOResource_errors_feature = Errors +_UI_CDOResource_loaded_feature = Loaded +_UI_CDOResource_modified_feature = Modified +_UI_CDOResource_path_feature = Path +_UI_CDOResource_resourceSet_feature = Resource Set +_UI_CDOResource_timeStamp_feature = Time Stamp +_UI_CDOResource_trackingModification_feature = Tracking Modification +_UI_CDOResource_type = CDO Resource +_UI_CDOResource_uRI_feature = URI +_UI_CDOResource_warnings_feature = Warnings _UI_CDOTextResource_contents_feature = Contents _UI_CDOTextResource_encoding_feature = Encoding +_UI_CDOTextResource_type = CDO Text Resource +_UI_CDOTextResouurce_contents_feature = Contents +_UI_CDOTextResouurce_type = CDO Text Resource +_UI_ModelElement_annotations_feature = Annotations +_UI_ModelElement_type = Model Element diff --git a/plugins/org.eclipse.emf.cdo.edit/pom.xml b/plugins/org.eclipse.emf.cdo.edit/pom.xml index a8c06b6064..16821fbaff 100644 --- a/plugins/org.eclipse.emf.cdo.edit/pom.xml +++ b/plugins/org.eclipse.emf.cdo.edit/pom.xml @@ -25,7 +25,7 @@ <groupId>org.eclipse.emf.cdo</groupId> <artifactId>org.eclipse.emf.cdo.edit</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.5.1-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/plugins/org.eclipse.emf.cdo/.settings/.api_filters b/plugins/org.eclipse.emf.cdo/.settings/.api_filters index 48c52a3722..543c9cb2d5 100644 --- a/plugins/org.eclipse.emf.cdo/.settings/.api_filters +++ b/plugins/org.eclipse.emf.cdo/.settings/.api_filters @@ -183,6 +183,24 @@ <filter id="403767336"> <message_arguments> <message_argument value="org.eclipse.emf.cdo.etypes.EtypesPackage.Literals"/> + <message_argument value="BRANCH_POINT_REF"/> + </message_arguments> + </filter> + <filter id="403767336"> + <message_arguments> + <message_argument value="org.eclipse.emf.cdo.etypes.EtypesPackage.Literals"/> + <message_argument value="BRANCH_REF"/> + </message_arguments> + </filter> + <filter id="403767336"> + <message_arguments> + <message_argument value="org.eclipse.emf.cdo.etypes.EtypesPackage.Literals"/> + <message_argument value="CLASSIFIER_REF"/> + </message_arguments> + </filter> + <filter id="403767336"> + <message_arguments> + <message_argument value="org.eclipse.emf.cdo.etypes.EtypesPackage.Literals"/> <message_argument value="INPUT_STREAM"/> </message_arguments> </filter> diff --git a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF index d51e7ebed0..858932f456 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.9.1.qualifier +Bundle-Version: 4.10.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.9.1", - org.eclipse.emf.cdo.eresource;version="4.9.1", - org.eclipse.emf.cdo.eresource.impl;version="4.9.1", - org.eclipse.emf.cdo.eresource.util;version="4.9.1", - org.eclipse.emf.cdo.eresource.validation;version="4.9.1", - org.eclipse.emf.cdo.etypes;version="4.9.1", - org.eclipse.emf.cdo.etypes.impl;version="4.9.1", - org.eclipse.emf.cdo.etypes.util;version="4.9.1", - org.eclipse.emf.cdo.session;version="4.9.1", - org.eclipse.emf.cdo.session.remote;version="4.9.1", - org.eclipse.emf.cdo.transaction;version="4.9.1", - org.eclipse.emf.cdo.util;version="4.9.1", - org.eclipse.emf.cdo.view;version="4.9.1", - org.eclipse.emf.internal.cdo;version="4.9.1", - org.eclipse.emf.internal.cdo.analyzer;version="4.9.1"; +Export-Package: org.eclipse.emf.cdo;version="4.10.0", + org.eclipse.emf.cdo.eresource;version="4.10.0", + org.eclipse.emf.cdo.eresource.impl;version="4.10.0", + org.eclipse.emf.cdo.eresource.util;version="4.10.0", + org.eclipse.emf.cdo.eresource.validation;version="4.10.0", + org.eclipse.emf.cdo.etypes;version="4.10.0", + org.eclipse.emf.cdo.etypes.impl;version="4.10.0", + org.eclipse.emf.cdo.etypes.util;version="4.10.0", + org.eclipse.emf.cdo.session;version="4.10.0", + org.eclipse.emf.cdo.session.remote;version="4.10.0", + org.eclipse.emf.cdo.transaction;version="4.10.0", + org.eclipse.emf.cdo.util;version="4.10.0", + org.eclipse.emf.cdo.view;version="4.10.0", + org.eclipse.emf.internal.cdo;version="4.10.0", + org.eclipse.emf.internal.cdo.analyzer;version="4.10.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.9.1";x-friends:="org.eclipse.emf.cdo.ui", - org.eclipse.emf.internal.cdo.messages;version="4.9.1";x-internal:=true, - org.eclipse.emf.internal.cdo.object;version="4.9.1"; + org.eclipse.emf.internal.cdo.bundle;version="4.10.0";x-friends:="org.eclipse.emf.cdo.ui", + org.eclipse.emf.internal.cdo.messages;version="4.10.0";x-internal:=true, + org.eclipse.emf.internal.cdo.object;version="4.10.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.9.1", org.eclipse.emf.cdo.explorer, org.eclipse.emf.cdo.explorer.ui, org.eclipse.emf.cdo.edit", - org.eclipse.emf.internal.cdo.query;version="4.9.1"; + org.eclipse.emf.internal.cdo.query;version="4.10.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.9.1"; + org.eclipse.emf.internal.cdo.session;version="4.10.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.9.1", 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.9.1"; + org.eclipse.emf.internal.cdo.session.remote;version="4.10.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.9.1"; + org.eclipse.emf.internal.cdo.transaction;version="4.10.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.9.1"; + org.eclipse.emf.internal.cdo.util;version="4.10.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.9.1"; + org.eclipse.emf.internal.cdo.view;version="4.10.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.9.1", org.eclipse.emf.cdo.ui.ide, org.eclipse.emf.cdo.explorer, org.eclipse.emf.cdo.explorer.ui", - org.eclipse.emf.spi.cdo;version="4.9.1" + org.eclipse.emf.spi.cdo;version="4.10.0" Bundle-ActivationPolicy: lazy Automatic-Module-Name: org.eclipse.emf.cdo diff --git a/plugins/org.eclipse.emf.cdo/model/etypes.ecore b/plugins/org.eclipse.emf.cdo/model/etypes.ecore index 093745e7c0..e3a7e1c30b 100644 --- a/plugins/org.eclipse.emf.cdo/model/etypes.ecore +++ b/plugins/org.eclipse.emf.cdo/model/etypes.ecore @@ -32,4 +32,7 @@ serializable="false"/> <eClassifiers xsi:type="ecore:EDataType" name="Reader" instanceClassName="java.io.Reader" serializable="false"/> + <eClassifiers xsi:type="ecore:EDataType" name="ClassifierRef" instanceClassName="org.eclipse.emf.cdo.common.model.CDOClassifierRef"/> + <eClassifiers xsi:type="ecore:EDataType" name="BranchRef" instanceClassName="org.eclipse.emf.cdo.common.branch.CDOBranchRef"/> + <eClassifiers xsi:type="ecore:EDataType" name="BranchPointRef" instanceClassName="org.eclipse.emf.cdo.common.branch.CDOBranchPointRef"/> </ecore:EPackage> diff --git a/plugins/org.eclipse.emf.cdo/model/etypes.genmodel b/plugins/org.eclipse.emf.cdo/model/etypes.genmodel index 1ab64cf807..ea9841bdf2 100644 --- a/plugins/org.eclipse.emf.cdo/model/etypes.genmodel +++ b/plugins/org.eclipse.emf.cdo/model/etypes.genmodel @@ -20,6 +20,9 @@ </genDataTypes> <genDataTypes ecoreDataType="etypes.ecore#//InputStream"/> <genDataTypes ecoreDataType="etypes.ecore#//Reader"/> + <genDataTypes ecoreDataType="etypes.ecore#//ClassifierRef"/> + <genDataTypes ecoreDataType="etypes.ecore#//BranchRef"/> + <genDataTypes ecoreDataType="etypes.ecore#//BranchPointRef"/> <genClasses image="false" ecoreClass="etypes.ecore#//ModelElement"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etypes.ecore#//ModelElement/annotations"/> <genOperations ecoreOperation="etypes.ecore#//ModelElement/getAnnotation"> diff --git a/plugins/org.eclipse.emf.cdo/pom.xml b/plugins/org.eclipse.emf.cdo/pom.xml index 50de05af7b..ac48875512 100644 --- a/plugins/org.eclipse.emf.cdo/pom.xml +++ b/plugins/org.eclipse.emf.cdo/pom.xml @@ -25,7 +25,7 @@ <groupId>org.eclipse.emf.cdo</groupId> <artifactId>org.eclipse.emf.cdo</artifactId> - <version>4.9.1-SNAPSHOT</version> + <version>4.10.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java index c4a7c29e57..717d96fa58 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java @@ -211,6 +211,39 @@ public interface EtypesPackage extends EPackage int READER = 6; /** + * The meta object id for the '<em>Classifier Ref</em>' data type. + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.common.model.CDOClassifierRef + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getClassifierRef() + * @generated + */ + int CLASSIFIER_REF = 7; + + /** + * The meta object id for the '<em>Branch Ref</em>' data type. + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.common.branch.CDOBranchRef + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getBranchRef() + * @generated + */ + int BRANCH_REF = 8; + + /** + * The meta object id for the '<em>Branch Point Ref</em>' data type. + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.common.branch.CDOBranchPointRef + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getBranchPointRef() + * @generated + */ + int BRANCH_POINT_REF = 9; + + /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.etypes.ModelElement <em>Model Element</em>}'. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -351,11 +384,47 @@ public interface EtypesPackage extends EPackage EDataType getReader(); /** - * Returns the factory that creates the instances of the model. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * @return the factory that creates the instances of the model. - * @generated - */ + * Returns the meta object for data type '{@link org.eclipse.emf.cdo.common.model.CDOClassifierRef <em>Classifier Ref</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Classifier Ref</em>'. + * @see org.eclipse.emf.cdo.common.model.CDOClassifierRef + * @model instanceClass="org.eclipse.emf.cdo.common.model.CDOClassifierRef" + * @generated + * @since 4.10 + */ + EDataType getClassifierRef(); + + /** + * Returns the meta object for data type '{@link org.eclipse.emf.cdo.common.branch.CDOBranchRef <em>Branch Ref</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Branch Ref</em>'. + * @see org.eclipse.emf.cdo.common.branch.CDOBranchRef + * @model instanceClass="org.eclipse.emf.cdo.common.branch.CDOBranchRef" + * @generated + * @since 4.10 + */ + EDataType getBranchRef(); + + /** + * Returns the meta object for data type '{@link org.eclipse.emf.cdo.common.branch.CDOBranchPointRef <em>Branch Point Ref</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Branch Point Ref</em>'. + * @see org.eclipse.emf.cdo.common.branch.CDOBranchPointRef + * @model instanceClass="org.eclipse.emf.cdo.common.branch.CDOBranchPointRef" + * @generated + * @since 4.10 + */ + EDataType getBranchPointRef(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ EtypesFactory getEtypesFactory(); /** @@ -368,7 +437,8 @@ public interface EtypesPackage extends EPackage * </ul> * * @noextend This interface is not intended to be extended by clients. - * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc --> + * @noimplement This interface is not intended to be implemented by clients. + * <!-- end-user-doc --> * @generated */ interface Literals @@ -490,6 +560,39 @@ public interface EtypesPackage extends EPackage */ EDataType READER = eINSTANCE.getReader(); + /** + * The meta object literal for the '<em>Classifier Ref</em>' data type. + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.common.model.CDOClassifierRef + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getClassifierRef() + * @generated + */ + EDataType CLASSIFIER_REF = eINSTANCE.getClassifierRef(); + + /** + * The meta object literal for the '<em>Branch Ref</em>' data type. + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.common.branch.CDOBranchRef + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getBranchRef() + * @generated + */ + EDataType BRANCH_REF = eINSTANCE.getBranchRef(); + + /** + * The meta object literal for the '<em>Branch Point Ref</em>' data type. + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.common.branch.CDOBranchPointRef + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getBranchPointRef() + * @generated + */ + EDataType BRANCH_POINT_REF = eINSTANCE.getBranchPointRef(); + } } // EtypesPackage diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java index 490a8b92c5..63e6c63d71 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java @@ -10,9 +10,12 @@ */ package org.eclipse.emf.cdo.etypes.impl; +import org.eclipse.emf.cdo.common.branch.CDOBranchPointRef; +import org.eclipse.emf.cdo.common.branch.CDOBranchRef; import org.eclipse.emf.cdo.common.lob.CDOBlob; import org.eclipse.emf.cdo.common.lob.CDOClob; import org.eclipse.emf.cdo.common.lob.CDOLob; +import org.eclipse.emf.cdo.common.model.CDOClassifierRef; import org.eclipse.emf.cdo.etypes.Annotation; import org.eclipse.emf.cdo.etypes.EtypesFactory; import org.eclipse.emf.cdo.etypes.EtypesPackage; @@ -112,6 +115,12 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory return createBlobFromString(eDataType, initialValue); case EtypesPackage.CLOB: return createClobFromString(eDataType, initialValue); + case EtypesPackage.CLASSIFIER_REF: + return createClassifierRefFromString(eDataType, initialValue); + case EtypesPackage.BRANCH_REF: + return createBranchRefFromString(eDataType, initialValue); + case EtypesPackage.BRANCH_POINT_REF: + return createBranchPointRefFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -131,6 +140,12 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory return convertBlobToString(eDataType, instanceValue); case EtypesPackage.CLOB: return convertClobToString(eDataType, instanceValue); + case EtypesPackage.CLASSIFIER_REF: + return convertClassifierRefToString(eDataType, instanceValue); + case EtypesPackage.BRANCH_REF: + return convertBranchRefToString(eDataType, instanceValue); + case EtypesPackage.BRANCH_POINT_REF: + return convertBranchPointRefToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -254,6 +269,72 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory /** * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @generated NOT + */ + public CDOClassifierRef createClassifierRefFromString(EDataType eDataType, String initialValue) + { + return initialValue == null ? null : new CDOClassifierRef(initialValue); + } + + /** + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @generated NOT + */ + public String convertClassifierRefToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : ((CDOClassifierRef)instanceValue).getURI(); + } + + /** + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @generated NOT + */ + public CDOBranchRef createBranchRefFromString(EDataType eDataType, String initialValue) + { + return initialValue == null ? null : new CDOBranchRef(initialValue); + } + + /** + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @generated NOT + */ + public String convertBranchRefToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : ((CDOBranchRef)instanceValue).getBranchPath(); + } + + /** + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @generated NOT + */ + public CDOBranchPointRef createBranchPointRefFromString(EDataType eDataType, String initialValue) + { + return initialValue == null ? null : new CDOBranchPointRef(initialValue); + } + + /** + * <!-- begin-user-doc --> + * @since 4.10 + * <!-- end-user-doc --> + * @generated NOT + */ + public String convertBranchPointRefToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : ((CDOBranchPointRef)instanceValue).getURI(); + } + + /** + * <!-- begin-user-doc --> * @since 4.1 * <!-- end-user-doc --> * @generated NOT diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java index b508ba37ed..cdfa8c43ea 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java @@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.etypes.impl; import org.eclipse.emf.cdo.common.lob.CDOBlob; import org.eclipse.emf.cdo.common.lob.CDOClob; import org.eclipse.emf.cdo.common.lob.CDOLob; +import org.eclipse.emf.cdo.common.model.CDOClassifierRef; import org.eclipse.emf.cdo.etypes.Annotation; import org.eclipse.emf.cdo.etypes.EtypesFactory; import org.eclipse.emf.cdo.etypes.EtypesPackage; @@ -28,6 +29,8 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; import java.io.InputStream; import java.io.Reader; +import org.eclipse.emf.cdo.common.branch.CDOBranchPointRef; +import org.eclipse.emf.cdo.common.branch.CDOBranchRef; /** * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. @@ -71,6 +74,27 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage private EDataType readerEDataType = null; /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType classifierRefEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType branchRefEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType branchPointRefEDataType = null; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @@ -261,6 +285,39 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage } /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EDataType getClassifierRef() + { + return classifierRefEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EDataType getBranchRef() + { + return branchRefEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EDataType getBranchPointRef() + { + return branchPointRefEDataType; + } + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @@ -325,6 +382,9 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage lobEDataType = createEDataType(LOB); inputStreamEDataType = createEDataType(INPUT_STREAM); readerEDataType = createEDataType(READER); + classifierRefEDataType = createEDataType(CLASSIFIER_REF); + branchRefEDataType = createEDataType(BRANCH_REF); + branchPointRefEDataType = createEDataType(BRANCH_POINT_REF); } /** @@ -384,6 +444,9 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage initEDataType(lobEDataType, CDOLob.class, "Lob", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEDataType(inputStreamEDataType, InputStream.class, "InputStream", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEDataType(readerEDataType, Reader.class, "Reader", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(classifierRefEDataType, CDOClassifierRef.class, "ClassifierRef", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(branchRefEDataType, CDOBranchRef.class, "BranchRef", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(branchPointRefEDataType, CDOBranchPointRef.class, "BranchPointRef", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ // Create resource createResource(eNS_URI); |