Removed project and localChangePackage from ProjectSpace in ecore
diff --git a/bundles/org.eclipse.emf.emfstore.client.model.edit/src/org/eclipse/emf/emfstore/internal/client/model/provider/ProjectSpaceItemProvider.java b/bundles/org.eclipse.emf.emfstore.client.model.edit/src/org/eclipse/emf/emfstore/internal/client/model/provider/ProjectSpaceItemProvider.java
index d3112e7..bfd3af9 100644
--- a/bundles/org.eclipse.emf.emfstore.client.model.edit/src/org/eclipse/emf/emfstore/internal/client/model/provider/ProjectSpaceItemProvider.java
+++ b/bundles/org.eclipse.emf.emfstore.client.model.edit/src/org/eclipse/emf/emfstore/internal/client/model/provider/ProjectSpaceItemProvider.java
@@ -286,12 +286,10 @@
if (childrenFeatures == null)
{
super.getChildrenFeatures(object);
- childrenFeatures.add(ModelPackage.Literals.PROJECT_SPACE__PROJECT);
childrenFeatures.add(ModelPackage.Literals.PROJECT_SPACE__PROJECT_ID);
childrenFeatures.add(ModelPackage.Literals.PROJECT_SPACE__BASE_VERSION);
childrenFeatures.add(ModelPackage.Literals.PROJECT_SPACE__WAITING_UPLOADS);
childrenFeatures.add(ModelPackage.Literals.PROJECT_SPACE__PROPERTIES);
- childrenFeatures.add(ModelPackage.Literals.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE);
childrenFeatures.add(ModelPackage.Literals.PROJECT_SPACE__MERGED_VERSION);
}
return childrenFeatures;
@@ -379,12 +377,10 @@
case ModelPackage.PROJECT_SPACE__OLD_LOG_MESSAGES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case ModelPackage.PROJECT_SPACE__PROJECT:
case ModelPackage.PROJECT_SPACE__PROJECT_ID:
case ModelPackage.PROJECT_SPACE__BASE_VERSION:
case ModelPackage.PROJECT_SPACE__WAITING_UPLOADS:
case ModelPackage.PROJECT_SPACE__PROPERTIES:
- case ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE:
case ModelPackage.PROJECT_SPACE__MERGED_VERSION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
@@ -405,11 +401,6 @@
newChildDescriptors.add
(createChildParameter
- (ModelPackage.Literals.PROJECT_SPACE__PROJECT,
- ModelFactory.eINSTANCE.createProject()));
-
- newChildDescriptors.add
- (createChildParameter
(ModelPackage.Literals.PROJECT_SPACE__PROJECT_ID,
org.eclipse.emf.emfstore.internal.server.model.ModelFactory.eINSTANCE.createProjectId()));
@@ -430,11 +421,6 @@
newChildDescriptors.add
(createChildParameter
- (ModelPackage.Literals.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE,
- VersioningFactory.eINSTANCE.createChangePackage()));
-
- newChildDescriptors.add
- (createChildParameter
(ModelPackage.Literals.PROJECT_SPACE__MERGED_VERSION,
VersioningFactory.eINSTANCE.createPrimaryVersionSpec()));
}
diff --git a/bundles/org.eclipse.emf.emfstore.client/model/client.ecore b/bundles/org.eclipse.emf.emfstore.client/model/client.ecore
index d62f37c..6e103ee 100644
--- a/bundles/org.eclipse.emf.emfstore.client/model/client.ecore
+++ b/bundles/org.eclipse.emf.emfstore.client/model/client.ecore
@@ -38,8 +38,6 @@
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ProjectSpace" eSuperTypes="../../org.eclipse.emf.emfstore.common.model/model/common.ecore#//IdentifiableElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="project" eType="ecore:EClass ../../org.eclipse.emf.emfstore.common.model/model/common.ecore#//Project"
- volatile="true" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="projectId" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.emf.emfstore.server.model/model/server.ecore#//ProjectId"
containment="true"/>
@@ -66,8 +64,6 @@
upperBound="-1" eType="ecore:EClass ../../org.eclipse.emf.emfstore.common.model/model/common.ecore#//EMFStoreProperty"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="workspace" eType="#//Workspace"
eOpposite="#//Workspace/projectSpaces"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="localChangePackage" eType="ecore:EClass ../../org.eclipse.emf.emfstore.server.model/model/server.ecore#//versioning/ChangePackage"
- volatile="true" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="mergedVersion" eType="ecore:EClass ../../org.eclipse.emf.emfstore.server.model/model/server.ecore#//versioning/PrimaryVersionSpec"
containment="true"/>
</eClassifiers>
diff --git a/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/ModelPackage.java b/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/ModelPackage.java
index d893d04..fce025b 100644
--- a/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/ModelPackage.java
+++ b/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/ModelPackage.java
@@ -301,16 +301,6 @@
int PROJECT_SPACE__IDENTIFIER = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT__IDENTIFIER;
/**
- * The feature id for the '<em><b>Project</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int PROJECT_SPACE__PROJECT = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 0;
-
- /**
* The feature id for the '<em><b>Project Id</b></em>' containment reference.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -318,7 +308,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__PROJECT_ID = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 1;
+ int PROJECT_SPACE__PROJECT_ID = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Project Name</b></em>' attribute.
@@ -327,7 +317,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__PROJECT_NAME = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 2;
+ int PROJECT_SPACE__PROJECT_NAME = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Project Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
@@ -336,7 +326,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__PROJECT_DESCRIPTION = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 3;
+ int PROJECT_SPACE__PROJECT_DESCRIPTION = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Usersession</b></em>' reference.
@@ -345,7 +335,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__USERSESSION = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 4;
+ int PROJECT_SPACE__USERSESSION = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Last Updated</b></em>' attribute.
@@ -354,7 +344,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__LAST_UPDATED = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 5;
+ int PROJECT_SPACE__LAST_UPDATED = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Base Version</b></em>' containment reference.
@@ -364,7 +354,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__BASE_VERSION = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 6;
+ int PROJECT_SPACE__BASE_VERSION = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Resource Count</b></em>' attribute.
@@ -373,7 +363,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__RESOURCE_COUNT = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 7;
+ int PROJECT_SPACE__RESOURCE_COUNT = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Dirty</b></em>' attribute.
@@ -382,7 +372,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__DIRTY = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 8;
+ int PROJECT_SPACE__DIRTY = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Old Log Messages</b></em>' attribute list.
@@ -392,7 +382,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__OLD_LOG_MESSAGES = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 9;
+ int PROJECT_SPACE__OLD_LOG_MESSAGES = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Waiting Uploads</b></em>' containment reference list.
@@ -402,7 +392,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__WAITING_UPLOADS = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 10;
+ int PROJECT_SPACE__WAITING_UPLOADS = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Properties</b></em>' containment reference list.
@@ -412,7 +402,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__PROPERTIES = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 11;
+ int PROJECT_SPACE__PROPERTIES = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Changed Shared Properties</b></em>' reference list.
@@ -422,7 +412,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__CHANGED_SHARED_PROPERTIES = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 12;
+ int PROJECT_SPACE__CHANGED_SHARED_PROPERTIES = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Workspace</b></em>' container reference.
@@ -432,17 +422,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__WORKSPACE = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 13;
-
- /**
- * The feature id for the '<em><b>Local Change Package</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int PROJECT_SPACE__LOCAL_CHANGE_PACKAGE = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 14;
+ int PROJECT_SPACE__WORKSPACE = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Merged Version</b></em>' containment reference.
@@ -452,7 +432,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE__MERGED_VERSION = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 15;
+ int PROJECT_SPACE__MERGED_VERSION = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 13;
/**
* The number of structural features of the '<em>Project Space</em>' class.
@@ -462,7 +442,7 @@
* @generated
* @ordered
*/
- int PROJECT_SPACE_FEATURE_COUNT = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 16;
+ int PROJECT_SPACE_FEATURE_COUNT = org.eclipse.emf.emfstore.internal.common.model.ModelPackage.IDENTIFIABLE_ELEMENT_FEATURE_COUNT + 14;
/**
* The meta object id for the '{@link org.eclipse.emf.emfstore.internal.client.model.impl.PendingFileTransferImpl
@@ -796,19 +776,6 @@
/**
* Returns the meta object for the containment reference '
- * {@link org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#getProject <em>Project</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @return the meta object for the containment reference '<em>Project</em>'.
- * @see org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#getProject()
- * @see #getProjectSpace()
- * @generated
- */
- EReference getProjectSpace_Project();
-
- /**
- * Returns the meta object for the containment reference '
* {@link org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#getProjectId <em>Project Id</em>}'.
* <!-- begin-user-doc
* --> <!-- end-user-doc -->
@@ -974,20 +941,6 @@
/**
* Returns the meta object for the containment reference '
- * {@link org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#getLocalChangePackage
- * <em>Local Change Package</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @return the meta object for the containment reference '<em>Local Change Package</em>'.
- * @see org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#getLocalChangePackage()
- * @see #getProjectSpace()
- * @generated
- */
- EReference getProjectSpace_LocalChangePackage();
-
- /**
- * Returns the meta object for the containment reference '
* {@link org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#getMergedVersion <em>Merged Version</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1302,15 +1255,6 @@
EClass PROJECT_SPACE = eINSTANCE.getProjectSpace();
/**
- * The meta object literal for the '<em><b>Project</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- EReference PROJECT_SPACE__PROJECT = eINSTANCE.getProjectSpace_Project();
-
- /**
* The meta object literal for the '<em><b>Project Id</b></em>' containment reference feature. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -1424,15 +1368,6 @@
EReference PROJECT_SPACE__WORKSPACE = eINSTANCE.getProjectSpace_Workspace();
/**
- * The meta object literal for the '<em><b>Local Change Package</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- EReference PROJECT_SPACE__LOCAL_CHANGE_PACKAGE = eINSTANCE.getProjectSpace_LocalChangePackage();
-
- /**
* The meta object literal for the '<em><b>Merged Version</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ModelPackageImpl.java b/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ModelPackageImpl.java
index 6497fa3..c0a5c29 100644
--- a/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ModelPackageImpl.java
+++ b/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ModelPackageImpl.java
@@ -356,8 +356,7 @@
*
* @generated
*/
- public EReference getProjectSpace_Project()
- {
+ public EReference getProjectSpace_ProjectId() {
return (EReference) projectSpaceEClass.getEStructuralFeatures().get(0);
}
@@ -367,18 +366,8 @@
*
* @generated
*/
- public EReference getProjectSpace_ProjectId() {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
public EAttribute getProjectSpace_ProjectName() {
- return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(2);
+ return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(1);
}
/**
@@ -388,7 +377,7 @@
* @generated
*/
public EAttribute getProjectSpace_ProjectDescription() {
- return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(3);
+ return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(2);
}
/**
@@ -398,7 +387,7 @@
* @generated
*/
public EReference getProjectSpace_Usersession() {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(4);
+ return (EReference) projectSpaceEClass.getEStructuralFeatures().get(3);
}
/**
@@ -408,7 +397,7 @@
* @generated
*/
public EAttribute getProjectSpace_LastUpdated() {
- return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(5);
+ return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(4);
}
/**
@@ -418,7 +407,7 @@
* @generated
*/
public EReference getProjectSpace_BaseVersion() {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(6);
+ return (EReference) projectSpaceEClass.getEStructuralFeatures().get(5);
}
/**
@@ -428,7 +417,7 @@
* @generated
*/
public EAttribute getProjectSpace_ResourceCount() {
- return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(7);
+ return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(6);
}
/**
@@ -438,7 +427,7 @@
* @generated
*/
public EAttribute getProjectSpace_Dirty() {
- return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(8);
+ return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(7);
}
/**
@@ -448,7 +437,7 @@
* @generated
*/
public EAttribute getProjectSpace_OldLogMessages() {
- return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(9);
+ return (EAttribute) projectSpaceEClass.getEStructuralFeatures().get(8);
}
/**
@@ -458,7 +447,7 @@
* @generated
*/
public EReference getProjectSpace_WaitingUploads() {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(10);
+ return (EReference) projectSpaceEClass.getEStructuralFeatures().get(9);
}
/**
@@ -468,7 +457,7 @@
* @generated
*/
public EReference getProjectSpace_Properties() {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(11);
+ return (EReference) projectSpaceEClass.getEStructuralFeatures().get(10);
}
/**
@@ -478,7 +467,7 @@
* @generated
*/
public EReference getProjectSpace_ChangedSharedProperties() {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(12);
+ return (EReference) projectSpaceEClass.getEStructuralFeatures().get(11);
}
/**
@@ -488,18 +477,7 @@
* @generated
*/
public EReference getProjectSpace_Workspace() {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(13);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getProjectSpace_LocalChangePackage()
- {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(14);
+ return (EReference) projectSpaceEClass.getEStructuralFeatures().get(12);
}
/**
@@ -509,7 +487,7 @@
* @generated
*/
public EReference getProjectSpace_MergedVersion() {
- return (EReference) projectSpaceEClass.getEStructuralFeatures().get(15);
+ return (EReference) projectSpaceEClass.getEStructuralFeatures().get(13);
}
/**
@@ -638,7 +616,6 @@
createEReference(usersessionEClass, USERSESSION__CHANGED_PROPERTIES);
projectSpaceEClass = createEClass(PROJECT_SPACE);
- createEReference(projectSpaceEClass, PROJECT_SPACE__PROJECT);
createEReference(projectSpaceEClass, PROJECT_SPACE__PROJECT_ID);
createEAttribute(projectSpaceEClass, PROJECT_SPACE__PROJECT_NAME);
createEAttribute(projectSpaceEClass, PROJECT_SPACE__PROJECT_DESCRIPTION);
@@ -652,7 +629,6 @@
createEReference(projectSpaceEClass, PROJECT_SPACE__PROPERTIES);
createEReference(projectSpaceEClass, PROJECT_SPACE__CHANGED_SHARED_PROPERTIES);
createEReference(projectSpaceEClass, PROJECT_SPACE__WORKSPACE);
- createEReference(projectSpaceEClass, PROJECT_SPACE__LOCAL_CHANGE_PACKAGE);
createEReference(projectSpaceEClass, PROJECT_SPACE__MERGED_VERSION);
pendingFileTransferEClass = createEClass(PENDING_FILE_TRANSFER);
@@ -766,9 +742,6 @@
initEClass(projectSpaceEClass, ProjectSpace.class, "ProjectSpace", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
- initEReference(getProjectSpace_Project(), theModelPackage_2.getProject(), null, "project", null, 0, 1,
- ProjectSpace.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getProjectSpace_ProjectId(), theModelPackage_1.getProjectId(), null, "projectId", null, 1, 1,
ProjectSpace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -807,9 +780,6 @@
initEReference(getProjectSpace_Workspace(), this.getWorkspace(), this.getWorkspace_ProjectSpaces(),
"workspace", null, 0, 1, ProjectSpace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getProjectSpace_LocalChangePackage(), theVersioningPackage.getChangePackage(), null,
- "localChangePackage", null, 0, 1, ProjectSpace.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE,
- IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getProjectSpace_MergedVersion(), theVersioningPackage.getPrimaryVersionSpec(), null,
"mergedVersion", null, 0, 1, ProjectSpace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ProjectSpaceBase.java b/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ProjectSpaceBase.java
index e84d951..803ab28 100644
--- a/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ProjectSpaceBase.java
+++ b/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ProjectSpaceBase.java
@@ -14,6 +14,7 @@
import java.io.File;
import java.io.IOException;
+import java.lang.ref.WeakReference;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
@@ -35,6 +36,7 @@
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
@@ -48,6 +50,7 @@
import org.eclipse.emf.emfstore.client.callbacks.ESCommitCallback;
import org.eclipse.emf.emfstore.client.callbacks.ESUpdateCallback;
import org.eclipse.emf.emfstore.client.changetracking.ESCommandStack;
+import org.eclipse.emf.emfstore.client.exceptions.ESProjectIsClosedException;
import org.eclipse.emf.emfstore.client.handler.ESRunnableContext;
import org.eclipse.emf.emfstore.client.observer.ESLoginObserver;
import org.eclipse.emf.emfstore.client.observer.ESMergeObserver;
@@ -150,6 +153,9 @@
private ECrossReferenceAdapter crossReferenceAdapter;
private ESRunnableContext runnableContext;
+ private WeakReference<Project> projectReference;
+ private WeakReference<ChangePackage> localChangePackageReference;
+
/**
* Constructor.
*/
@@ -159,6 +165,98 @@
}
/**
+ *
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#getProject()
+ */
+ public Project getProject()
+ {
+ if (isClosed()) {
+ throw new ESProjectIsClosedException();
+ }
+ Project project = null;
+ if (projectReference != null) {
+ project = projectReference.get();
+ }
+ if (project == null) {
+ final URI projectURI = ClientURIUtil.createProjectURI(this);
+ project = (Project) loadEObjectFromURI(projectURI);
+ projectReference = new WeakReference<Project>(project);
+ }
+ return project != null && project.eIsProxy() ? (Project) eResolveProxy((InternalEObject) project) : project;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#setProject(org.eclipse.emf.emfstore.internal.common.model.Project)
+ */
+ public void setProject(Project newProject)
+ {
+ projectReference = new WeakReference<Project>(newProject);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#getLocalChangePackage()
+ */
+ public ChangePackage getLocalChangePackage()
+ {
+ if (isClosed()) {
+ throw new ESProjectIsClosedException();
+ }
+ ChangePackage lcp = null;
+ if (localChangePackageReference != null) {
+ lcp = localChangePackageReference.get();
+ }
+ if (lcp == null) {
+ final URI lcpURI = ClientURIUtil.createOperationsURI(this);
+ lcp = (ChangePackage) loadEObjectFromURI(lcpURI);
+ localChangePackageReference = new WeakReference<ChangePackage>(lcp);
+ }
+
+ return lcp;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.emfstore.internal.client.model.ProjectSpace#setLocalChangePackage(org.eclipse.emf.emfstore.internal.server.model.versioning.ChangePackage)
+ */
+ public void setLocalChangePackage(ChangePackage newLocalChangePackage)
+ {
+ localChangePackageReference = new WeakReference<ChangePackage>(newLocalChangePackage);
+ }
+
+ private EObject loadEObjectFromURI(URI uri) {
+ ResourceSet resourceSet = getResourceSet();
+
+ if (resourceSet == null) {
+ final ESExtensionPoint extensionPoint = new ESExtensionPoint(
+ "org.eclipse.emf.emfstore.client.resourceSetProvider", //$NON-NLS-1$
+ true);
+ extensionPoint.setComparator(new ESPriorityComparator("priority", true)); //$NON-NLS-1$
+ extensionPoint.reload();
+ final ESResourceSetProvider resourceSetProvider = extensionPoint.getElementWithHighestPriority().getClass(
+ "class", //$NON-NLS-1$
+ ESResourceSetProvider.class);
+ resourceSet = resourceSetProvider.getResourceSet();
+ }
+
+ if (resourceSet.getURIConverter().exists(uri, null)) {
+ final Resource resource = resourceSet.getResource(uri, true);
+ return resource.getContents().get(0);
+ }
+
+ return null;
+ }
+
+ /**
* <p>
* Provides a context in which a {@link Runnable} is executed.
* </p>
diff --git a/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ProjectSpaceImpl.java b/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ProjectSpaceImpl.java
index 0fc060e..6544987 100644
--- a/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ProjectSpaceImpl.java
+++ b/bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/impl/ProjectSpaceImpl.java
@@ -12,7 +12,6 @@
******************************************************************************/
package org.eclipse.emf.emfstore.internal.client.model.impl;
-import java.lang.ref.WeakReference;
import java.util.Collection;
import java.util.Date;
@@ -31,8 +30,6 @@
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.emf.emfstore.client.exceptions.ESProjectIsClosedException;
-import org.eclipse.emf.emfstore.client.util.ClientURIUtil;
import org.eclipse.emf.emfstore.common.ESResourceSetProvider;
import org.eclipse.emf.emfstore.common.extensionpoint.ESExtensionPoint;
import org.eclipse.emf.emfstore.common.extensionpoint.ESPriorityComparator;
@@ -40,10 +37,8 @@
import org.eclipse.emf.emfstore.internal.client.model.Usersession;
import org.eclipse.emf.emfstore.internal.client.model.Workspace;
import org.eclipse.emf.emfstore.internal.common.model.EMFStoreProperty;
-import org.eclipse.emf.emfstore.internal.common.model.Project;
import org.eclipse.emf.emfstore.internal.server.model.FileIdentifier;
import org.eclipse.emf.emfstore.internal.server.model.ProjectId;
-import org.eclipse.emf.emfstore.internal.server.model.versioning.ChangePackage;
import org.eclipse.emf.emfstore.internal.server.model.versioning.PrimaryVersionSpec;
/**
@@ -274,9 +269,6 @@
*/
protected PrimaryVersionSpec mergedVersion;
- private WeakReference<Project> projectReference = null;
- private WeakReference<ChangePackage> localChangePackageReference = null;
-
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -320,9 +312,8 @@
* @generated
*/
public Workspace basicGetWorkspace() {
- if (eContainerFeatureID() != ModelPackage.PROJECT_SPACE__WORKSPACE) {
+ if (eContainerFeatureID() != ModelPackage.PROJECT_SPACE__WORKSPACE)
return null;
- }
return (Workspace) eInternalContainer();
}
@@ -332,17 +323,16 @@
* @generated
*/
public NotificationChain basicSetBaseVersion(PrimaryVersionSpec newBaseVersion, NotificationChain msgs) {
- final PrimaryVersionSpec oldBaseVersion = baseVersion;
+ PrimaryVersionSpec oldBaseVersion = baseVersion;
baseVersion = newBaseVersion;
if (eNotificationRequired())
{
- final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
ModelPackage.PROJECT_SPACE__BASE_VERSION, oldBaseVersion, newBaseVersion);
- if (msgs == null) {
+ if (msgs == null)
msgs = notification;
- } else {
+ else
msgs.add(notification);
- }
}
return msgs;
}
@@ -353,17 +343,16 @@
* @generated
*/
public NotificationChain basicSetProjectId(ProjectId newProjectId, NotificationChain msgs) {
- final ProjectId oldProjectId = projectId;
+ ProjectId oldProjectId = projectId;
projectId = newProjectId;
if (eNotificationRequired())
{
- final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
ModelPackage.PROJECT_SPACE__PROJECT_ID, oldProjectId, newProjectId);
- if (msgs == null) {
+ if (msgs == null)
msgs = notification;
- } else {
+ else
msgs.add(notification);
- }
}
return msgs;
}
@@ -405,31 +394,23 @@
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID)
{
- case ModelPackage.PROJECT_SPACE__PROJECT:
- if (resolve) {
- return getProject();
- }
- return basicGetProject();
case ModelPackage.PROJECT_SPACE__PROJECT_ID:
- if (resolve) {
+ if (resolve)
return getProjectId();
- }
return basicGetProjectId();
case ModelPackage.PROJECT_SPACE__PROJECT_NAME:
return getProjectName();
case ModelPackage.PROJECT_SPACE__PROJECT_DESCRIPTION:
return getProjectDescription();
case ModelPackage.PROJECT_SPACE__USERSESSION:
- if (resolve) {
+ if (resolve)
return getUsersession();
- }
return basicGetUsersession();
case ModelPackage.PROJECT_SPACE__LAST_UPDATED:
return getLastUpdated();
case ModelPackage.PROJECT_SPACE__BASE_VERSION:
- if (resolve) {
+ if (resolve)
return getBaseVersion();
- }
return basicGetBaseVersion();
case ModelPackage.PROJECT_SPACE__RESOURCE_COUNT:
return getResourceCount();
@@ -444,19 +425,12 @@
case ModelPackage.PROJECT_SPACE__CHANGED_SHARED_PROPERTIES:
return getChangedSharedProperties();
case ModelPackage.PROJECT_SPACE__WORKSPACE:
- if (resolve) {
+ if (resolve)
return getWorkspace();
- }
return basicGetWorkspace();
- case ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE:
- if (resolve) {
- return getLocalChangePackage();
- }
- return basicGetLocalChangePackage();
case ModelPackage.PROJECT_SPACE__MERGED_VERSION:
- if (resolve) {
+ if (resolve)
return getMergedVersion();
- }
return basicGetMergedVersion();
}
return super.eGet(featureID, resolve, coreType);
@@ -473,9 +447,8 @@
switch (featureID)
{
case ModelPackage.PROJECT_SPACE__WORKSPACE:
- if (eInternalContainer() != null) {
+ if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
- }
return basicSetWorkspace((Workspace) otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
@@ -490,8 +463,6 @@
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID)
{
- case ModelPackage.PROJECT_SPACE__PROJECT:
- return basicSetProject(null, msgs);
case ModelPackage.PROJECT_SPACE__PROJECT_ID:
return basicSetProjectId(null, msgs);
case ModelPackage.PROJECT_SPACE__BASE_VERSION:
@@ -502,8 +473,6 @@
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
case ModelPackage.PROJECT_SPACE__WORKSPACE:
return basicSetWorkspace(null, msgs);
- case ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE:
- return basicSetLocalChangePackage(null, msgs);
case ModelPackage.PROJECT_SPACE__MERGED_VERSION:
return basicSetMergedVersion(null, msgs);
}
@@ -519,8 +488,6 @@
public boolean eIsSet(int featureID) {
switch (featureID)
{
- case ModelPackage.PROJECT_SPACE__PROJECT:
- return basicGetProject() != null;
case ModelPackage.PROJECT_SPACE__PROJECT_ID:
return projectId != null;
case ModelPackage.PROJECT_SPACE__PROJECT_NAME:
@@ -548,8 +515,6 @@
return changedSharedProperties != null && !changedSharedProperties.isEmpty();
case ModelPackage.PROJECT_SPACE__WORKSPACE:
return basicGetWorkspace() != null;
- case ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE:
- return basicGetLocalChangePackage() != null;
case ModelPackage.PROJECT_SPACE__MERGED_VERSION:
return mergedVersion != null;
}
@@ -566,9 +531,6 @@
public void eSet(int featureID, Object newValue) {
switch (featureID)
{
- case ModelPackage.PROJECT_SPACE__PROJECT:
- setProject((Project) newValue);
- return;
case ModelPackage.PROJECT_SPACE__PROJECT_ID:
setProjectId((ProjectId) newValue);
return;
@@ -612,9 +574,6 @@
case ModelPackage.PROJECT_SPACE__WORKSPACE:
setWorkspace((Workspace) newValue);
return;
- case ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE:
- setLocalChangePackage((ChangePackage) newValue);
- return;
case ModelPackage.PROJECT_SPACE__MERGED_VERSION:
setMergedVersion((PrimaryVersionSpec) newValue);
return;
@@ -633,112 +592,6 @@
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public Project getProject()
- {
- final Project project = basicGetProject();
- return project != null && project.eIsProxy() ? (Project) eResolveProxy((InternalEObject) project) : project;
- }
-
- /**
- * <!-- begin-user-doc -->
- * Gets the project from the reference or reloads it if it was garbage collected.
- *
- * @return the project associated with this project space
- * <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public Project basicGetProject()
- {
- if (isClosed()) {
- throw new ESProjectIsClosedException();
- }
- Project project = null;
- if (projectReference != null) {
- project = projectReference.get();
- }
- if (project == null) {
- final URI projectURI = ClientURIUtil.createProjectURI(this);
- project = (Project) loadEObjectFromURI(projectURI);
- projectReference = new WeakReference<Project>(project);
- }
- return project;
- }
-
- /**
- * <!-- begin-user-doc -->
- * Creates a weak reference with the given project.
- *
- * @param newProject the new project
- * @param msgs the notification chain to add messages
- * @return messages
- * <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public NotificationChain basicSetProject(Project newProject, NotificationChain msgs)
- {
- Project oldProject = null;
- if (projectReference != null) {
- oldProject = getProject();
- }
- projectReference = new WeakReference<Project>(newProject);
- if (eNotificationRequired())
- {
- final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
- ModelPackage.PROJECT_SPACE__PROJECT, oldProject, newProject);
- if (msgs == null) {
- msgs = notification;
- } else {
- msgs.add(notification);
- }
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * Sets the new project.
- *
- * @param newProject the new project
- * <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public void setProject(Project newProject)
- {
- Project project = null;
- if (projectReference != null) {
- project = getProject();
- }
- if (newProject != project)
- {
- NotificationChain msgs = null;
- if (project != null) {
- msgs = ((InternalEObject) project).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - ModelPackage.PROJECT_SPACE__PROJECT, null, msgs);
- }
- if (newProject != null) {
- msgs = ((InternalEObject) newProject).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- - ModelPackage.PROJECT_SPACE__PROJECT, null, msgs);
- }
- msgs = basicSetProject(newProject, msgs);
- if (msgs != null) {
- msgs.dispatch();
- }
- }
- else if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__PROJECT,
- newProject, newProject));
- }
- }
-
- /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
@@ -747,9 +600,6 @@
public void eUnset(int featureID) {
switch (featureID)
{
- case ModelPackage.PROJECT_SPACE__PROJECT:
- setProject((Project) null);
- return;
case ModelPackage.PROJECT_SPACE__PROJECT_ID:
setProjectId((ProjectId) null);
return;
@@ -789,9 +639,6 @@
case ModelPackage.PROJECT_SPACE__WORKSPACE:
setWorkspace((Workspace) null);
return;
- case ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE:
- setLocalChangePackage((ChangePackage) null);
- return;
case ModelPackage.PROJECT_SPACE__MERGED_VERSION:
setMergedVersion((PrimaryVersionSpec) null);
return;
@@ -807,11 +654,11 @@
public PrimaryVersionSpec getBaseVersion() {
if (baseVersion != null && baseVersion.eIsProxy())
{
- final InternalEObject oldBaseVersion = (InternalEObject) baseVersion;
+ InternalEObject oldBaseVersion = (InternalEObject) baseVersion;
baseVersion = (PrimaryVersionSpec) eResolveProxy(oldBaseVersion);
if (baseVersion != oldBaseVersion)
{
- final InternalEObject newBaseVersion = (InternalEObject) baseVersion;
+ InternalEObject newBaseVersion = (InternalEObject) baseVersion;
NotificationChain msgs = oldBaseVersion.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__BASE_VERSION, null, null);
if (newBaseVersion.eInternalContainer() == null)
@@ -819,13 +666,11 @@
msgs = newBaseVersion.eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__BASE_VERSION, null, msgs);
}
- if (msgs != null) {
+ if (msgs != null)
msgs.dispatch();
- }
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelPackage.PROJECT_SPACE__BASE_VERSION,
oldBaseVersion, baseVersion));
- }
}
}
return baseVersion;
@@ -885,11 +730,11 @@
public ProjectId getProjectId() {
if (projectId != null && projectId.eIsProxy())
{
- final InternalEObject oldProjectId = (InternalEObject) projectId;
+ InternalEObject oldProjectId = (InternalEObject) projectId;
projectId = (ProjectId) eResolveProxy(oldProjectId);
if (projectId != oldProjectId)
{
- final InternalEObject newProjectId = (InternalEObject) projectId;
+ InternalEObject newProjectId = (InternalEObject) projectId;
NotificationChain msgs = oldProjectId.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__PROJECT_ID, null, null);
if (newProjectId.eInternalContainer() == null)
@@ -897,13 +742,11 @@
msgs = newProjectId.eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__PROJECT_ID, null, msgs);
}
- if (msgs != null) {
+ if (msgs != null)
msgs.dispatch();
- }
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelPackage.PROJECT_SPACE__PROJECT_ID,
oldProjectId, projectId));
- }
}
}
return projectId;
@@ -949,14 +792,13 @@
public Usersession getUsersession() {
if (usersession != null && usersession.eIsProxy())
{
- final InternalEObject oldUsersession = (InternalEObject) usersession;
+ InternalEObject oldUsersession = (InternalEObject) usersession;
usersession = (Usersession) eResolveProxy(oldUsersession);
if (usersession != oldUsersession)
{
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelPackage.PROJECT_SPACE__USERSESSION,
oldUsersession, usersession));
- }
}
}
return usersession;
@@ -983,9 +825,8 @@
* @generated
*/
public Workspace getWorkspace() {
- if (eContainerFeatureID() != ModelPackage.PROJECT_SPACE__WORKSPACE) {
+ if (eContainerFeatureID() != ModelPackage.PROJECT_SPACE__WORKSPACE)
return null;
- }
return (Workspace) eContainer();
}
@@ -1007,23 +848,19 @@
if (newBaseVersion != baseVersion)
{
NotificationChain msgs = null;
- if (baseVersion != null) {
+ if (baseVersion != null)
msgs = ((InternalEObject) baseVersion).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__BASE_VERSION, null, msgs);
- }
- if (newBaseVersion != null) {
+ if (newBaseVersion != null)
msgs = ((InternalEObject) newBaseVersion).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__BASE_VERSION, null, msgs);
- }
msgs = basicSetBaseVersion(newBaseVersion, msgs);
- if (msgs != null) {
+ if (msgs != null)
msgs.dispatch();
- }
}
- else if (eNotificationRequired()) {
+ else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__BASE_VERSION,
newBaseVersion, newBaseVersion));
- }
}
/**
@@ -1032,11 +869,10 @@
* @generated
*/
public void setDirty(boolean newDirty) {
- final boolean oldDirty = dirty;
+ boolean oldDirty = dirty;
dirty = newDirty;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__DIRTY, oldDirty, dirty));
- }
}
/**
@@ -1045,12 +881,11 @@
* @generated
*/
public void setLastUpdated(Date newLastUpdated) {
- final Date oldLastUpdated = lastUpdated;
+ Date oldLastUpdated = lastUpdated;
lastUpdated = newLastUpdated;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__LAST_UPDATED,
oldLastUpdated, lastUpdated));
- }
}
/**
@@ -1059,12 +894,11 @@
* @generated
*/
public void setProjectDescription(String newProjectDescription) {
- final String oldProjectDescription = projectDescription;
+ String oldProjectDescription = projectDescription;
projectDescription = newProjectDescription;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__PROJECT_DESCRIPTION,
oldProjectDescription, projectDescription));
- }
}
/**
@@ -1076,23 +910,19 @@
if (newProjectId != projectId)
{
NotificationChain msgs = null;
- if (projectId != null) {
+ if (projectId != null)
msgs = ((InternalEObject) projectId).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__PROJECT_ID, null, msgs);
- }
- if (newProjectId != null) {
+ if (newProjectId != null)
msgs = ((InternalEObject) newProjectId).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__PROJECT_ID, null, msgs);
- }
msgs = basicSetProjectId(newProjectId, msgs);
- if (msgs != null) {
+ if (msgs != null)
msgs.dispatch();
- }
}
- else if (eNotificationRequired()) {
+ else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__PROJECT_ID, newProjectId,
newProjectId));
- }
}
/**
@@ -1101,12 +931,11 @@
* @generated
*/
public void setProjectName(String newProjectName) {
- final String oldProjectName = projectName;
+ String oldProjectName = projectName;
projectName = newProjectName;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__PROJECT_NAME,
oldProjectName, projectName));
- }
}
/**
@@ -1115,12 +944,11 @@
* @generated
*/
public void setResourceCount(int newResourceCount) {
- final int oldResourceCount = resourceCount;
+ int oldResourceCount = resourceCount;
resourceCount = newResourceCount;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__RESOURCE_COUNT,
oldResourceCount, resourceCount));
- }
}
/**
@@ -1129,12 +957,11 @@
* @generated
*/
public void setUsersession(Usersession newUsersession) {
- final Usersession oldUsersession = usersession;
+ Usersession oldUsersession = usersession;
usersession = newUsersession;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__USERSESSION,
oldUsersession, usersession));
- }
}
/**
@@ -1145,136 +972,23 @@
*/
public void setWorkspace(Workspace newWorkspace) {
if (newWorkspace != eInternalContainer()
- || eContainerFeatureID() != ModelPackage.PROJECT_SPACE__WORKSPACE && newWorkspace != null)
+ || (eContainerFeatureID() != ModelPackage.PROJECT_SPACE__WORKSPACE && newWorkspace != null))
{
- if (EcoreUtil.isAncestor(this, newWorkspace)) {
+ if (EcoreUtil.isAncestor(this, newWorkspace))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- }
NotificationChain msgs = null;
- if (eInternalContainer() != null) {
+ if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
- }
- if (newWorkspace != null) {
+ if (newWorkspace != null)
msgs = ((InternalEObject) newWorkspace).eInverseAdd(this, ModelPackage.WORKSPACE__PROJECT_SPACES,
Workspace.class, msgs);
- }
msgs = basicSetWorkspace(newWorkspace, msgs);
- if (msgs != null) {
+ if (msgs != null)
msgs.dispatch();
- }
}
- else if (eNotificationRequired()) {
+ else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__WORKSPACE, newWorkspace,
newWorkspace));
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ChangePackage getLocalChangePackage()
- {
- final ChangePackage localChangePackage = basicGetLocalChangePackage();
- return localChangePackage != null && localChangePackage.eIsProxy() ? (ChangePackage) eResolveProxy((InternalEObject) localChangePackage)
- : localChangePackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * Gets the local change package from the resource or loads it if it was garbage collected.
- *
- * @return the change package associated with this project space
- * <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public ChangePackage basicGetLocalChangePackage()
- {
- if (isClosed()) {
- throw new ESProjectIsClosedException();
- }
- ChangePackage lcp = null;
- if (localChangePackageReference != null) {
- lcp = localChangePackageReference.get();
- }
- if (lcp == null) {
- final URI lcpURI = ClientURIUtil.createOperationsURI(this);
- lcp = (ChangePackage) loadEObjectFromURI(lcpURI);
- localChangePackageReference = new WeakReference<ChangePackage>(lcp);
- }
-
- return lcp;
- }
-
- /**
- * <!-- begin-user-doc -->
- * Creates a new weak reference for the local change package.
- *
- * @param newLocalChangePackage the new local change package
- * @param msgs the notification chain
- * @return the notification chain with added messages
- * <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public NotificationChain basicSetLocalChangePackage(ChangePackage newLocalChangePackage, NotificationChain msgs)
- {
- ChangePackage oldLocalChangePackage = null;
- if (localChangePackageReference != null) {
- oldLocalChangePackage = getLocalChangePackage();
- }
- localChangePackageReference = new WeakReference<ChangePackage>(newLocalChangePackage);
- if (eNotificationRequired())
- {
- final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
- ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE, oldLocalChangePackage, newLocalChangePackage);
- if (msgs == null) {
- msgs = notification;
- } else {
- msgs.add(notification);
- }
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * Sets the local change package.
- *
- * @param newLocalChangePackage the new change package
- * <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public void setLocalChangePackage(ChangePackage newLocalChangePackage)
- {
- ChangePackage localChangePackage = null;
- if (localChangePackageReference != null) {
- localChangePackage = getLocalChangePackage();
- }
- if (newLocalChangePackage != localChangePackage)
- {
- NotificationChain msgs = null;
- if (localChangePackage != null) {
- msgs = ((InternalEObject) localChangePackage).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE, null, msgs);
- }
- if (newLocalChangePackage != null) {
- msgs = ((InternalEObject) newLocalChangePackage).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- - ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE, null, msgs);
- }
- msgs = basicSetLocalChangePackage(newLocalChangePackage, msgs);
- if (msgs != null) {
- msgs.dispatch();
- }
- }
- else if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__LOCAL_CHANGE_PACKAGE,
- newLocalChangePackage, newLocalChangePackage));
- }
}
/**
@@ -1286,11 +1000,11 @@
public PrimaryVersionSpec getMergedVersion() {
if (mergedVersion != null && mergedVersion.eIsProxy())
{
- final InternalEObject oldMergedVersion = (InternalEObject) mergedVersion;
+ InternalEObject oldMergedVersion = (InternalEObject) mergedVersion;
mergedVersion = (PrimaryVersionSpec) eResolveProxy(oldMergedVersion);
if (mergedVersion != oldMergedVersion)
{
- final InternalEObject newMergedVersion = (InternalEObject) mergedVersion;
+ InternalEObject newMergedVersion = (InternalEObject) mergedVersion;
NotificationChain msgs = oldMergedVersion.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__MERGED_VERSION, null, null);
if (newMergedVersion.eInternalContainer() == null)
@@ -1298,13 +1012,11 @@
msgs = newMergedVersion.eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__MERGED_VERSION, null, msgs);
}
- if (msgs != null) {
+ if (msgs != null)
msgs.dispatch();
- }
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
ModelPackage.PROJECT_SPACE__MERGED_VERSION, oldMergedVersion, mergedVersion));
- }
}
}
return mergedVersion;
@@ -1327,17 +1039,16 @@
* @generated
*/
public NotificationChain basicSetMergedVersion(PrimaryVersionSpec newMergedVersion, NotificationChain msgs) {
- final PrimaryVersionSpec oldMergedVersion = mergedVersion;
+ PrimaryVersionSpec oldMergedVersion = mergedVersion;
mergedVersion = newMergedVersion;
if (eNotificationRequired())
{
- final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
ModelPackage.PROJECT_SPACE__MERGED_VERSION, oldMergedVersion, newMergedVersion);
- if (msgs == null) {
+ if (msgs == null)
msgs = notification;
- } else {
+ else
msgs.add(notification);
- }
}
return msgs;
}
@@ -1352,23 +1063,19 @@
if (newMergedVersion != mergedVersion)
{
NotificationChain msgs = null;
- if (mergedVersion != null) {
+ if (mergedVersion != null)
msgs = ((InternalEObject) mergedVersion).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__MERGED_VERSION, null, msgs);
- }
- if (newMergedVersion != null) {
+ if (newMergedVersion != null)
msgs = ((InternalEObject) newMergedVersion).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ModelPackage.PROJECT_SPACE__MERGED_VERSION, null, msgs);
- }
msgs = basicSetMergedVersion(newMergedVersion, msgs);
- if (msgs != null) {
+ if (msgs != null)
msgs.dispatch();
- }
}
- else if (eNotificationRequired()) {
+ else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PROJECT_SPACE__MERGED_VERSION,
newMergedVersion, newMergedVersion));
- }
}
/**
@@ -1379,11 +1086,10 @@
*/
@Override
public String toString() {
- if (eIsProxy()) {
+ if (eIsProxy())
return super.toString();
- }
- final StringBuffer result = new StringBuffer(super.toString());
+ StringBuffer result = new StringBuffer(super.toString());
result.append(" (projectName: ");
result.append(projectName);
result.append(", projectDescription: ");