summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Parker2012-10-22 14:49:48 (EDT)
committer Miles Parker2012-11-01 11:56:49 (EDT)
commit163b166daaade691f71a77290d9d379a019f55ed (patch)
treefe3e11130dd27261eca9658133f2449ddde108f5
parentcec3698ab3c5bc2e7c9928d6c4d61b7f7252186e (diff)
downloadorg.eclipse.mylyn.reviews-163b166daaade691f71a77290d9d379a019f55ed.zip
org.eclipse.mylyn.reviews-163b166daaade691f71a77290d9d379a019f55ed.tar.gz
org.eclipse.mylyn.reviews-163b166daaade691f71a77290d9d379a019f55ed.tar.bz2
324327: Don't suppress containment proxiesrefs/changes/60/8460/3
•Mark containment proxies as true. This is needed to support file level reference resolution for implementations like R4E. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=324327#c30 Change-Id: Ie44c396f417c4b70c673735f0e467af57a1babda Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=324327
-rw-r--r--org.eclipse.mylyn.reviews.core/model/reviews.genmodel11
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Comment.java33
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineLocation.java2
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Review.java61
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewGroup.java34
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItem.java79
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsPackage.java18
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Topic.java32
8 files changed, 194 insertions, 76 deletions
diff --git a/org.eclipse.mylyn.reviews.core/model/reviews.genmodel b/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
index 219bae8..c2416c9 100644
--- a/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
+++ b/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
@@ -6,10 +6,10 @@
modelName="Reviews" modelPluginClass="" nonNLSMarkers="true" rootImplementsInterface=""
suppressEMFTypes="true" suppressEMFMetaData="true" suppressEMFModelTags="true"
codeFormatting="true" testsDirectory="/org.eclipse.mylyn.reviews.core.tests/src"
- importerID="org.eclipse.emf.importer.ecore" bundleManifest="false" complianceLevel="5.0"
- copyrightFields="false" editPluginID="org.eclipse.mylyn.reviews.edit" editorPluginID="org.eclipse.mylyn.reviews.editor"
- testsPluginID="org.eclipse.mylyn.reviews.core.tests" runtimeVersion="2.5" interfaceNamePattern="I{0}"
- classNamePattern="{0}">
+ importerID="org.eclipse.emf.importer.ecore" bundleManifest="false" containmentProxies="true"
+ complianceLevel="5.0" copyrightFields="false" editPluginID="org.eclipse.mylyn.reviews.edit"
+ editorPluginID="org.eclipse.mylyn.reviews.editor" testsPluginID="org.eclipse.mylyn.reviews.core.tests"
+ runtimeVersion="2.5" interfaceNamePattern="I{0}" classNamePattern="{0}">
<foreignModel>reviews.ecore</foreignModel>
<genPackages prefix="Reviews" basePackage="org.eclipse.mylyn" resource="XML" disposableProviderFactory="true"
interfacePackageSuffix="core.model" metaDataPackageSuffix="core.model" classPackageSuffix="internal.core.model"
@@ -91,5 +91,8 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//FileRevision/revision"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//FileRevision/content"/>
</genClasses>
+ <genClasses image="false" ecoreClass="reviews.ecore#//ModelVersioning">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//ModelVersioning/fragmentVersion"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Comment.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Comment.java
index 2e059ad..bd2a575 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Comment.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Comment.java
@@ -204,6 +204,32 @@ public class Comment extends ReviewComponent implements IComment {
* @generated
*/
public ICommentType getType() {
+ if (type != null && type.eIsProxy()) {
+ InternalEObject oldType = (InternalEObject) type;
+ type = (ICommentType) eResolveProxy(oldType);
+ if (type != oldType) {
+ InternalEObject newType = (InternalEObject) type;
+ NotificationChain msgs = oldType.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
+ - ReviewsPackage.COMMENT__TYPE, null, null);
+ if (newType.eInternalContainer() == null) {
+ msgs = newType.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ReviewsPackage.COMMENT__TYPE, null, msgs);
+ }
+ if (msgs != null)
+ msgs.dispatch();
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.COMMENT__TYPE, oldType,
+ type));
+ }
+ }
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ICommentType basicGetType() {
return type;
}
@@ -319,7 +345,8 @@ public class Comment extends ReviewComponent implements IComment {
*/
public List<IComment> getReplies() {
if (replies == null) {
- replies = new EObjectContainmentEList<IComment>(IComment.class, this, ReviewsPackage.COMMENT__REPLIES);
+ replies = new EObjectContainmentEList.Resolving<IComment>(IComment.class, this,
+ ReviewsPackage.COMMENT__REPLIES);
}
return replies;
}
@@ -372,7 +399,9 @@ public class Comment extends ReviewComponent implements IComment {
case ReviewsPackage.COMMENT__AUTHOR:
return getAuthor();
case ReviewsPackage.COMMENT__TYPE:
- return getType();
+ if (resolve)
+ return getType();
+ return basicGetType();
case ReviewsPackage.COMMENT__DESCRIPTION:
return getDescription();
case ReviewsPackage.COMMENT__CREATION_DATE:
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineLocation.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineLocation.java
index a809eff..d0f27b5 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineLocation.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineLocation.java
@@ -67,7 +67,7 @@ public class LineLocation extends Location implements ILineLocation {
*/
public List<ILineRange> getRanges() {
if (ranges == null) {
- ranges = new EObjectContainmentEList<ILineRange>(ILineRange.class, this,
+ ranges = new EObjectContainmentEList.Resolving<ILineRange>(ILineRange.class, this,
ReviewsPackage.LINE_LOCATION__RANGES);
}
return ranges;
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Review.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Review.java
index efd6f15..5670d3f 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Review.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Review.java
@@ -159,6 +159,33 @@ public class Review extends ReviewComponent implements IReview {
* @generated
*/
public ITaskReference getReviewTask() {
+ if (reviewTask != null && reviewTask.eIsProxy()) {
+ InternalEObject oldReviewTask = (InternalEObject) reviewTask;
+ reviewTask = (ITaskReference) eResolveProxy(oldReviewTask);
+ if (reviewTask != oldReviewTask) {
+ InternalEObject newReviewTask = (InternalEObject) reviewTask;
+ NotificationChain msgs = oldReviewTask.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
+ - ReviewsPackage.REVIEW__REVIEW_TASK, null, null);
+ if (newReviewTask.eInternalContainer() == null) {
+ msgs = newReviewTask.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ReviewsPackage.REVIEW__REVIEW_TASK,
+ null, msgs);
+ }
+ if (msgs != null)
+ msgs.dispatch();
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW__REVIEW_TASK,
+ oldReviewTask, reviewTask));
+ }
+ }
+ return reviewTask;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ITaskReference basicGetReviewTask() {
return reviewTask;
}
@@ -209,6 +236,32 @@ public class Review extends ReviewComponent implements IReview {
* @generated
*/
public IReviewState getState() {
+ if (state != null && state.eIsProxy()) {
+ InternalEObject oldState = (InternalEObject) state;
+ state = (IReviewState) eResolveProxy(oldState);
+ if (state != oldState) {
+ InternalEObject newState = (InternalEObject) state;
+ NotificationChain msgs = oldState.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
+ - ReviewsPackage.REVIEW__STATE, null, null);
+ if (newState.eInternalContainer() == null) {
+ msgs = newState.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ReviewsPackage.REVIEW__STATE, null, msgs);
+ }
+ if (msgs != null)
+ msgs.dispatch();
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW__STATE, oldState,
+ state));
+ }
+ }
+ return state;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IReviewState basicGetState() {
return state;
}
@@ -302,9 +355,13 @@ public class Review extends ReviewComponent implements IReview {
case ReviewsPackage.REVIEW__ITEMS:
return getItems();
case ReviewsPackage.REVIEW__REVIEW_TASK:
- return getReviewTask();
+ if (resolve)
+ return getReviewTask();
+ return basicGetReviewTask();
case ReviewsPackage.REVIEW__STATE:
- return getState();
+ if (resolve)
+ return getState();
+ return basicGetState();
case ReviewsPackage.REVIEW__ID:
return getId();
}
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewGroup.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewGroup.java
index 3beaa80..270cdf7 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewGroup.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewGroup.java
@@ -112,7 +112,8 @@ public class ReviewGroup extends ReviewComponent implements IReviewGroup {
*/
public List<IReview> getReviews() {
if (reviews == null) {
- reviews = new EObjectContainmentEList<IReview>(IReview.class, this, ReviewsPackage.REVIEW_GROUP__REVIEWS);
+ reviews = new EObjectContainmentEList.Resolving<IReview>(IReview.class, this,
+ ReviewsPackage.REVIEW_GROUP__REVIEWS);
}
return reviews;
}
@@ -123,6 +124,33 @@ public class ReviewGroup extends ReviewComponent implements IReviewGroup {
* @generated
*/
public ITaskReference getReviewGroupTask() {
+ if (reviewGroupTask != null && reviewGroupTask.eIsProxy()) {
+ InternalEObject oldReviewGroupTask = (InternalEObject) reviewGroupTask;
+ reviewGroupTask = (ITaskReference) eResolveProxy(oldReviewGroupTask);
+ if (reviewGroupTask != oldReviewGroupTask) {
+ InternalEObject newReviewGroupTask = (InternalEObject) reviewGroupTask;
+ NotificationChain msgs = oldReviewGroupTask.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
+ - ReviewsPackage.REVIEW_GROUP__REVIEW_GROUP_TASK, null, null);
+ if (newReviewGroupTask.eInternalContainer() == null) {
+ msgs = newReviewGroupTask.eInverseAdd(this, EOPPOSITE_FEATURE_BASE
+ - ReviewsPackage.REVIEW_GROUP__REVIEW_GROUP_TASK, null, msgs);
+ }
+ if (msgs != null)
+ msgs.dispatch();
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ ReviewsPackage.REVIEW_GROUP__REVIEW_GROUP_TASK, oldReviewGroupTask, reviewGroupTask));
+ }
+ }
+ return reviewGroupTask;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ITaskReference basicGetReviewGroupTask() {
return reviewGroupTask;
}
@@ -216,7 +244,9 @@ public class ReviewGroup extends ReviewComponent implements IReviewGroup {
case ReviewsPackage.REVIEW_GROUP__REVIEWS:
return getReviews();
case ReviewsPackage.REVIEW_GROUP__REVIEW_GROUP_TASK:
- return getReviewGroupTask();
+ if (resolve)
+ return getReviewGroupTask();
+ return basicGetReviewGroupTask();
case ReviewsPackage.REVIEW_GROUP__DESCRIPTION:
return getDescription();
}
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItem.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItem.java
index 75ef955..d6b93d6 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItem.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItem.java
@@ -34,21 +34,21 @@ import org.eclipse.mylyn.reviews.core.model.IUser;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getAddedBy <em>Added By</em>}</li>
- * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getReview <em>Review</em>}</li>
- * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getTopics <em>Topics</em>}</li>
- * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getAddedBy <em>Added By</em>}</li>
+ * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getReview <em>Review</em>}</li>
+ * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getTopics <em>Topics</em>}</li>
+ * <li>{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getId <em>Id</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
- * The cached value of the '{@link #getAddedBy() <em>Added By</em>}' reference. <!-- begin-user-doc --> <!--
+ * The cached value of the '{@link #getAddedBy() <em>Added By</em>}' reference.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getAddedBy()
* @generated
* @ordered
@@ -56,9 +56,9 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
protected IUser addedBy;
/**
- * The cached value of the '{@link #getReview() <em>Review</em>}' reference. <!-- begin-user-doc --> <!--
+ * The cached value of the '{@link #getReview() <em>Review</em>}' reference.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getReview()
* @generated
* @ordered
@@ -86,9 +86,9 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
protected String name = NAME_EDEFAULT;
/**
- * The cached value of the '{@link #getTopics() <em>Topics</em>}' reference list. <!-- begin-user-doc --> <!--
+ * The cached value of the '{@link #getTopics() <em>Topics</em>}' reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getTopics()
* @generated
* @ordered
@@ -96,8 +96,8 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
protected EList<ITopic> topics;
/**
- * The default value of the '{@link #getId() <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The default value of the '{@link #getId() <em>Id</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
@@ -105,8 +105,8 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
protected static final String ID_EDEFAULT = null;
/**
- * The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
@@ -115,7 +115,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected ReviewItem() {
@@ -124,7 +123,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -134,7 +132,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public IUser getAddedBy() {
@@ -142,10 +139,9 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
InternalEObject oldAddedBy = (InternalEObject) addedBy;
addedBy = (IUser) eResolveProxy(oldAddedBy);
if (addedBy != oldAddedBy) {
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW_ITEM__ADDED_BY,
oldAddedBy, addedBy));
- }
}
}
return addedBy;
@@ -153,7 +149,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public IUser basicGetAddedBy() {
@@ -162,21 +157,18 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setAddedBy(IUser newAddedBy) {
IUser oldAddedBy = addedBy;
addedBy = newAddedBy;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM__ADDED_BY, oldAddedBy,
addedBy));
- }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public IReview getReview() {
@@ -184,10 +176,9 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
InternalEObject oldReview = (InternalEObject) review;
review = (IReview) eResolveProxy(oldReview);
if (review != oldReview) {
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW_ITEM__REVIEW,
oldReview, review));
- }
}
}
return review;
@@ -195,7 +186,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public IReview basicGetReview() {
@@ -204,20 +194,17 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setReview(IReview newReview) {
IReview oldReview = review;
review = newReview;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM__REVIEW, oldReview, review));
- }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getName() {
@@ -226,20 +213,17 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM__NAME, oldName, name));
- }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public List<ITopic> getTopics() {
@@ -252,7 +236,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getId() {
@@ -261,15 +244,13 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM__ID, oldId, id));
- }
}
/**
@@ -302,7 +283,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -317,7 +297,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -331,21 +310,18 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ReviewsPackage.REVIEW_ITEM__ADDED_BY:
- if (resolve) {
+ if (resolve)
return getAddedBy();
- }
return basicGetAddedBy();
case ReviewsPackage.REVIEW_ITEM__REVIEW:
- if (resolve) {
+ if (resolve)
return getReview();
- }
return basicGetReview();
case ReviewsPackage.REVIEW_ITEM__NAME:
return getName();
@@ -359,7 +335,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -388,7 +363,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -415,7 +389,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -437,14 +410,12 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
+ if (eIsProxy())
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: "); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsPackage.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsPackage.java
index b370de3..a895292 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsPackage.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsPackage.java
@@ -2131,12 +2131,12 @@ public class ReviewsPackage extends EPackageImpl {
getReview_ReviewTask(),
this.getTaskReference(),
null,
- "reviewTask", null, 0, 1, IReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "reviewTask", null, 0, 1, IReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getReview_State(),
this.getReviewState(),
null,
- "state", null, 1, 1, IReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "state", null, 1, 1, IReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getReview_Id(),
ecorePackage.getEString(),
@@ -2152,7 +2152,7 @@ public class ReviewsPackage extends EPackageImpl {
getComment_Type(),
this.getCommentType(),
null,
- "type", null, 1, 1, IComment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "type", null, 1, 1, IComment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getComment_Description(),
ecorePackage.getEString(),
@@ -2169,7 +2169,7 @@ public class ReviewsPackage extends EPackageImpl {
getComment_Replies(),
this.getComment(),
null,
- "replies", null, 0, -1, IComment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "replies", null, 0, -1, IComment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getComment_Draft(),
ecorePackage.getEBoolean(),
@@ -2242,12 +2242,12 @@ public class ReviewsPackage extends EPackageImpl {
getReviewGroup_Reviews(),
this.getReview(),
null,
- "reviews", null, 0, -1, IReviewGroup.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "reviews", null, 0, -1, IReviewGroup.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getReviewGroup_ReviewGroupTask(),
this.getTaskReference(),
null,
- "reviewGroupTask", null, 0, 1, IReviewGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "reviewGroupTask", null, 0, 1, IReviewGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getReviewGroup_Description(),
ecorePackage.getEString(),
@@ -2261,12 +2261,12 @@ public class ReviewsPackage extends EPackageImpl {
getTopic_Task(),
this.getTaskReference(),
null,
- "task", null, 0, 1, ITopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "task", null, 0, 1, ITopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getTopic_Locations(),
this.getLocation(),
null,
- "locations", null, 0, -1, ITopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "locations", null, 0, -1, ITopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getTopic_Comments(),
this.getComment(),
@@ -2325,7 +2325,7 @@ public class ReviewsPackage extends EPackageImpl {
getLineLocation_Ranges(),
this.getLineRange(),
null,
- "ranges", null, 0, -1, ILineLocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "ranges", null, 0, -1, ILineLocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(lineRangeEClass, ILineRange.class,
"LineRange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Topic.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Topic.java
index ca80441..ccaf7ea 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Topic.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Topic.java
@@ -149,6 +149,31 @@ public class Topic extends Comment implements ITopic {
* @generated
*/
public ITaskReference getTask() {
+ if (task != null && task.eIsProxy()) {
+ InternalEObject oldTask = (InternalEObject) task;
+ task = (ITaskReference) eResolveProxy(oldTask);
+ if (task != oldTask) {
+ InternalEObject newTask = (InternalEObject) task;
+ NotificationChain msgs = oldTask.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
+ - ReviewsPackage.TOPIC__TASK, null, null);
+ if (newTask.eInternalContainer() == null) {
+ msgs = newTask.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ReviewsPackage.TOPIC__TASK, null, msgs);
+ }
+ if (msgs != null)
+ msgs.dispatch();
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.TOPIC__TASK, oldTask, task));
+ }
+ }
+ return task;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ITaskReference basicGetTask() {
return task;
}
@@ -199,7 +224,8 @@ public class Topic extends Comment implements ITopic {
*/
public List<ILocation> getLocations() {
if (locations == null) {
- locations = new EObjectContainmentEList<ILocation>(ILocation.class, this, ReviewsPackage.TOPIC__LOCATIONS);
+ locations = new EObjectContainmentEList.Resolving<ILocation>(ILocation.class, this,
+ ReviewsPackage.TOPIC__LOCATIONS);
}
return locations;
}
@@ -386,7 +412,9 @@ public class Topic extends Comment implements ITopic {
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ReviewsPackage.TOPIC__TASK:
- return getTask();
+ if (resolve)
+ return getTask();
+ return basicGetTask();
case ReviewsPackage.TOPIC__LOCATIONS:
return getLocations();
case ReviewsPackage.TOPIC__COMMENTS: