Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2014-02-04 11:20:22 +0000
committerGerrit Code Review @ Eclipse.org2014-02-07 17:56:20 +0000
commit701fe7e7f7d37e2725c0ea464a199180085fbeaf (patch)
tree6e45f507032a3d025a07618b1c47010004bc6fdc
parentb652678496e20b66d4fec7557e3a4ae6f377755f (diff)
downloadorg.eclipse.mylyn.reviews-701fe7e7f7d37e2725c0ea464a199180085fbeaf.tar.gz
org.eclipse.mylyn.reviews-701fe7e7f7d37e2725c0ea464a199180085fbeaf.tar.xz
org.eclipse.mylyn.reviews-701fe7e7f7d37e2725c0ea464a199180085fbeaf.zip
regenerate Reviews Model code, format and cleanup generated code
Following clean ups have been applied: * convert control statement bodies to block * convert 'for' loops to enhanced 'for' loops Those would have been applied if you had edited and saved a file. Change-Id: Ie37497489d8d3f137a4966579f5679eeb10cccf9 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--org.eclipse.mylyn.reviews.core/model/reviews.genmodel33
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/RequirementStatus.java6
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ReviewStatus.java8
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalType.java9
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalValueMap.java15
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Change.java33
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Comment.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileItem.java78
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileVersion.java26
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineRange.java9
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Repository.java24
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/RequirementEntry.java15
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Review.java69
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItem.java30
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItemSet.java38
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewRequirementsMap.java35
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewerEntry.java5
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java6
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsPackage.java9
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsSwitch.java114
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/User.java12
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/UserApprovalsMap.java35
23 files changed, 399 insertions, 218 deletions
diff --git a/org.eclipse.mylyn.reviews.core/model/reviews.genmodel b/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
index f9be67c2a..1da578d04 100644
--- a/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
+++ b/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
@@ -15,7 +15,8 @@
interfacePackageSuffix="core.model" metaDataPackageSuffix="core.model" classPackageSuffix="internal.core.model"
utilityPackageSuffix="internal.core.model" providerPackageSuffix="edit.provider"
presentationPackageSuffix="ui.model.presentations" testsPackageSuffix="core.model"
- generateExampleClass="false" contentTypeIdentifier="" fileExtensions="reviews" ecorePackage="reviews.ecore#/">
+ generateExampleClass="false" contentTypeIdentifier="" fileExtensions="reviews"
+ ecorePackage="reviews.ecore#/">
<genEnums typeSafeEnumCompatible="false" ecoreEnum="reviews.ecore#//RequirementStatus">
<genEnumLiterals ecoreEnumLiteral="reviews.ecore#//RequirementStatus/Unknown"/>
<genEnumLiterals ecoreEnumLiteral="reviews.ecore#//RequirementStatus/Satisfied"/>
@@ -25,6 +26,13 @@
<genEnumLiterals ecoreEnumLiteral="reviews.ecore#//RequirementStatus/Rejected"/>
<genEnumLiterals ecoreEnumLiteral="reviews.ecore#//RequirementStatus/Error"/>
</genEnums>
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="reviews.ecore#//ReviewStatus">
+ <genEnumLiterals ecoreEnumLiteral="reviews.ecore#//ReviewStatus/New"/>
+ <genEnumLiterals ecoreEnumLiteral="reviews.ecore#//ReviewStatus/Submitted"/>
+ <genEnumLiterals ecoreEnumLiteral="reviews.ecore#//ReviewStatus/Merged"/>
+ <genEnumLiterals ecoreEnumLiteral="reviews.ecore#//ReviewStatus/Abandoned"/>
+ <genEnumLiterals ecoreEnumLiteral="reviews.ecore#//ReviewStatus/Draft"/>
+ </genEnums>
<genDataTypes ecoreDataType="reviews.ecore#//IFileRevision"/>
<genDataTypes ecoreDataType="reviews.ecore#//TaskRepository"/>
<genClasses image="false" ecoreClass="reviews.ecore#//CommentContainer">
@@ -43,11 +51,11 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//Change/subject"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//Change/message"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference reviews.ecore#//Change/owner"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Change/state"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute reviews.ecore#//Change/state"/>
</genClasses>
<genClasses ecoreClass="reviews.ecore#//Review">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Review/sets"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference reviews.ecore#//Review/group"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference reviews.ecore#//Review/repository"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Review/parents"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Review/children"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Review/reviewerApprovals"/>
@@ -78,20 +86,15 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//User/email"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//User/displayName"/>
</genClasses>
- <genClasses image="false" ecoreClass="reviews.ecore#//ReviewState">
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//ReviewState/descriptor"/>
- </genClasses>
- <genClasses ecoreClass="reviews.ecore#//ReviewGroup">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//ReviewGroup/reviews"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//ReviewGroup/users"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//ReviewGroup/description"/>
- </genClasses>
<genClasses ecoreClass="reviews.ecore#//Repository">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Repository/approvalTypes"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Repository/reviewStates"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//Repository/taskRepositoryUrl"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//Repository/taskConnectorKind"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//Repository/taskRepository"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference reviews.ecore#//Repository/account"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Repository/reviews"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//Repository/users"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//Repository/description"/>
</genClasses>
<genClasses ecoreClass="reviews.ecore#//FileItem">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference reviews.ecore#//FileItem/base"/>
@@ -149,11 +152,5 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference reviews.ecore#//ReviewRequirementsMap/key"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference reviews.ecore#//ReviewRequirementsMap/value"/>
</genClasses>
- <genClasses ecoreClass="reviews.ecore#//RequirementReviewState">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//RequirementReviewState/status"/>
- </genClasses>
- <genClasses ecoreClass="reviews.ecore#//SimpleReviewState">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//SimpleReviewState/name"/>
- </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/RequirementStatus.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/RequirementStatus.java
index 691a57c88..42c25f742 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/RequirementStatus.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/RequirementStatus.java
@@ -206,8 +206,7 @@ public enum RequirementStatus implements InternalRequirementStatus {
* @generated
*/
public static RequirementStatus get(String literal) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- RequirementStatus result = VALUES_ARRAY[i];
+ for (RequirementStatus result : VALUES_ARRAY) {
if (result.toString().equals(literal)) {
return result;
}
@@ -222,8 +221,7 @@ public enum RequirementStatus implements InternalRequirementStatus {
* @generated
*/
public static RequirementStatus getByName(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- RequirementStatus result = VALUES_ARRAY[i];
+ for (RequirementStatus result : VALUES_ARRAY) {
if (result.getName().equals(name)) {
return result;
}
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ReviewStatus.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ReviewStatus.java
index 4695728fa..3a9b5de9f 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ReviewStatus.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ReviewStatus.java
@@ -158,8 +158,7 @@ public enum ReviewStatus implements InternalReviewStatus {
* @generated
*/
public static ReviewStatus get(String literal) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- ReviewStatus result = VALUES_ARRAY[i];
+ for (ReviewStatus result : VALUES_ARRAY) {
if (result.toString().equals(literal)) {
return result;
}
@@ -174,8 +173,7 @@ public enum ReviewStatus implements InternalReviewStatus {
* @generated
*/
public static ReviewStatus getByName(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- ReviewStatus result = VALUES_ARRAY[i];
+ for (ReviewStatus result : VALUES_ARRAY) {
if (result.getName().equals(name)) {
return result;
}
@@ -284,5 +282,5 @@ public enum ReviewStatus implements InternalReviewStatus {
* @generated
*/
interface InternalReviewStatus extends org.eclipse.emf.common.util.Enumerator {
- // Empty
+ // Empty
}
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalType.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalType.java
index 9c29660a8..9168b1ef2 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalType.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalType.java
@@ -107,8 +107,9 @@ public class ApprovalType extends EObjectImpl implements IApprovalType {
public void setKey(String newKey) {
String oldKey = key;
key = newKey;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.APPROVAL_TYPE__KEY, oldKey, key));
+ }
}
/**
@@ -128,8 +129,9 @@ public class ApprovalType extends EObjectImpl implements IApprovalType {
public void setName(String newName) {
String oldName = name;
name = newName;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.APPROVAL_TYPE__NAME, oldName, name));
+ }
}
/**
@@ -207,8 +209,9 @@ public class ApprovalType extends EObjectImpl implements IApprovalType {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (key: "); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalValueMap.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalValueMap.java
index 0db216850..c0b03779b 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalValueMap.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ApprovalValueMap.java
@@ -97,9 +97,10 @@ public class ApprovalValueMap extends EObjectImpl implements BasicEMap.Entry<IAp
InternalEObject oldKey = (InternalEObject) key;
key = (IApprovalType) eResolveProxy(oldKey);
if (key != oldKey) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.APPROVAL_VALUE_MAP__KEY,
oldKey, key));
+ }
}
}
return key;
@@ -122,8 +123,9 @@ public class ApprovalValueMap extends EObjectImpl implements BasicEMap.Entry<IAp
public void setTypedKey(IApprovalType newKey) {
IApprovalType oldKey = key;
key = newKey;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.APPROVAL_VALUE_MAP__KEY, oldKey, key));
+ }
}
/**
@@ -143,9 +145,10 @@ public class ApprovalValueMap extends EObjectImpl implements BasicEMap.Entry<IAp
public void setTypedValue(Integer newValue) {
Integer oldValue = value;
value = newValue;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.APPROVAL_VALUE_MAP__VALUE, oldValue,
value));
+ }
}
/**
@@ -157,8 +160,9 @@ public class ApprovalValueMap extends EObjectImpl implements BasicEMap.Entry<IAp
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ReviewsPackage.APPROVAL_VALUE_MAP__KEY:
- if (resolve)
+ if (resolve) {
return getTypedKey();
+ }
return basicGetTypedKey();
case ReviewsPackage.APPROVAL_VALUE_MAP__VALUE:
return getTypedValue();
@@ -225,8 +229,9 @@ public class ApprovalValueMap extends EObjectImpl implements BasicEMap.Entry<IAp
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (value: "); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Change.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Change.java
index 0b8f6d4fd..9a1df4bd6 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Change.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Change.java
@@ -223,9 +223,10 @@ public class Change extends EObjectImpl implements IChange {
public void setCreationDate(Date newCreationDate) {
Date oldCreationDate = creationDate;
creationDate = newCreationDate;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.CHANGE__CREATION_DATE,
oldCreationDate, creationDate));
+ }
}
/**
@@ -245,9 +246,10 @@ public class Change extends EObjectImpl implements IChange {
public void setModificationDate(Date newModificationDate) {
Date oldModificationDate = modificationDate;
modificationDate = newModificationDate;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.CHANGE__MODIFICATION_DATE,
oldModificationDate, modificationDate));
+ }
}
/**
@@ -267,8 +269,9 @@ public class Change extends EObjectImpl implements IChange {
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.CHANGE__ID, oldId, id));
+ }
}
/**
@@ -288,8 +291,9 @@ public class Change extends EObjectImpl implements IChange {
public void setKey(String newKey) {
String oldKey = key;
key = newKey;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.CHANGE__KEY, oldKey, key));
+ }
}
/**
@@ -309,8 +313,9 @@ public class Change extends EObjectImpl implements IChange {
public void setSubject(String newSubject) {
String oldSubject = subject;
subject = newSubject;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.CHANGE__SUBJECT, oldSubject, subject));
+ }
}
/**
@@ -330,8 +335,9 @@ public class Change extends EObjectImpl implements IChange {
public void setMessage(String newMessage) {
String oldMessage = message;
message = newMessage;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.CHANGE__MESSAGE, oldMessage, message));
+ }
}
/**
@@ -344,9 +350,10 @@ public class Change extends EObjectImpl implements IChange {
InternalEObject oldOwner = (InternalEObject) owner;
owner = (IUser) eResolveProxy(oldOwner);
if (owner != oldOwner) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.CHANGE__OWNER, oldOwner,
owner));
+ }
}
}
return owner;
@@ -369,8 +376,9 @@ public class Change extends EObjectImpl implements IChange {
public void setOwner(IUser newOwner) {
IUser oldOwner = owner;
owner = newOwner;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.CHANGE__OWNER, oldOwner, owner));
+ }
}
/**
@@ -390,8 +398,9 @@ public class Change extends EObjectImpl implements IChange {
public void setState(ReviewStatus newState) {
ReviewStatus oldState = state;
state = newState == null ? STATE_EDEFAULT : newState;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.CHANGE__STATE, oldState, state));
+ }
}
/**
@@ -415,8 +424,9 @@ public class Change extends EObjectImpl implements IChange {
case ReviewsPackage.CHANGE__MESSAGE:
return getMessage();
case ReviewsPackage.CHANGE__OWNER:
- if (resolve)
+ if (resolve) {
return getOwner();
+ }
return basicGetOwner();
case ReviewsPackage.CHANGE__STATE:
return getState();
@@ -533,8 +543,9 @@ public class Change extends EObjectImpl implements IChange {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (creationDate: "); //$NON-NLS-1$
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 d47206ccc..62f19ff3c 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Tasktop Technologies - initial API and implementation
*/
@@ -420,7 +420,7 @@ public class Comment extends EObjectImpl implements IComment {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @generated
+ * @generated NOT
*/
public IReview getReview() {
if (getItem() instanceof IReview) {
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileItem.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileItem.java
index 81ba92685..c6a09d62e 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileItem.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileItem.java
@@ -96,11 +96,13 @@ public class FileItem extends ReviewItem implements IFileItem {
msgs = newBase.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ReviewsPackage.FILE_ITEM__BASE, null,
msgs);
}
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- if (eNotificationRequired())
+ }
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.FILE_ITEM__BASE, oldBase,
base));
+ }
}
}
return base;
@@ -126,10 +128,11 @@ public class FileItem extends ReviewItem implements IFileItem {
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
ReviewsPackage.FILE_ITEM__BASE, oldBase, newBase);
- if (msgs == null)
+ if (msgs == null) {
msgs = notification;
- else
+ } else {
msgs.add(notification);
+ }
}
return msgs;
}
@@ -142,17 +145,21 @@ public class FileItem extends ReviewItem implements IFileItem {
public void setBase(IFileVersion newBase) {
if (newBase != base) {
NotificationChain msgs = null;
- if (base != null)
+ if (base != null) {
msgs = ((InternalEObject) base).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.FILE_ITEM__BASE, null, msgs);
- if (newBase != null)
+ }
+ if (newBase != null) {
msgs = ((InternalEObject) newBase).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.FILE_ITEM__BASE, null, msgs);
+ }
msgs = basicSetBase(newBase, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_ITEM__BASE, newBase, newBase));
+ }
}
/**
@@ -190,11 +197,13 @@ public class FileItem extends ReviewItem implements IFileItem {
msgs = newTarget.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ReviewsPackage.FILE_ITEM__TARGET, null,
msgs);
}
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- if (eNotificationRequired())
+ }
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.FILE_ITEM__TARGET,
oldTarget, target));
+ }
}
}
return target;
@@ -220,10 +229,11 @@ public class FileItem extends ReviewItem implements IFileItem {
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
ReviewsPackage.FILE_ITEM__TARGET, oldTarget, newTarget);
- if (msgs == null)
+ if (msgs == null) {
msgs = notification;
- else
+ } else {
msgs.add(notification);
+ }
}
return msgs;
}
@@ -236,18 +246,22 @@ public class FileItem extends ReviewItem implements IFileItem {
public void setTarget(IFileVersion newTarget) {
if (newTarget != target) {
NotificationChain msgs = null;
- if (target != null)
+ if (target != null) {
msgs = ((InternalEObject) target).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.FILE_ITEM__TARGET, null, msgs);
- if (newTarget != null)
+ }
+ if (newTarget != null) {
msgs = ((InternalEObject) newTarget).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.FILE_ITEM__TARGET, null, msgs);
+ }
msgs = basicSetTarget(newTarget, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_ITEM__TARGET, newTarget,
newTarget));
+ }
}
/**
@@ -256,8 +270,9 @@ public class FileItem extends ReviewItem implements IFileItem {
* @generated
*/
public IReviewItemSet getSet() {
- if (eContainerFeatureID() != ReviewsPackage.FILE_ITEM__SET)
+ if (eContainerFeatureID() != ReviewsPackage.FILE_ITEM__SET) {
return null;
+ }
return (IReviewItemSet) eContainer();
}
@@ -279,8 +294,9 @@ public class FileItem extends ReviewItem implements IFileItem {
* @generated
*/
public IReviewItemSet basicGetSet() {
- if (eContainerFeatureID() != ReviewsPackage.FILE_ITEM__SET)
+ if (eContainerFeatureID() != ReviewsPackage.FILE_ITEM__SET) {
return null;
+ }
return (IReviewItemSet) eInternalContainer();
}
@@ -303,18 +319,24 @@ public class FileItem extends ReviewItem implements IFileItem {
if (newSet != eInternalContainer()
|| (eContainerFeatureID() != ReviewsPackage.FILE_ITEM__SET && newSet != null)) {
if (EcoreUtil.isAncestor(this, newSet))
+ {
throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ }
NotificationChain msgs = null;
- if (eInternalContainer() != null)
+ if (eInternalContainer() != null) {
msgs = eBasicRemoveFromContainer(msgs);
- if (newSet != null)
+ }
+ if (newSet != null) {
msgs = ((InternalEObject) newSet).eInverseAdd(this, ReviewsPackage.REVIEW_ITEM_SET__ITEMS,
IReviewItemSet.class, msgs);
+ }
msgs = basicSetSet(newSet, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_ITEM__SET, newSet, newSet));
+ }
}
/**
@@ -326,8 +348,9 @@ public class FileItem extends ReviewItem implements IFileItem {
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ReviewsPackage.FILE_ITEM__SET:
- if (eInternalContainer() != null)
+ if (eInternalContainer() != null) {
msgs = eBasicRemoveFromContainer(msgs);
+ }
return basicSetSet((IReviewItemSet) otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
@@ -375,16 +398,19 @@ public class FileItem extends ReviewItem implements IFileItem {
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ReviewsPackage.FILE_ITEM__BASE:
- if (resolve)
+ if (resolve) {
return getBase();
+ }
return basicGetBase();
case ReviewsPackage.FILE_ITEM__TARGET:
- if (resolve)
+ if (resolve) {
return getTarget();
+ }
return basicGetTarget();
case ReviewsPackage.FILE_ITEM__SET:
- if (resolve)
+ if (resolve) {
return getSet();
+ }
return basicGetSet();
}
return super.eGet(featureID, resolve, coreType);
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileVersion.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileVersion.java
index a0fe37a47..669e13eaa 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileVersion.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileVersion.java
@@ -162,8 +162,9 @@ public class FileVersion extends ReviewItem implements IFileVersion {
public void setPath(String newPath) {
String oldPath = path;
path = newPath;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_VERSION__PATH, oldPath, path));
+ }
}
/**
@@ -183,9 +184,10 @@ public class FileVersion extends ReviewItem implements IFileVersion {
public void setDescription(String newDescription) {
String oldDescription = description;
description = newDescription;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_VERSION__DESCRIPTION,
oldDescription, description));
+ }
}
/**
@@ -205,9 +207,10 @@ public class FileVersion extends ReviewItem implements IFileVersion {
public void setContent(String newContent) {
String oldContent = content;
content = newContent;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_VERSION__CONTENT, oldContent,
content));
+ }
}
/**
@@ -220,14 +223,15 @@ public class FileVersion extends ReviewItem implements IFileVersion {
InternalEObject oldFile = (InternalEObject) file;
file = (IFileItem) eResolveProxy(oldFile);
if (file != oldFile) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.FILE_VERSION__FILE,
oldFile, file));
+ }
}
}
return file;
}
-
+
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -255,8 +259,9 @@ public class FileVersion extends ReviewItem implements IFileVersion {
public void setFile(IFileItem newFile) {
IFileItem oldFile = file;
file = newFile;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_VERSION__FILE, oldFile, file));
+ }
}
/**
@@ -276,9 +281,10 @@ public class FileVersion extends ReviewItem implements IFileVersion {
public void setFileRevision(IFileRevision newFileRevision) {
IFileRevision oldFileRevision = fileRevision;
fileRevision = newFileRevision;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_VERSION__FILE_REVISION,
oldFileRevision, fileRevision));
+ }
}
/**
@@ -296,8 +302,9 @@ public class FileVersion extends ReviewItem implements IFileVersion {
case ReviewsPackage.FILE_VERSION__CONTENT:
return getContent();
case ReviewsPackage.FILE_VERSION__FILE:
- if (resolve)
+ if (resolve) {
return getFile();
+ }
return basicGetFile();
case ReviewsPackage.FILE_VERSION__FILE_REVISION:
return getFileRevision();
@@ -388,8 +395,9 @@ public class FileVersion extends ReviewItem implements IFileVersion {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (path: "); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineRange.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineRange.java
index 407db6821..d4a6e621f 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineRange.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/LineRange.java
@@ -107,8 +107,9 @@ public class LineRange extends EObjectImpl implements ILineRange {
public void setStart(int newStart) {
int oldStart = start;
start = newStart;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.LINE_RANGE__START, oldStart, start));
+ }
}
/**
@@ -128,8 +129,9 @@ public class LineRange extends EObjectImpl implements ILineRange {
public void setEnd(int newEnd) {
int oldEnd = end;
end = newEnd;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.LINE_RANGE__END, oldEnd, end));
+ }
}
/**
@@ -207,8 +209,9 @@ public class LineRange extends EObjectImpl implements ILineRange {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (start: "); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Repository.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Repository.java
index 641560da8..2c6967364 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Repository.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Repository.java
@@ -219,9 +219,10 @@ public class Repository extends EObjectImpl implements IRepository {
public void setTaskRepositoryUrl(String newTaskRepositoryUrl) {
String oldTaskRepositoryUrl = taskRepositoryUrl;
taskRepositoryUrl = newTaskRepositoryUrl;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REPOSITORY__TASK_REPOSITORY_URL,
oldTaskRepositoryUrl, taskRepositoryUrl));
+ }
}
/**
@@ -241,9 +242,10 @@ public class Repository extends EObjectImpl implements IRepository {
public void setTaskConnectorKind(String newTaskConnectorKind) {
String oldTaskConnectorKind = taskConnectorKind;
taskConnectorKind = newTaskConnectorKind;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REPOSITORY__TASK_CONNECTOR_KIND,
oldTaskConnectorKind, taskConnectorKind));
+ }
}
/**
@@ -263,9 +265,10 @@ public class Repository extends EObjectImpl implements IRepository {
public void setTaskRepository(TaskRepository newTaskRepository) {
TaskRepository oldTaskRepository = taskRepository;
taskRepository = newTaskRepository;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REPOSITORY__TASK_REPOSITORY,
oldTaskRepository, taskRepository));
+ }
}
/**
@@ -278,9 +281,10 @@ public class Repository extends EObjectImpl implements IRepository {
InternalEObject oldAccount = (InternalEObject) account;
account = (IUser) eResolveProxy(oldAccount);
if (account != oldAccount) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REPOSITORY__ACCOUNT,
oldAccount, account));
+ }
}
}
return account;
@@ -303,9 +307,10 @@ public class Repository extends EObjectImpl implements IRepository {
public void setAccount(IUser newAccount) {
IUser oldAccount = account;
account = newAccount;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REPOSITORY__ACCOUNT, oldAccount,
account));
+ }
}
/**
@@ -350,9 +355,10 @@ public class Repository extends EObjectImpl implements IRepository {
public void setDescription(String newDescription) {
String oldDescription = description;
description = newDescription;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REPOSITORY__DESCRIPTION,
oldDescription, description));
+ }
}
/**
@@ -405,8 +411,9 @@ public class Repository extends EObjectImpl implements IRepository {
case ReviewsPackage.REPOSITORY__TASK_REPOSITORY:
return getTaskRepository();
case ReviewsPackage.REPOSITORY__ACCOUNT:
- if (resolve)
+ if (resolve) {
return getAccount();
+ }
return basicGetAccount();
case ReviewsPackage.REPOSITORY__REVIEWS:
return getReviews();
@@ -535,8 +542,9 @@ public class Repository extends EObjectImpl implements IRepository {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (taskRepositoryUrl: "); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/RequirementEntry.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/RequirementEntry.java
index dcf00a1bb..047501ba6 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/RequirementEntry.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/RequirementEntry.java
@@ -99,9 +99,10 @@ public class RequirementEntry extends EObjectImpl implements IRequirementEntry {
public void setStatus(RequirementStatus newStatus) {
RequirementStatus oldStatus = status;
status = newStatus == null ? STATUS_EDEFAULT : newStatus;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REQUIREMENT_ENTRY__STATUS, oldStatus,
status));
+ }
}
/**
@@ -114,9 +115,10 @@ public class RequirementEntry extends EObjectImpl implements IRequirementEntry {
InternalEObject oldBy = (InternalEObject) by;
by = (IUser) eResolveProxy(oldBy);
if (by != oldBy) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REQUIREMENT_ENTRY__BY,
oldBy, by));
+ }
}
}
return by;
@@ -139,8 +141,9 @@ public class RequirementEntry extends EObjectImpl implements IRequirementEntry {
public void setBy(IUser newBy) {
IUser oldBy = by;
by = newBy;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REQUIREMENT_ENTRY__BY, oldBy, by));
+ }
}
/**
@@ -154,8 +157,9 @@ public class RequirementEntry extends EObjectImpl implements IRequirementEntry {
case ReviewsPackage.REQUIREMENT_ENTRY__STATUS:
return getStatus();
case ReviewsPackage.REQUIREMENT_ENTRY__BY:
- if (resolve)
+ if (resolve) {
return getBy();
+ }
return basicGetBy();
}
return super.eGet(featureID, resolve, coreType);
@@ -220,8 +224,9 @@ public class RequirementEntry extends EObjectImpl implements IRequirementEntry {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (status: "); //$NON-NLS-1$
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 b172eca4a..adbd7cd2a 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
@@ -300,9 +300,10 @@ public class Review extends CommentContainer implements IReview {
public void setCreationDate(Date newCreationDate) {
Date oldCreationDate = creationDate;
creationDate = newCreationDate;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__CREATION_DATE,
oldCreationDate, creationDate));
+ }
}
/**
@@ -322,9 +323,10 @@ public class Review extends CommentContainer implements IReview {
public void setModificationDate(Date newModificationDate) {
Date oldModificationDate = modificationDate;
modificationDate = newModificationDate;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__MODIFICATION_DATE,
oldModificationDate, modificationDate));
+ }
}
/**
@@ -346,8 +348,9 @@ public class Review extends CommentContainer implements IReview {
* @generated
*/
public IRepository getRepository() {
- if (eContainerFeatureID() != ReviewsPackage.REVIEW__REPOSITORY)
+ if (eContainerFeatureID() != ReviewsPackage.REVIEW__REPOSITORY) {
return null;
+ }
return (IRepository) eContainer();
}
@@ -357,8 +360,9 @@ public class Review extends CommentContainer implements IReview {
* @generated
*/
public IRepository basicGetRepository() {
- if (eContainerFeatureID() != ReviewsPackage.REVIEW__REPOSITORY)
+ if (eContainerFeatureID() != ReviewsPackage.REVIEW__REPOSITORY) {
return null;
+ }
return (IRepository) eInternalContainer();
}
@@ -381,19 +385,25 @@ public class Review extends CommentContainer implements IReview {
if (newRepository != eInternalContainer()
|| (eContainerFeatureID() != ReviewsPackage.REVIEW__REPOSITORY && newRepository != null)) {
if (EcoreUtil.isAncestor(this, newRepository))
+ {
throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ }
NotificationChain msgs = null;
- if (eInternalContainer() != null)
+ if (eInternalContainer() != null) {
msgs = eBasicRemoveFromContainer(msgs);
- if (newRepository != null)
+ }
+ if (newRepository != null) {
msgs = ((InternalEObject) newRepository).eInverseAdd(this, ReviewsPackage.REPOSITORY__REVIEWS,
IRepository.class, msgs);
+ }
msgs = basicSetRepository(newRepository, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__REPOSITORY, newRepository,
newRepository));
+ }
}
/**
@@ -440,8 +450,9 @@ public class Review extends CommentContainer implements IReview {
public void setState(ReviewStatus newState) {
ReviewStatus oldState = state;
state = newState == null ? STATE_EDEFAULT : newState;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__STATE, oldState, state));
+ }
}
/**
@@ -461,8 +472,9 @@ public class Review extends CommentContainer implements IReview {
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__ID, oldId, id));
+ }
}
/**
@@ -482,8 +494,9 @@ public class Review extends CommentContainer implements IReview {
public void setKey(String newKey) {
String oldKey = key;
key = newKey;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__KEY, oldKey, key));
+ }
}
/**
@@ -503,8 +516,9 @@ public class Review extends CommentContainer implements IReview {
public void setSubject(String newSubject) {
String oldSubject = subject;
subject = newSubject;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__SUBJECT, oldSubject, subject));
+ }
}
/**
@@ -524,8 +538,9 @@ public class Review extends CommentContainer implements IReview {
public void setMessage(String newMessage) {
String oldMessage = message;
message = newMessage;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__MESSAGE, oldMessage, message));
+ }
}
/**
@@ -538,9 +553,10 @@ public class Review extends CommentContainer implements IReview {
InternalEObject oldOwner = (InternalEObject) owner;
owner = (IUser) eResolveProxy(oldOwner);
if (owner != oldOwner) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW__OWNER, oldOwner,
owner));
+ }
}
}
return owner;
@@ -563,8 +579,9 @@ public class Review extends CommentContainer implements IReview {
public void setOwner(IUser newOwner) {
IUser oldOwner = owner;
owner = newOwner;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__OWNER, oldOwner, owner));
+ }
}
/**
@@ -632,8 +649,9 @@ public class Review extends CommentContainer implements IReview {
case ReviewsPackage.REVIEW__SETS:
return ((InternalEList<InternalEObject>) (InternalEList<?>) getSets()).basicAdd(otherEnd, msgs);
case ReviewsPackage.REVIEW__REPOSITORY:
- if (eInternalContainer() != null)
+ if (eInternalContainer() != null) {
msgs = eBasicRemoveFromContainer(msgs);
+ }
return basicSetRepository((IRepository) otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
@@ -701,31 +719,35 @@ public class Review extends CommentContainer implements IReview {
case ReviewsPackage.REVIEW__MESSAGE:
return getMessage();
case ReviewsPackage.REVIEW__OWNER:
- if (resolve)
+ if (resolve) {
return getOwner();
+ }
return basicGetOwner();
case ReviewsPackage.REVIEW__STATE:
return getState();
case ReviewsPackage.REVIEW__SETS:
return getSets();
case ReviewsPackage.REVIEW__REPOSITORY:
- if (resolve)
+ if (resolve) {
return getRepository();
+ }
return basicGetRepository();
case ReviewsPackage.REVIEW__PARENTS:
return getParents();
case ReviewsPackage.REVIEW__CHILDREN:
return getChildren();
case ReviewsPackage.REVIEW__REVIEWER_APPROVALS:
- if (coreType)
+ if (coreType) {
return ((EMap.InternalMapView<IUser, IReviewerEntry>) getReviewerApprovals()).eMap();
- else
+ } else {
return getReviewerApprovals();
+ }
case ReviewsPackage.REVIEW__REQUIREMENTS:
- if (coreType)
+ if (coreType) {
return ((EMap.InternalMapView<IApprovalType, IRequirementEntry>) getRequirements()).eMap();
- else
+ } else {
return getRequirements();
+ }
}
return super.eGet(featureID, resolve, coreType);
}
@@ -967,8 +989,9 @@ public class Review extends CommentContainer implements IReview {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (creationDate: "); //$NON-NLS-1$
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 7b3cbef39..9e709d881 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
@@ -156,9 +156,10 @@ public abstract class ReviewItem extends CommentContainer 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;
@@ -181,9 +182,10 @@ public abstract class ReviewItem extends CommentContainer implements IReviewItem
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));
+ }
}
/**
@@ -196,9 +198,10 @@ public abstract class ReviewItem extends CommentContainer implements IReviewItem
InternalEObject oldCommittedBy = (InternalEObject) committedBy;
committedBy = (IUser) eResolveProxy(oldCommittedBy);
if (committedBy != oldCommittedBy) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW_ITEM__COMMITTED_BY,
oldCommittedBy, committedBy));
+ }
}
}
return committedBy;
@@ -221,9 +224,10 @@ public abstract class ReviewItem extends CommentContainer implements IReviewItem
public void setCommittedBy(IUser newCommittedBy) {
IUser oldCommittedBy = committedBy;
committedBy = newCommittedBy;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM__COMMITTED_BY,
oldCommittedBy, committedBy));
+ }
}
/**
@@ -254,8 +258,9 @@ public abstract class ReviewItem extends CommentContainer implements IReviewItem
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));
+ }
}
/**
@@ -275,8 +280,9 @@ public abstract class ReviewItem extends CommentContainer implements IReviewItem
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));
+ }
}
/**
@@ -296,9 +302,10 @@ public abstract class ReviewItem extends CommentContainer implements IReviewItem
public void setReference(String newReference) {
String oldReference = reference;
reference = newReference;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM__REFERENCE, oldReference,
reference));
+ }
}
/**
@@ -324,12 +331,14 @@ public abstract class ReviewItem extends CommentContainer implements IReviewItem
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__COMMITTED_BY:
- if (resolve)
+ if (resolve) {
return getCommittedBy();
+ }
return basicGetCommittedBy();
case ReviewsPackage.REVIEW_ITEM__REVIEW:
return getReview();
@@ -429,8 +438,9 @@ public abstract class ReviewItem extends CommentContainer implements IReviewItem
*/
@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/ReviewItemSet.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItemSet.java
index 15bd49746..c3afe2e69 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItemSet.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItemSet.java
@@ -155,9 +155,10 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
public void setCreationDate(Date newCreationDate) {
Date oldCreationDate = creationDate;
creationDate = newCreationDate;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM_SET__CREATION_DATE,
oldCreationDate, creationDate));
+ }
}
/**
@@ -177,9 +178,10 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
public void setModificationDate(Date newModificationDate) {
Date oldModificationDate = modificationDate;
modificationDate = newModificationDate;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM_SET__MODIFICATION_DATE,
oldModificationDate, modificationDate));
+ }
}
/**
@@ -239,9 +241,10 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
public void setRevision(String newRevision) {
String oldRevision = revision;
revision = newRevision;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM_SET__REVISION,
oldRevision, revision));
+ }
}
/**
@@ -250,8 +253,9 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
* @generated
*/
public IReview getParentReview() {
- if (eContainerFeatureID() != ReviewsPackage.REVIEW_ITEM_SET__PARENT_REVIEW)
+ if (eContainerFeatureID() != ReviewsPackage.REVIEW_ITEM_SET__PARENT_REVIEW) {
return null;
+ }
return (IReview) eContainer();
}
@@ -261,8 +265,9 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
* @generated
*/
public IReview basicGetParentReview() {
- if (eContainerFeatureID() != ReviewsPackage.REVIEW_ITEM_SET__PARENT_REVIEW)
+ if (eContainerFeatureID() != ReviewsPackage.REVIEW_ITEM_SET__PARENT_REVIEW) {
return null;
+ }
return (IReview) eInternalContainer();
}
@@ -286,19 +291,25 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
if (newParentReview != eInternalContainer()
|| (eContainerFeatureID() != ReviewsPackage.REVIEW_ITEM_SET__PARENT_REVIEW && newParentReview != null)) {
if (EcoreUtil.isAncestor(this, newParentReview))
+ {
throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ }
NotificationChain msgs = null;
- if (eInternalContainer() != null)
+ if (eInternalContainer() != null) {
msgs = eBasicRemoveFromContainer(msgs);
- if (newParentReview != null)
+ }
+ if (newParentReview != null) {
msgs = ((InternalEObject) newParentReview).eInverseAdd(this, ReviewsPackage.REVIEW__SETS,
IReview.class, msgs);
+ }
msgs = basicSetParentReview(newParentReview, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM_SET__PARENT_REVIEW,
newParentReview, newParentReview));
+ }
}
/**
@@ -313,8 +324,9 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
case ReviewsPackage.REVIEW_ITEM_SET__ITEMS:
return ((InternalEList<InternalEObject>) (InternalEList<?>) getItems()).basicAdd(otherEnd, msgs);
case ReviewsPackage.REVIEW_ITEM_SET__PARENT_REVIEW:
- if (eInternalContainer() != null)
+ if (eInternalContainer() != null) {
msgs = eBasicRemoveFromContainer(msgs);
+ }
return basicSetParentReview((IReview) otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
@@ -367,8 +379,9 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
case ReviewsPackage.REVIEW_ITEM_SET__REVISION:
return getRevision();
case ReviewsPackage.REVIEW_ITEM_SET__PARENT_REVIEW:
- if (resolve)
+ if (resolve) {
return getParentReview();
+ }
return basicGetParentReview();
}
return super.eGet(featureID, resolve, coreType);
@@ -501,8 +514,9 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (creationDate: "); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewRequirementsMap.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewRequirementsMap.java
index 5c49eb8df..8697e7a0c 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewRequirementsMap.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewRequirementsMap.java
@@ -89,9 +89,10 @@ public class ReviewRequirementsMap extends EObjectImpl implements BasicEMap.Entr
InternalEObject oldKey = (InternalEObject) key;
key = (IApprovalType) eResolveProxy(oldKey);
if (key != oldKey) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
ReviewsPackage.REVIEW_REQUIREMENTS_MAP__KEY, oldKey, key));
+ }
}
}
return key;
@@ -114,9 +115,10 @@ public class ReviewRequirementsMap extends EObjectImpl implements BasicEMap.Entr
public void setTypedKey(IApprovalType newKey) {
IApprovalType oldKey = key;
key = newKey;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_REQUIREMENTS_MAP__KEY, oldKey,
key));
+ }
}
/**
@@ -136,11 +138,13 @@ public class ReviewRequirementsMap extends EObjectImpl implements BasicEMap.Entr
msgs = newValue.eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.REVIEW_REQUIREMENTS_MAP__VALUE, null, msgs);
}
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- if (eNotificationRequired())
+ }
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
ReviewsPackage.REVIEW_REQUIREMENTS_MAP__VALUE, oldValue, value));
+ }
}
}
return value;
@@ -166,10 +170,11 @@ public class ReviewRequirementsMap extends EObjectImpl implements BasicEMap.Entr
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
ReviewsPackage.REVIEW_REQUIREMENTS_MAP__VALUE, oldValue, newValue);
- if (msgs == null)
+ if (msgs == null) {
msgs = notification;
- else
+ } else {
msgs.add(notification);
+ }
}
return msgs;
}
@@ -182,18 +187,22 @@ public class ReviewRequirementsMap extends EObjectImpl implements BasicEMap.Entr
public void setTypedValue(IRequirementEntry newValue) {
if (newValue != value) {
NotificationChain msgs = null;
- if (value != null)
+ if (value != null) {
msgs = ((InternalEObject) value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.REVIEW_REQUIREMENTS_MAP__VALUE, null, msgs);
- if (newValue != null)
+ }
+ if (newValue != null) {
msgs = ((InternalEObject) newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.REVIEW_REQUIREMENTS_MAP__VALUE, null, msgs);
+ }
msgs = basicSetTypedValue(newValue, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_REQUIREMENTS_MAP__VALUE,
newValue, newValue));
+ }
}
/**
@@ -219,12 +228,14 @@ public class ReviewRequirementsMap extends EObjectImpl implements BasicEMap.Entr
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ReviewsPackage.REVIEW_REQUIREMENTS_MAP__KEY:
- if (resolve)
+ if (resolve) {
return getTypedKey();
+ }
return basicGetTypedKey();
case ReviewsPackage.REVIEW_REQUIREMENTS_MAP__VALUE:
- if (resolve)
+ if (resolve) {
return getTypedValue();
+ }
return basicGetTypedValue();
}
return super.eGet(featureID, resolve, coreType);
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewerEntry.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewerEntry.java
index 0aec113ca..efd3bb72a 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewerEntry.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewerEntry.java
@@ -101,10 +101,11 @@ public class ReviewerEntry extends EObjectImpl implements IReviewerEntry {
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ReviewsPackage.REVIEWER_ENTRY__APPROVALS:
- if (coreType)
+ if (coreType) {
return ((EMap.InternalMapView<IApprovalType, Integer>) getApprovals()).eMap();
- else
+ } else {
return getApprovals();
+ }
}
return super.eGet(featureID, resolve, coreType);
}
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java
index 19dcfeca6..0ac1e49e0 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java
@@ -43,7 +43,7 @@ public class ReviewsFactory extends EFactoryImpl implements IReviewsFactory {
*/
public static ReviewsFactory init() {
try {
- ReviewsFactory theReviewsFactory = (ReviewsFactory) EPackage.Registry.INSTANCE.getEFactory(ReviewsPackage.eNS_URI);
+ ReviewsFactory theReviewsFactory = (ReviewsFactory) EPackage.Registry.INSTANCE.getEFactory("http://eclipse.org/mylyn/reviews/core/1.0"); //$NON-NLS-1$
if (theReviewsFactory != null) {
return theReviewsFactory;
}
@@ -289,8 +289,10 @@ public class ReviewsFactory extends EFactoryImpl implements IReviewsFactory {
public RequirementStatus createRequirementStatusFromString(EDataType eDataType, String initialValue) {
RequirementStatus result = RequirementStatus.get(initialValue);
if (result == null)
+ {
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
return result;
}
@@ -311,8 +313,10 @@ public class ReviewsFactory extends EFactoryImpl implements IReviewsFactory {
public ReviewStatus createReviewStatusFromString(EDataType eDataType, String initialValue) {
ReviewStatus result = ReviewStatus.get(initialValue);
if (result == null)
+ {
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
return result;
}
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 3066db16b..a69e25eb3 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
@@ -1787,8 +1787,9 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public static ReviewsPackage init() {
- if (isInited)
+ if (isInited) {
return (ReviewsPackage) EPackage.Registry.INSTANCE.getEPackage(ReviewsPackage.eNS_URI);
+ }
// Obtain or create and register package
ReviewsPackage theReviewsPackage = (ReviewsPackage) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ReviewsPackage
@@ -3100,8 +3101,9 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public void createPackageContents() {
- if (isCreated)
+ if (isCreated) {
return;
+ }
isCreated = true;
// Create classes and their features
@@ -3242,8 +3244,9 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public void initializePackageContents() {
- if (isInitialized)
+ if (isInitialized) {
return;
+ }
isInitialized = true;
// Initialize package
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java
index c7a1a96e4..304990a9a 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Tasktop Technologies - initial API and implementation
*/
@@ -17,7 +17,7 @@ import org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl;
* <!-- begin-user-doc --> The <b>Resource </b> associated with the package. <!-- end-user-doc -->
*
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsResourceFactory
- * @generated
+ * @generated NOT
*/
public class ReviewsResource extends BinaryResourceImpl {
/**
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsSwitch.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsSwitch.java
index 185dfd2eb..c0f49b316 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsSwitch.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsSwitch.java
@@ -85,185 +85,223 @@ public class ReviewsSwitch<T> {
case ReviewsPackage.COMMENT_CONTAINER: {
ICommentContainer commentContainer = (ICommentContainer) theEObject;
T result = caseCommentContainer(commentContainer);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.CHANGE: {
IChange change = (IChange) theEObject;
T result = caseChange(change);
- if (result == null)
+ if (result == null) {
result = caseDated(change);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.REVIEW: {
IReview review = (IReview) theEObject;
T result = caseReview(review);
- if (result == null)
+ if (result == null) {
result = caseCommentContainer(review);
- if (result == null)
+ }
+ if (result == null) {
result = caseChange(review);
- if (result == null)
+ }
+ if (result == null) {
result = caseDated(review);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.COMMENT: {
IComment comment = (IComment) theEObject;
T result = caseComment(comment);
- if (result == null)
+ if (result == null) {
result = caseIndexed(comment);
- if (result == null)
+ }
+ if (result == null) {
result = caseDated(comment);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.REVIEW_ITEM: {
IReviewItem reviewItem = (IReviewItem) theEObject;
T result = caseReviewItem(reviewItem);
- if (result == null)
+ if (result == null) {
result = caseCommentContainer(reviewItem);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.LOCATION: {
ILocation location = (ILocation) theEObject;
T result = caseLocation(location);
- if (result == null)
+ if (result == null) {
result = caseIndexed(location);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.USER: {
IUser user = (IUser) theEObject;
T result = caseUser(user);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.REPOSITORY: {
IRepository repository = (IRepository) theEObject;
T result = caseRepository(repository);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.FILE_ITEM: {
IFileItem fileItem = (IFileItem) theEObject;
T result = caseFileItem(fileItem);
- if (result == null)
+ if (result == null) {
result = caseReviewItem(fileItem);
- if (result == null)
+ }
+ if (result == null) {
result = caseCommentContainer(fileItem);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.REVIEW_ITEM_SET: {
IReviewItemSet reviewItemSet = (IReviewItemSet) theEObject;
T result = caseReviewItemSet(reviewItemSet);
- if (result == null)
+ if (result == null) {
result = caseReviewItem(reviewItemSet);
- if (result == null)
+ }
+ if (result == null) {
result = caseDated(reviewItemSet);
- if (result == null)
+ }
+ if (result == null) {
result = caseCommentContainer(reviewItemSet);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.LINE_LOCATION: {
ILineLocation lineLocation = (ILineLocation) theEObject;
T result = caseLineLocation(lineLocation);
- if (result == null)
+ if (result == null) {
result = caseLocation(lineLocation);
- if (result == null)
+ }
+ if (result == null) {
result = caseIndexed(lineLocation);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.LINE_RANGE: {
ILineRange lineRange = (ILineRange) theEObject;
T result = caseLineRange(lineRange);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.FILE_VERSION: {
IFileVersion fileVersion = (IFileVersion) theEObject;
T result = caseFileVersion(fileVersion);
- if (result == null)
+ if (result == null) {
result = caseReviewItem(fileVersion);
- if (result == null)
+ }
+ if (result == null) {
result = caseCommentContainer(fileVersion);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.INDEXED: {
IIndexed indexed = (IIndexed) theEObject;
T result = caseIndexed(indexed);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.DATED: {
IDated dated = (IDated) theEObject;
T result = caseDated(dated);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.APPROVAL_TYPE: {
IApprovalType approvalType = (IApprovalType) theEObject;
T result = caseApprovalType(approvalType);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.USER_APPROVALS_MAP: {
@SuppressWarnings("unchecked")
Map.Entry<IUser, IReviewerEntry> userApprovalsMap = (Map.Entry<IUser, IReviewerEntry>) theEObject;
T result = caseUserApprovalsMap(userApprovalsMap);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.REVIEWER_ENTRY: {
IReviewerEntry reviewerEntry = (IReviewerEntry) theEObject;
T result = caseReviewerEntry(reviewerEntry);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.APPROVAL_VALUE_MAP: {
@SuppressWarnings("unchecked")
Map.Entry<IApprovalType, Integer> approvalValueMap = (Map.Entry<IApprovalType, Integer>) theEObject;
T result = caseApprovalValueMap(approvalValueMap);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.REQUIREMENT_ENTRY: {
IRequirementEntry requirementEntry = (IRequirementEntry) theEObject;
T result = caseRequirementEntry(requirementEntry);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case ReviewsPackage.REVIEW_REQUIREMENTS_MAP: {
@SuppressWarnings("unchecked")
Map.Entry<IApprovalType, IRequirementEntry> reviewRequirementsMap = (Map.Entry<IApprovalType, IRequirementEntry>) theEObject;
T result = caseReviewRequirementsMap(reviewRequirementsMap);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
default:
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/User.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/User.java
index d73c8bc43..8474749f3 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/User.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/User.java
@@ -127,8 +127,9 @@ public class User extends EObjectImpl implements IUser {
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.USER__ID, oldId, id));
+ }
}
/**
@@ -148,8 +149,9 @@ public class User extends EObjectImpl implements IUser {
public void setEmail(String newEmail) {
String oldEmail = email;
email = newEmail;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.USER__EMAIL, oldEmail, email));
+ }
}
/**
@@ -169,9 +171,10 @@ public class User extends EObjectImpl implements IUser {
public void setDisplayName(String newDisplayName) {
String oldDisplayName = displayName;
displayName = newDisplayName;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.USER__DISPLAY_NAME, oldDisplayName,
displayName));
+ }
}
/**
@@ -259,8 +262,9 @@ public class User extends EObjectImpl implements IUser {
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (id: "); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/UserApprovalsMap.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/UserApprovalsMap.java
index 65985e11e..c83db9851 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/UserApprovalsMap.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/UserApprovalsMap.java
@@ -97,9 +97,10 @@ public class UserApprovalsMap extends EObjectImpl implements BasicEMap.Entry<IUs
InternalEObject oldKey = (InternalEObject) key;
key = (IUser) eResolveProxy(oldKey);
if (key != oldKey) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.USER_APPROVALS_MAP__KEY,
oldKey, key));
+ }
}
}
return key;
@@ -122,8 +123,9 @@ public class UserApprovalsMap extends EObjectImpl implements BasicEMap.Entry<IUs
public void setTypedKey(IUser newKey) {
IUser oldKey = key;
key = newKey;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.USER_APPROVALS_MAP__KEY, oldKey, key));
+ }
}
/**
@@ -144,11 +146,13 @@ public class UserApprovalsMap extends EObjectImpl implements BasicEMap.Entry<IUs
msgs = newValue.eInverseAdd(this,
EOPPOSITE_FEATURE_BASE - ReviewsPackage.USER_APPROVALS_MAP__VALUE, null, msgs);
}
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- if (eNotificationRequired())
+ }
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.USER_APPROVALS_MAP__VALUE,
oldValue, value));
+ }
}
}
return value;
@@ -174,10 +178,11 @@ public class UserApprovalsMap extends EObjectImpl implements BasicEMap.Entry<IUs
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
ReviewsPackage.USER_APPROVALS_MAP__VALUE, oldValue, newValue);
- if (msgs == null)
+ if (msgs == null) {
msgs = notification;
- else
+ } else {
msgs.add(notification);
+ }
}
return msgs;
}
@@ -190,18 +195,22 @@ public class UserApprovalsMap extends EObjectImpl implements BasicEMap.Entry<IUs
public void setTypedValue(IReviewerEntry newValue) {
if (newValue != value) {
NotificationChain msgs = null;
- if (value != null)
+ if (value != null) {
msgs = ((InternalEObject) value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.USER_APPROVALS_MAP__VALUE, null, msgs);
- if (newValue != null)
+ }
+ if (newValue != null) {
msgs = ((InternalEObject) newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- ReviewsPackage.USER_APPROVALS_MAP__VALUE, null, msgs);
+ }
msgs = basicSetTypedValue(newValue, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.USER_APPROVALS_MAP__VALUE, newValue,
newValue));
+ }
}
/**
@@ -227,12 +236,14 @@ public class UserApprovalsMap extends EObjectImpl implements BasicEMap.Entry<IUs
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ReviewsPackage.USER_APPROVALS_MAP__KEY:
- if (resolve)
+ if (resolve) {
return getTypedKey();
+ }
return basicGetTypedKey();
case ReviewsPackage.USER_APPROVALS_MAP__VALUE:
- if (resolve)
+ if (resolve) {
return getTypedValue();
+ }
return basicGetTypedValue();
}
return super.eGet(featureID, resolve, coreType);

Back to the top