diff --git a/org.eclipse.mylyn.reviews.core/plugin.properties b/org.eclipse.mylyn.reviews.core/plugin.properties
new file mode 100644
index 000000000..7389d8e22
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.core/plugin.properties
@@ -0,0 +1,12 @@
+# Copyright (c) 2012 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+
+#Note, these values are not actually used any where but we add them to avoid EMF regenrating with bogus defaults
+pluginName = Mylyn Reviews
+providerName = Eclipse Mylyn
diff --git a/org.eclipse.mylyn.reviews.core/plugin.xml b/org.eclipse.mylyn.reviews.core/plugin.xml
index ae0190ec7..b41878b76 100644
--- a/org.eclipse.mylyn.reviews.core/plugin.xml
+++ b/org.eclipse.mylyn.reviews.core/plugin.xml
@@ -21,4 +21,11 @@
genModel="model/reviews.genmodel"/>
+
+
+
+
+
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IComment.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IComment.java
index 7ef7696f1..0ad1c0641 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IComment.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IComment.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.mylyn.reviews.core.model;
-import java.util.Date;
import java.util.List;
/**
@@ -21,16 +20,16 @@ import java.util.List;
* {@link org.eclipse.mylyn.reviews.core.model.IComment#getAuthor Author}
* {@link org.eclipse.mylyn.reviews.core.model.IComment#getType Type}
* {@link org.eclipse.mylyn.reviews.core.model.IComment#getDescription Description}
- * {@link org.eclipse.mylyn.reviews.core.model.IComment#getCreationDate Creation Date}
* {@link org.eclipse.mylyn.reviews.core.model.IComment#getId Id}
* {@link org.eclipse.mylyn.reviews.core.model.IComment#getReplies Replies}
* {@link org.eclipse.mylyn.reviews.core.model.IComment#isDraft Draft}
+ * {@link org.eclipse.mylyn.reviews.core.model.IComment#getParentTopic Parent Topic}
*
*
*
* @generated
*/
-public interface IComment extends IReviewComponent {
+public interface IComment extends IReviewComponent, IIndexed, IDated {
/**
* Returns the value of the 'Author' reference.
*
@@ -106,31 +105,6 @@ public interface IComment extends IReviewComponent {
*/
void setDescription(String value);
- /**
- * Returns the value of the 'Creation Date' attribute.
- *
- * If the meaning of the 'Creation Date' attribute isn't clear, there really should be more of a
- * description here...
- *
- *
- *
- * @return the value of the 'Creation Date' attribute.
- * @see #setCreationDate(Date)
- * @generated
- */
- Date getCreationDate();
-
- /**
- * Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.IComment#getCreationDate
- * Creation Date}' attribute.
- *
- * @param value
- * the new value of the 'Creation Date' attribute.
- * @see #getCreationDate()
- * @generated
- */
- void setCreationDate(Date value);
-
/**
* Returns the value of the 'Id' attribute.
*
@@ -159,7 +133,7 @@ public interface IComment extends IReviewComponent {
* Returns the value of the 'Replies' containment reference list. The list contents are of type
* {@link org.eclipse.mylyn.reviews.core.model.IComment}.
*
- * If the meaning of the 'Replies' containment reference isn't clear, there really should be more of a
+ * If the meaning of the 'Replies' containment reference list isn't clear, there really should be more of a
* description here...
*
*
@@ -194,4 +168,31 @@ public interface IComment extends IReviewComponent {
*/
void setDraft(boolean value);
+ /**
+ * Returns the value of the 'Parent Topic' reference. It is bidirectional and its opposite is '
+ * {@link org.eclipse.mylyn.reviews.core.model.ITopic#getComments Comments}'.
+ *
+ * If the meaning of the 'Parent Topic' reference isn't clear, there really should be more of a description
+ * here...
+ *
+ *
+ *
+ * @return the value of the 'Parent Topic' reference.
+ * @see #setParentTopic(ITopic)
+ * @see org.eclipse.mylyn.reviews.core.model.ITopic#getComments
+ * @generated
+ */
+ ITopic getParentTopic();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.IComment#getParentTopic Parent Topic}
+ * ' reference.
+ *
+ * @param value
+ * the new value of the 'Parent Topic' reference.
+ * @see #getParentTopic()
+ * @generated
+ */
+ void setParentTopic(ITopic value);
+
} // IComment
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IDated.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IDated.java
new file mode 100644
index 000000000..f7f0261f9
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IDated.java
@@ -0,0 +1,80 @@
+/**
+ * Copyright (c) 2011 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ */
+package org.eclipse.mylyn.reviews.core.model;
+
+import java.util.Date;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * A representation of the model object 'Dated'.
+ *
+ * The following features are supported:
+ *
+ * - {@link org.eclipse.mylyn.reviews.core.model.IDated#getCreationDate Creation Date}
+ * - {@link org.eclipse.mylyn.reviews.core.model.IDated#getModificationDate Modification Date}
+ *
+ *
+ *
+ * @generated
+ */
+public interface IDated extends EObject {
+ /**
+ * Returns the value of the 'Creation Date' attribute.
+ *
+ * If the meaning of the 'Creation Date' attribute isn't clear, there really should be more of a
+ * description here...
+ *
+ *
+ *
+ * @return the value of the 'Creation Date' attribute.
+ * @see #setCreationDate(Date)
+ * @generated
+ */
+ Date getCreationDate();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.IDated#getCreationDate Creation Date}
+ * ' attribute.
+ *
+ * @param value
+ * the new value of the 'Creation Date' attribute.
+ * @see #getCreationDate()
+ * @generated
+ */
+ void setCreationDate(Date value);
+
+ /**
+ * Returns the value of the 'Modification Date' attribute.
+ *
+ * If the meaning of the 'Modification Date' attribute isn't clear, there really should be more of a
+ * description here...
+ *
+ *
+ *
+ * @return the value of the 'Modification Date' attribute.
+ * @see #setModificationDate(Date)
+ * @generated
+ */
+ Date getModificationDate();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.IDated#getModificationDate
+ * Modification Date}' attribute.
+ *
+ * @param value
+ * the new value of the 'Modification Date' attribute.
+ * @see #getModificationDate()
+ * @generated
+ */
+ void setModificationDate(Date value);
+
+} // IDated
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IFileRevision.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IFileRevision.java
index f844d1dad..ea9d18c32 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IFileRevision.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IFileRevision.java
@@ -10,8 +10,6 @@
*/
package org.eclipse.mylyn.reviews.core.model;
-import java.util.List;
-
/**
* A representation of the model object 'File Revision'.
*
@@ -20,6 +18,7 @@ import java.util.List;
*
{@link org.eclipse.mylyn.reviews.core.model.IFileRevision#getPath Path}
* {@link org.eclipse.mylyn.reviews.core.model.IFileRevision#getRevision Revision}
* {@link org.eclipse.mylyn.reviews.core.model.IFileRevision#getContent Content}
+ * {@link org.eclipse.mylyn.reviews.core.model.IFileRevision#getFile File}
*
*
*
@@ -100,4 +99,28 @@ public interface IFileRevision extends IReviewItem {
*/
void setContent(String value);
+ /**
+ * Returns the value of the 'File' reference.
+ *
+ * If the meaning of the 'File' reference isn't clear, there really should be more of a description here...
+ *
+ *
+ *
+ * @return the value of the 'File' reference.
+ * @see #setFile(IFileItem)
+ * @generated
+ */
+ IFileItem getFile();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.IFileRevision#getFile File}'
+ * reference.
+ *
+ * @param value
+ * the new value of the 'File' reference.
+ * @see #getFile()
+ * @generated
+ */
+ void setFile(IFileItem value);
+
} // IFileRevision
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IIndexed.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IIndexed.java
new file mode 100644
index 000000000..8e60cac27
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IIndexed.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2011 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ */
+package org.eclipse.mylyn.reviews.core.model;
+
+import java.util.Comparator;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * A representation of the model object 'Indexed'.
+ *
+ * The following features are supported:
+ *
+ * - {@link org.eclipse.mylyn.reviews.core.model.IIndexed#getIndex Index}
+ *
+ *
+ *
+ * @generated
+ */
+public interface IIndexed extends EObject {
+
+ public static final Comparator COMPARATOR = new Comparator() {
+
+ public int compare(IIndexed o1, IIndexed o2) {
+ return ((Long) o1.getIndex()).compareTo(o2.getIndex());
+ }
+ };
+
+ /**
+ * Returns the value of the 'Index' attribute.
+ *
+ * If the meaning of the 'Index' attribute isn't clear, there really should be more of a description
+ * here...
+ *
+ *
+ *
+ * @return the value of the 'Index' attribute.
+ * @generated
+ */
+ long getIndex();
+
+} // IIndexed
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IItem.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IItem.java
deleted file mode 100644
index 09340b477..000000000
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IItem.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2011 Tasktop Technologies and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tasktop Technologies - initial API and implementation
- */
-package org.eclipse.mylyn.reviews.core.model;
-
-/**
- * A representation of the model object 'Item'.
- *
- * The following features are supported:
- *
- * - {@link org.eclipse.mylyn.reviews.core.model.IItem#getAddedBy Added By}
- * - {@link org.eclipse.mylyn.reviews.core.model.IItem#getReview Review}
- *
- *
- *
- * @generated
- */
-public interface IItem extends IReviewComponent {
- /**
- * Returns the value of the 'Added By' reference.
- *
- * If the meaning of the 'Added By' reference isn't clear, there really should be more of a description
- * here...
- *
- *
- *
- * @return the value of the 'Added By' reference.
- * @see #setAddedBy(IUser)
- * @generated
- */
- IUser getAddedBy();
-
- /**
- * Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.IItem#getAddedBy Added By}'
- * reference.
- *
- * @param value
- * the new value of the 'Added By' reference.
- * @see #getAddedBy()
- * @generated
- */
- void setAddedBy(IUser value);
-
- /**
- * Returns the value of the 'Review' reference.
- *
- * If the meaning of the 'Review' reference isn't clear, there really should be more of a description
- * here...
- *
- *
- *
- * @return the value of the 'Review' reference.
- * @see #setReview(IReview)
- * @generated
- */
- IReview getReview();
-
- /**
- * Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.IItem#getReview Review}' reference.
- *
- *
- * @param value
- * the new value of the 'Review' reference.
- * @see #getReview()
- * @generated
- */
- void setReview(IReview value);
-
-} // IItem
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineLocation.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineLocation.java
index b6b127b08..b91172428 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineLocation.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineLocation.java
@@ -18,6 +18,8 @@ import java.util.List;
* The following features are supported:
*
* - {@link org.eclipse.mylyn.reviews.core.model.ILineLocation#getRanges Ranges}
+ * - {@link org.eclipse.mylyn.reviews.core.model.ILineLocation#getRangeMin Range Min}
+ * - {@link org.eclipse.mylyn.reviews.core.model.ILineLocation#getRangeMax Range Max}
*
*
*
@@ -38,8 +40,30 @@ public interface ILineLocation extends ILocation {
*/
List getRanges();
- int getTotalMin();
+ /**
+ * Returns the value of the 'Range Min' attribute.
+ *
+ * If the meaning of the 'Range Min' attribute isn't clear, there really should be more of a description
+ * here...
+ *
+ *
+ *
+ * @return the value of the 'Range Min' attribute.
+ * @generated
+ */
+ int getRangeMin();
- int getTotalMax();
+ /**
+ * Returns the value of the 'Range Max' attribute.
+ *
+ * If the meaning of the 'Range Max' attribute isn't clear, there really should be more of a description
+ * here...
+ *
+ *
+ *
+ * @return the value of the 'Range Max' attribute.
+ * @generated
+ */
+ int getRangeMax();
} // ILineLocation
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILocation.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILocation.java
index 7a0d6bf5a..4027a1733 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILocation.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILocation.java
@@ -10,12 +10,10 @@
*/
package org.eclipse.mylyn.reviews.core.model;
-import org.eclipse.emf.ecore.EObject;
-
/**
* A representation of the model object 'Location'.
*
* @generated
*/
-public interface ILocation extends EObject {
+public interface ILocation extends IIndexed {
} // ILocation
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReview.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReview.java
index 6429ee38f..0b897f527 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReview.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReview.java
@@ -17,31 +17,17 @@ import java.util.List;
*
* The following features are supported:
*
- * - {@link org.eclipse.mylyn.reviews.core.model.IReview#getTopics Topics}
* - {@link org.eclipse.mylyn.reviews.core.model.IReview#getItems Items}
* - {@link org.eclipse.mylyn.reviews.core.model.IReview#getReviewTask Review Task}
* - {@link org.eclipse.mylyn.reviews.core.model.IReview#getState State}
* - {@link org.eclipse.mylyn.reviews.core.model.IReview#getId Id}
+ * - {@link org.eclipse.mylyn.reviews.core.model.IReview#getOwner Owner}
*
*
*
* @generated
*/
-public interface IReview extends IReviewComponent {
- /**
- * Returns the value of the 'Topics' reference list. The list contents are of type
- * {@link org.eclipse.mylyn.reviews.core.model.ITopic}.
- *
- * If the meaning of the 'Topics' reference list isn't clear, there really should be more of a description
- * here...
- *
- *
- *
- * @return the value of the 'Topics' reference list.
- * @generated
- */
- List getTopics();
-
+public interface IReview extends ITopicContainer, IDated {
/**
* Returns the value of the 'Items' reference list. The list contents are of type
* {@link org.eclipse.mylyn.reviews.core.model.IReviewItem}.
@@ -130,4 +116,29 @@ public interface IReview extends IReviewComponent {
*/
void setId(String value);
+ /**
+ * Returns the value of the 'Owner' reference.
+ *
+ * If the meaning of the 'Owner' reference isn't clear, there really should be more of a description
+ * here...
+ *
+ *
+ *
+ * @return the value of the 'Owner' reference.
+ * @see #setOwner(IUser)
+ * @generated
+ */
+ IUser getOwner();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.IReview#getOwner Owner}' reference.
+ *
+ *
+ * @param value
+ * the new value of the 'Owner' reference.
+ * @see #getOwner()
+ * @generated
+ */
+ void setOwner(IUser value);
+
} // IReview
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewItem.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewItem.java
index 98414e9ce..b116424f3 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewItem.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewItem.java
@@ -10,8 +10,6 @@
*/
package org.eclipse.mylyn.reviews.core.model;
-import java.util.List;
-
/**
* A representation of the model object 'Review Item'.
*
@@ -20,14 +18,13 @@ import java.util.List;
*
{@link org.eclipse.mylyn.reviews.core.model.IReviewItem#getAddedBy Added By}
* {@link org.eclipse.mylyn.reviews.core.model.IReviewItem#getReview Review}
* {@link org.eclipse.mylyn.reviews.core.model.IReviewItem#getName Name}
- * {@link org.eclipse.mylyn.reviews.core.model.IReviewItem#getTopics Topics}
* {@link org.eclipse.mylyn.reviews.core.model.IReviewItem#getId Id}
*
*
*
* @generated
*/
-public interface IReviewItem extends IReviewComponent {
+public interface IReviewItem extends ITopicContainer {
/**
* Returns the value of the 'Added By' reference.
*
@@ -102,22 +99,6 @@ public interface IReviewItem extends IReviewComponent {
*/
void setName(String value);
- /**
- * Returns the value of the 'Topics' reference list. The list contents are of type
- * {@link org.eclipse.mylyn.reviews.core.model.ITopic}. It is bidirectional and its opposite is '
- * {@link org.eclipse.mylyn.reviews.core.model.ITopic#getItem Item}'.
- *
- * If the meaning of the 'Topics' reference list isn't clear, there really should be more of a description
- * here...
- *
- *
- *
- * @return the value of the 'Topics' reference list.
- * @see org.eclipse.mylyn.reviews.core.model.ITopic#getItem
- * @generated
- */
- List getTopics();
-
/**
* Returns the value of the 'Id' attribute.
*
@@ -142,11 +123,4 @@ public interface IReviewItem extends IReviewComponent {
*/
void setId(String value);
- /**
- *
- *
- * @generated
- */
- ITopic createTopicComment(ILocation initalLocation, String commentText);
-
} // IReviewItem
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewItemSet.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewItemSet.java
index 70050ab8e..e2538d7c2 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewItemSet.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewItemSet.java
@@ -24,13 +24,13 @@ import java.util.List;
*
* @generated
*/
-public interface IReviewItemSet extends IReviewItem {
+public interface IReviewItemSet extends IReviewItem, IDated {
/**
* Returns the value of the 'Items' reference list. The list contents are of type
* {@link org.eclipse.mylyn.reviews.core.model.IReviewItem}.
*
- * If the meaning of the 'Items' containment reference list isn't clear, there really should be more of a
- * description here...
+ * If the meaning of the 'Items' reference list isn't clear, there really should be more of a description
+ * here...
*
*
*
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ITopic.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ITopic.java
index 28357515b..fd7aa3606 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ITopic.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ITopic.java
@@ -70,7 +70,9 @@ public interface ITopic extends IComment {
/**
* Returns the value of the 'Comments' reference list. The list contents are of type
- * {@link org.eclipse.mylyn.reviews.core.model.IComment}.
+ * {@link org.eclipse.mylyn.reviews.core.model.IComment}. It is bidirectional and its opposite is '
+ * {@link org.eclipse.mylyn.reviews.core.model.IComment#getParentTopic Parent Topic}'.
*
* If the meaning of the 'Comments' reference list isn't clear, there really should be more of a
* description here...
@@ -78,6 +80,7 @@ public interface ITopic extends IComment {
*
*
* @return the value of the 'Comments' reference list.
+ * @see org.eclipse.mylyn.reviews.core.model.IComment#getParentTopic
* @generated
*/
List getComments();
@@ -134,18 +137,19 @@ public interface ITopic extends IComment {
/**
* Returns the value of the 'Item' reference. It is bidirectional and its opposite is '
- * {@link org.eclipse.mylyn.reviews.core.model.IReviewItem#getTopics Topics}'.
+ * {@link org.eclipse.mylyn.reviews.core.model.ITopicContainer#getDirectTopics Direct Topics}'.
*
* If the meaning of the 'Item' reference isn't clear, there really should be more of a description here...
*
*
*
* @return the value of the 'Item' reference.
- * @see #setItem(IReviewItem)
- * @see org.eclipse.mylyn.reviews.core.model.IReviewItem#getTopics
+ * @see #setItem(ITopicContainer)
+ * @see org.eclipse.mylyn.reviews.core.model.ITopicContainer#getDirectTopics
* @generated
*/
- IReviewItem getItem();
+ ITopicContainer getItem();
/**
* Sets the value of the '{@link org.eclipse.mylyn.reviews.core.model.ITopic#getItem Item}' reference. A representation of the model object 'Topic Container'.
+ *
+ * The following features are supported:
+ *
+ * - {@link org.eclipse.mylyn.reviews.core.model.ITopicContainer#getAllComments All Comments}
+ * - {@link org.eclipse.mylyn.reviews.core.model.ITopicContainer#getTopics Topics}
+ * - {@link org.eclipse.mylyn.reviews.core.model.ITopicContainer#getDirectTopics Direct Topics}
+ *
+ *
+ *
+ * @generated
+ */
+public interface ITopicContainer extends IReviewComponent {
+ /**
+ * Returns the value of the 'All Comments' reference list. The list contents are of type
+ * {@link org.eclipse.mylyn.reviews.core.model.IComment}.
+ *
+ * If the meaning of the 'All Comments' reference list isn't clear, there really should be more of a
+ * description here...
+ *
+ *
+ *
+ * @return the value of the 'All Comments' reference list.
+ * @generated
+ */
+ List getAllComments();
+
+ /**
+ * Returns the value of the 'Topics' reference list. The list contents are of type
+ * {@link org.eclipse.mylyn.reviews.core.model.ITopic}.
+ *
+ * If the meaning of the 'Topics' reference list isn't clear, there really should be more of a description
+ * here...
+ *
+ *
+ *
+ * @return the value of the 'Topics' reference list.
+ * @generated
+ */
+ List getTopics();
+
+ /**
+ * Returns the value of the 'Direct Topics' reference list. The list contents are of type
+ * {@link org.eclipse.mylyn.reviews.core.model.ITopic}. It is bidirectional and its opposite is '
+ * {@link org.eclipse.mylyn.reviews.core.model.ITopic#getItem Item}'.
+ *
+ * If the meaning of the 'Direct Topics' reference list isn't clear, there really should be more of a
+ * description here...
+ *
+ *
+ *
+ * @return the value of the 'Direct Topics' reference list.
+ * @see org.eclipse.mylyn.reviews.core.model.ITopic#getItem
+ * @generated
+ */
+ List getDirectTopics();
+
+ /**
+ *
+ *
+ * @generated
+ */
+ ITopic createTopicComment(ILocation initalLocation, String commentText);
+
+} // ITopicContainer
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 b2278113e..0db87dc16 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
@@ -26,6 +26,9 @@ import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.mylyn.reviews.core.model.IComment;
import org.eclipse.mylyn.reviews.core.model.ICommentType;
+import org.eclipse.mylyn.reviews.core.model.IDated;
+import org.eclipse.mylyn.reviews.core.model.IIndexed;
+import org.eclipse.mylyn.reviews.core.model.ITopic;
import org.eclipse.mylyn.reviews.core.model.IUser;
/**
@@ -33,19 +36,72 @@ import org.eclipse.mylyn.reviews.core.model.IUser;
*
* The following features are implemented:
*
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getIndex Index}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getCreationDate Creation Date}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getModificationDate Modification Date}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getAuthor Author}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getType Type}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getDescription Description}
- * - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getCreationDate Creation Date}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getId Id}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getReplies Replies}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#isDraft Draft}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.Comment#getParentTopic Parent Topic}
*
*
*
* @generated
*/
public class Comment extends ReviewComponent implements IComment {
+ /**
+ * The default value of the '{@link #getIndex() Index}' attribute.
+ *
+ * @see #getIndex()
+ * @generated
+ * @ordered
+ */
+ protected static final long INDEX_EDEFAULT = 0L;
+
+ /**
+ * The default value of the '{@link #getCreationDate() Creation Date}' attribute.
+ *
+ *
+ * @see #getCreationDate()
+ * @generated
+ * @ordered
+ */
+ protected static final Date CREATION_DATE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCreationDate() Creation Date}' attribute.
+ *
+ *
+ * @see #getCreationDate()
+ * @generated
+ * @ordered
+ */
+ protected Date creationDate = CREATION_DATE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getModificationDate() Modification Date}' attribute.
+ *
+ * @see #getModificationDate()
+ * @generated
+ * @ordered
+ */
+ protected static final Date MODIFICATION_DATE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getModificationDate() Modification Date}' attribute.
+ *
+ * @see #getModificationDate()
+ * @generated
+ * @ordered
+ */
+ protected Date modificationDate = MODIFICATION_DATE_EDEFAULT;
+
/**
* The cached value of the '{@link #getAuthor() Author}' reference.
@@ -86,26 +142,6 @@ public class Comment extends ReviewComponent implements IComment {
*/
protected String description = DESCRIPTION_EDEFAULT;
- /**
- * The default value of the '{@link #getCreationDate() Creation Date}' attribute.
- *
- *
- * @see #getCreationDate()
- * @generated
- * @ordered
- */
- protected static final Date CREATION_DATE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getCreationDate() Creation Date}' attribute.
- *
- *
- * @see #getCreationDate()
- * @generated
- * @ordered
- */
- protected Date creationDate = CREATION_DATE_EDEFAULT;
-
/**
* The default value of the '{@link #getId() Id}' attribute.
*
@@ -154,6 +190,16 @@ public class Comment extends ReviewComponent implements IComment {
*/
protected boolean draft = DRAFT_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getParentTopic() Parent Topic}' reference.
+ *
+ * @see #getParentTopic()
+ * @generated
+ * @ordered
+ */
+ protected ITopic parentTopic;
+
/**
*
*
@@ -173,6 +219,18 @@ public class Comment extends ReviewComponent implements IComment {
return ReviewsPackage.Literals.COMMENT;
}
+ /**
+ *
+ *
+ * @generated NOT
+ */
+ public long getIndex() {
+ if (getParentTopic() != null) {
+ return getParentTopic().getIndex();
+ }
+ return 0;
+ }
+
/**
*
*
@@ -313,6 +371,28 @@ public class Comment extends ReviewComponent implements IComment {
oldCreationDate, creationDate));
}
+ /**
+ *
+ *
+ * @generated
+ */
+ public Date getModificationDate() {
+ return modificationDate;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setModificationDate(Date newModificationDate) {
+ Date oldModificationDate = modificationDate;
+ modificationDate = newModificationDate;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.COMMENT__MODIFICATION_DATE,
+ oldModificationDate, modificationDate));
+ }
+
/**
*
*
@@ -368,6 +448,91 @@ public class Comment extends ReviewComponent implements IComment {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.COMMENT__DRAFT, oldDraft, draft));
}
+ /**
+ *
+ *
+ * @generated
+ */
+ public ITopic getParentTopic() {
+ if (parentTopic != null && parentTopic.eIsProxy()) {
+ InternalEObject oldParentTopic = (InternalEObject) parentTopic;
+ parentTopic = (ITopic) eResolveProxy(oldParentTopic);
+ if (parentTopic != oldParentTopic) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.COMMENT__PARENT_TOPIC,
+ oldParentTopic, parentTopic));
+ }
+ }
+ return parentTopic;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public ITopic basicGetParentTopic() {
+ return parentTopic;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public NotificationChain basicSetParentTopic(ITopic newParentTopic, NotificationChain msgs) {
+ ITopic oldParentTopic = parentTopic;
+ parentTopic = newParentTopic;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ ReviewsPackage.COMMENT__PARENT_TOPIC, oldParentTopic, newParentTopic);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setParentTopic(ITopic newParentTopic) {
+ if (newParentTopic != parentTopic) {
+ NotificationChain msgs = null;
+ if (parentTopic != null)
+ msgs = ((InternalEObject) parentTopic).eInverseRemove(this, ReviewsPackage.TOPIC__COMMENTS,
+ ITopic.class, msgs);
+ if (newParentTopic != null)
+ msgs = ((InternalEObject) newParentTopic).eInverseAdd(this, ReviewsPackage.TOPIC__COMMENTS,
+ ITopic.class, msgs);
+ msgs = basicSetParentTopic(newParentTopic, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.COMMENT__PARENT_TOPIC, newParentTopic,
+ newParentTopic));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ReviewsPackage.COMMENT__PARENT_TOPIC:
+ if (parentTopic != null)
+ msgs = ((InternalEObject) parentTopic).eInverseRemove(this, ReviewsPackage.TOPIC__COMMENTS,
+ ITopic.class, msgs);
+ return basicSetParentTopic((ITopic) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
/**
*
*
@@ -380,6 +545,8 @@ public class Comment extends ReviewComponent implements IComment {
return basicSetType(null, msgs);
case ReviewsPackage.COMMENT__REPLIES:
return ((InternalEList>) getReplies()).basicRemove(otherEnd, msgs);
+ case ReviewsPackage.COMMENT__PARENT_TOPIC:
+ return basicSetParentTopic(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -392,6 +559,12 @@ public class Comment extends ReviewComponent implements IComment {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
+ case ReviewsPackage.COMMENT__INDEX:
+ return getIndex();
+ case ReviewsPackage.COMMENT__CREATION_DATE:
+ return getCreationDate();
+ case ReviewsPackage.COMMENT__MODIFICATION_DATE:
+ return getModificationDate();
case ReviewsPackage.COMMENT__AUTHOR:
return getAuthor();
case ReviewsPackage.COMMENT__TYPE:
@@ -400,14 +573,16 @@ public class Comment extends ReviewComponent implements IComment {
return basicGetType();
case ReviewsPackage.COMMENT__DESCRIPTION:
return getDescription();
- case ReviewsPackage.COMMENT__CREATION_DATE:
- return getCreationDate();
case ReviewsPackage.COMMENT__ID:
return getId();
case ReviewsPackage.COMMENT__REPLIES:
return getReplies();
case ReviewsPackage.COMMENT__DRAFT:
return isDraft();
+ case ReviewsPackage.COMMENT__PARENT_TOPIC:
+ if (resolve)
+ return getParentTopic();
+ return basicGetParentTopic();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -421,6 +596,12 @@ public class Comment extends ReviewComponent implements IComment {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
+ case ReviewsPackage.COMMENT__CREATION_DATE:
+ setCreationDate((Date) newValue);
+ return;
+ case ReviewsPackage.COMMENT__MODIFICATION_DATE:
+ setModificationDate((Date) newValue);
+ return;
case ReviewsPackage.COMMENT__AUTHOR:
setAuthor((IUser) newValue);
return;
@@ -430,9 +611,6 @@ public class Comment extends ReviewComponent implements IComment {
case ReviewsPackage.COMMENT__DESCRIPTION:
setDescription((String) newValue);
return;
- case ReviewsPackage.COMMENT__CREATION_DATE:
- setCreationDate((Date) newValue);
- return;
case ReviewsPackage.COMMENT__ID:
setId((String) newValue);
return;
@@ -443,6 +621,9 @@ public class Comment extends ReviewComponent implements IComment {
case ReviewsPackage.COMMENT__DRAFT:
setDraft((Boolean) newValue);
return;
+ case ReviewsPackage.COMMENT__PARENT_TOPIC:
+ setParentTopic((ITopic) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -455,6 +636,12 @@ public class Comment extends ReviewComponent implements IComment {
@Override
public void eUnset(int featureID) {
switch (featureID) {
+ case ReviewsPackage.COMMENT__CREATION_DATE:
+ setCreationDate(CREATION_DATE_EDEFAULT);
+ return;
+ case ReviewsPackage.COMMENT__MODIFICATION_DATE:
+ setModificationDate(MODIFICATION_DATE_EDEFAULT);
+ return;
case ReviewsPackage.COMMENT__AUTHOR:
setAuthor((IUser) null);
return;
@@ -464,9 +651,6 @@ public class Comment extends ReviewComponent implements IComment {
case ReviewsPackage.COMMENT__DESCRIPTION:
setDescription(DESCRIPTION_EDEFAULT);
return;
- case ReviewsPackage.COMMENT__CREATION_DATE:
- setCreationDate(CREATION_DATE_EDEFAULT);
- return;
case ReviewsPackage.COMMENT__ID:
setId(ID_EDEFAULT);
return;
@@ -476,6 +660,9 @@ public class Comment extends ReviewComponent implements IComment {
case ReviewsPackage.COMMENT__DRAFT:
setDraft(DRAFT_EDEFAULT);
return;
+ case ReviewsPackage.COMMENT__PARENT_TOPIC:
+ setParentTopic((ITopic) null);
+ return;
}
super.eUnset(featureID);
}
@@ -488,24 +675,88 @@ public class Comment extends ReviewComponent implements IComment {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
+ case ReviewsPackage.COMMENT__INDEX:
+ return getIndex() != INDEX_EDEFAULT;
+ case ReviewsPackage.COMMENT__CREATION_DATE:
+ return CREATION_DATE_EDEFAULT == null ? creationDate != null : !CREATION_DATE_EDEFAULT.equals(creationDate);
+ case ReviewsPackage.COMMENT__MODIFICATION_DATE:
+ return MODIFICATION_DATE_EDEFAULT == null
+ ? modificationDate != null
+ : !MODIFICATION_DATE_EDEFAULT.equals(modificationDate);
case ReviewsPackage.COMMENT__AUTHOR:
return author != null;
case ReviewsPackage.COMMENT__TYPE:
return type != null;
case ReviewsPackage.COMMENT__DESCRIPTION:
return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case ReviewsPackage.COMMENT__CREATION_DATE:
- return CREATION_DATE_EDEFAULT == null ? creationDate != null : !CREATION_DATE_EDEFAULT.equals(creationDate);
case ReviewsPackage.COMMENT__ID:
return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
case ReviewsPackage.COMMENT__REPLIES:
return replies != null && !replies.isEmpty();
case ReviewsPackage.COMMENT__DRAFT:
return draft != DRAFT_EDEFAULT;
+ case ReviewsPackage.COMMENT__PARENT_TOPIC:
+ return parentTopic != null;
}
return super.eIsSet(featureID);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
+ if (baseClass == IIndexed.class) {
+ switch (derivedFeatureID) {
+ case ReviewsPackage.COMMENT__INDEX:
+ return ReviewsPackage.INDEXED__INDEX;
+ default:
+ return -1;
+ }
+ }
+ if (baseClass == IDated.class) {
+ switch (derivedFeatureID) {
+ case ReviewsPackage.COMMENT__CREATION_DATE:
+ return ReviewsPackage.DATED__CREATION_DATE;
+ case ReviewsPackage.COMMENT__MODIFICATION_DATE:
+ return ReviewsPackage.DATED__MODIFICATION_DATE;
+ default:
+ return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
+ if (baseClass == IIndexed.class) {
+ switch (baseFeatureID) {
+ case ReviewsPackage.INDEXED__INDEX:
+ return ReviewsPackage.COMMENT__INDEX;
+ default:
+ return -1;
+ }
+ }
+ if (baseClass == IDated.class) {
+ switch (baseFeatureID) {
+ case ReviewsPackage.DATED__CREATION_DATE:
+ return ReviewsPackage.COMMENT__CREATION_DATE;
+ case ReviewsPackage.DATED__MODIFICATION_DATE:
+ return ReviewsPackage.COMMENT__MODIFICATION_DATE;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
/**
*
*
@@ -517,10 +768,12 @@ public class Comment extends ReviewComponent implements IComment {
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: "); //$NON-NLS-1$
- result.append(description);
- result.append(", creationDate: "); //$NON-NLS-1$
+ result.append(" (creationDate: "); //$NON-NLS-1$
result.append(creationDate);
+ result.append(", modificationDate: "); //$NON-NLS-1$
+ result.append(modificationDate);
+ result.append(", description: "); //$NON-NLS-1$
+ result.append(description);
result.append(", id: "); //$NON-NLS-1$
result.append(id);
result.append(", draft: "); //$NON-NLS-1$
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 c74774ace..e40746d7c 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
@@ -10,15 +10,14 @@
*/
package org.eclipse.mylyn.reviews.internal.core.model;
-import org.eclipse.emf.common.notify.Notification;
+import java.util.List;
-import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
+import org.eclipse.mylyn.reviews.core.model.IComment;
import org.eclipse.mylyn.reviews.core.model.IFileItem;
import org.eclipse.mylyn.reviews.core.model.IFileRevision;
@@ -101,6 +100,23 @@ public class FileItem extends ReviewItem implements IFileItem {
return base;
}
+ /**
+ * Unmodifiable and not updated.
+ *
+ * @generated NOT
+ */
+ @Override
+ public List getAllComments() {
+ BasicEList all = new BasicEList(getTopics());
+ if (getBase() != null) {
+ all.addAll(getBase().getTopics());
+ }
+ if (getTarget() != null) {
+ all.addAll(getTarget().getTopics());
+ }
+ return all;
+ }
+
/**
*
*
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileRevision.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileRevision.java
index eaa3363d8..d0a5e3148 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileRevision.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileRevision.java
@@ -17,7 +17,9 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.mylyn.reviews.core.model.IFileItem;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
@@ -32,6 +34,7 @@ import org.eclipse.mylyn.reviews.core.model.ITopic;
* {@link org.eclipse.mylyn.reviews.internal.core.model.FileRevision#getPath Path}
* {@link org.eclipse.mylyn.reviews.internal.core.model.FileRevision#getRevision Revision}
* {@link org.eclipse.mylyn.reviews.internal.core.model.FileRevision#getContent Content}
+ * {@link org.eclipse.mylyn.reviews.internal.core.model.FileRevision#getFile File}
*
*
*
@@ -98,6 +101,16 @@ public class FileRevision extends ReviewItem implements IFileRevision {
*/
protected String content = CONTENT_EDEFAULT;
+ /**
+ * <<<<<<< Upstream, based on origin/master ======= The cached value of the '{@link #getFile() File}'
+ * reference.
+ *
+ * @see #getFile()
+ * @generated
+ * @ordered
+ */
+ protected IFileItem file;
+
/**
*
*
@@ -182,6 +195,45 @@ public class FileRevision extends ReviewItem implements IFileRevision {
content));
}
+ /**
+ *
+ *
+ * @generated
+ */
+ public IFileItem getFile() {
+ if (file != null && file.eIsProxy()) {
+ InternalEObject oldFile = (InternalEObject) file;
+ file = (IFileItem) eResolveProxy(oldFile);
+ if (file != oldFile) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.FILE_REVISION__FILE,
+ oldFile, file));
+ }
+ }
+ return file;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public IFileItem basicGetFile() {
+ return file;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setFile(IFileItem newFile) {
+ IFileItem oldFile = file;
+ file = newFile;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.FILE_REVISION__FILE, oldFile, file));
+ }
+
/**
*
*
@@ -196,6 +248,10 @@ public class FileRevision extends ReviewItem implements IFileRevision {
return getRevision();
case ReviewsPackage.FILE_REVISION__CONTENT:
return getContent();
+ case ReviewsPackage.FILE_REVISION__FILE:
+ if (resolve)
+ return getFile();
+ return basicGetFile();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -218,6 +274,9 @@ public class FileRevision extends ReviewItem implements IFileRevision {
case ReviewsPackage.FILE_REVISION__CONTENT:
setContent((String) newValue);
return;
+ case ReviewsPackage.FILE_REVISION__FILE:
+ setFile((IFileItem) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -239,6 +298,9 @@ public class FileRevision extends ReviewItem implements IFileRevision {
case ReviewsPackage.FILE_REVISION__CONTENT:
setContent(CONTENT_EDEFAULT);
return;
+ case ReviewsPackage.FILE_REVISION__FILE:
+ setFile((IFileItem) null);
+ return;
}
super.eUnset(featureID);
}
@@ -257,6 +319,8 @@ public class FileRevision extends ReviewItem implements IFileRevision {
return REVISION_EDEFAULT == null ? revision != null : !REVISION_EDEFAULT.equals(revision);
case ReviewsPackage.FILE_REVISION__CONTENT:
return CONTENT_EDEFAULT == null ? content != null : !CONTENT_EDEFAULT.equals(content);
+ case ReviewsPackage.FILE_REVISION__FILE:
+ return file != null;
}
return super.eIsSet(featureID);
}
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 d1bedd3fd..7594734a8 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
@@ -28,6 +28,8 @@ import org.eclipse.mylyn.reviews.core.model.ILineRange;
* The following features are implemented:
*
* - {@link org.eclipse.mylyn.reviews.internal.core.model.LineLocation#getRanges Ranges}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.LineLocation#getRangeMin Range Min}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.LineLocation#getRangeMax Range Max}
*
*
*
@@ -44,6 +46,26 @@ public class LineLocation extends Location implements ILineLocation {
*/
protected EList ranges;
+ /**
+ * The default value of the '{@link #getRangeMin() Range Min}' attribute.
+ *
+ * @see #getRangeMin()
+ * @generated
+ * @ordered
+ */
+ protected static final int RANGE_MIN_EDEFAULT = 0;
+
+ /**
+ * The default value of the '{@link #getRangeMax() Range Max}' attribute.
+ *
+ * @see #getRangeMax()
+ * @generated
+ * @ordered
+ */
+ protected static final int RANGE_MAX_EDEFAULT = 0;
+
/**
*
*
@@ -76,6 +98,44 @@ public class LineLocation extends Location implements ILineLocation {
return ranges;
}
+ /**
+ *
+ *
+ * @generated NOT
+ */
+ public int getRangeMin() {
+ int min = -1;
+ for (ILineRange range : getRanges()) {
+ if (min == -1 || range.getStart() < min) {
+ min = range.getStart();
+ }
+ }
+ return (min == -1) ? 0 : min;
+ }
+
+ /**
+ *
+ *
+ * @generated NOT
+ */
+ public int getRangeMax() {
+ int max = -1;
+ for (ILineRange range : getRanges()) {
+ if (max == -1 || range.getStart() > max) {
+ max = range.getStart();
+ }
+ }
+ return (max == -1) ? 0 : max;
+ }
+
+ /**
+ * @generated NOT
+ */
+ @Override
+ public long getIndex() {
+ return getRangeMin();
+ }
+
/**
*
*
@@ -100,6 +160,10 @@ public class LineLocation extends Location implements ILineLocation {
switch (featureID) {
case ReviewsPackage.LINE_LOCATION__RANGES:
return getRanges();
+ case ReviewsPackage.LINE_LOCATION__RANGE_MIN:
+ return getRangeMin();
+ case ReviewsPackage.LINE_LOCATION__RANGE_MAX:
+ return getRangeMax();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -146,28 +210,12 @@ public class LineLocation extends Location implements ILineLocation {
switch (featureID) {
case ReviewsPackage.LINE_LOCATION__RANGES:
return ranges != null && !ranges.isEmpty();
+ case ReviewsPackage.LINE_LOCATION__RANGE_MIN:
+ return getRangeMin() != RANGE_MIN_EDEFAULT;
+ case ReviewsPackage.LINE_LOCATION__RANGE_MAX:
+ return getRangeMax() != RANGE_MAX_EDEFAULT;
}
return super.eIsSet(featureID);
}
- public int getTotalMin() {
- int min = -1;
- for (ILineRange range : getRanges()) {
- if (min == -1 || range.getStart() < min) {
- min = range.getStart();
- }
- }
- return (min == -1) ? 0 : min;
- }
-
- public int getTotalMax() {
- int max = -1;
- for (ILineRange range : getRanges()) {
- if (max == -1 || range.getStart() > max) {
- max = range.getStart();
- }
- }
- return (max == -1) ? 0 : max;
- }
-
} //LineLocation
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Location.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Location.java
index 7db16dd38..9c2f43233 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Location.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Location.java
@@ -24,11 +24,25 @@ import org.eclipse.mylyn.reviews.core.model.IReviewItem;
/**
* An implementation of the model object 'Location'.
*
+ * The following features are implemented:
+ *
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.Location#getIndex Index}
+ *
*
*
* @generated
*/
public abstract class Location extends EObjectImpl implements ILocation {
+ /**
+ * The default value of the '{@link #getIndex() Index}' attribute.
+ *
+ * @see #getIndex()
+ * @generated
+ * @ordered
+ */
+ protected static final long INDEX_EDEFAULT = 0L;
+
/**
*
*
@@ -48,4 +62,41 @@ public abstract class Location extends EObjectImpl implements ILocation {
return ReviewsPackage.Literals.LOCATION;
}
+ /**
+ *
+ *
+ * @generated NOT
+ */
+ public long getIndex() {
+ return 0;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ReviewsPackage.LOCATION__INDEX:
+ return getIndex();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ReviewsPackage.LOCATION__INDEX:
+ return getIndex() != INDEX_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
} //Location
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 c0e47ca3f..47003baee 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
@@ -11,52 +11,83 @@
package org.eclipse.mylyn.reviews.internal.core.model;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
-
+import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
-
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
-
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-
-import org.eclipse.mylyn.reviews.core.model.IItem;
+import org.eclipse.mylyn.reviews.core.model.IComment;
+import org.eclipse.mylyn.reviews.core.model.IDated;
import org.eclipse.mylyn.reviews.core.model.IReview;
import org.eclipse.mylyn.reviews.core.model.IReviewItem;
import org.eclipse.mylyn.reviews.core.model.IReviewState;
import org.eclipse.mylyn.reviews.core.model.ITaskReference;
import org.eclipse.mylyn.reviews.core.model.ITopic;
+import org.eclipse.mylyn.reviews.core.model.IUser;
/**
* An implementation of the model object 'Review'.
*
* The following features are implemented:
*
- * - {@link org.eclipse.mylyn.reviews.internal.core.model.Review#getTopics Topics}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.Review#getCreationDate Creation Date}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.Review#getModificationDate Modification Date}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Review#getItems Items}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Review#getReviewTask Review Task}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Review#getState State}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.Review#getId Id}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.Review#getOwner Owner}
*
*
*
* @generated
*/
-public class Review extends ReviewComponent implements IReview {
+public class Review extends TopicContainer implements IReview {
/**
- * The cached value of the '{@link #getTopics() Topics}' reference list.
+ * The default value of the '{@link #getCreationDate() Creation Date}' attribute.
+ *
+ *
+ * @see #getCreationDate()
+ * @generated
+ * @ordered
+ */
+ protected static final Date CREATION_DATE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCreationDate() Creation Date}' attribute.
+ *
+ *
+ * @see #getCreationDate()
+ * @generated
+ * @ordered
+ */
+ protected Date creationDate = CREATION_DATE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getModificationDate() Modification Date}' attribute.
*
- * @see #getTopics()
+ * @see #getModificationDate()
* @generated
* @ordered
*/
- protected EList topics;
+ protected static final Date MODIFICATION_DATE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getModificationDate() Modification Date}' attribute.
+ *
+ * @see #getModificationDate()
+ * @generated
+ * @ordered
+ */
+ protected Date modificationDate = MODIFICATION_DATE_EDEFAULT;
/**
* The cached value of the '{@link #getItems() Items}' reference list.
+ *
+ * @see #getOwner()
+ * @generated
+ * @ordered
+ */
+ protected IUser owner;
+
/**
*
*
@@ -130,11 +171,72 @@ public class Review extends ReviewComponent implements IReview {
*
* @generated
*/
- public List getTopics() {
- if (topics == null) {
- topics = new EObjectResolvingEList(ITopic.class, this, ReviewsPackage.REVIEW__TOPICS);
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setCreationDate(Date newCreationDate) {
+ Date oldCreationDate = creationDate;
+ creationDate = newCreationDate;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__CREATION_DATE,
+ oldCreationDate, creationDate));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public Date getModificationDate() {
+ return modificationDate;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setModificationDate(Date newModificationDate) {
+ Date oldModificationDate = modificationDate;
+ modificationDate = newModificationDate;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__MODIFICATION_DATE,
+ oldModificationDate, modificationDate));
+ }
+
+ /**
+ *
+ *
+ * @generated NOT
+ */
+ public Date getLastChangeDate() {
+ if (getModificationDate() != null) {
+ return getModificationDate();
}
- return topics;
+ return getCreationDate();
+ }
+
+ /**
+ * Unmodifiable and not updated.
+ *
+ * @generated NOT
+ */
+ @Override
+ public List getAllComments() {
+ BasicEList all = new BasicEList(getTopics());
+ for (ITopic topic : getTopics()) {
+ all.addAll(topic.getReplies());
+ }
+ for (IReviewItem item : getItems()) {
+ all.addAll(item.getAllComments());
+ }
+ return all;
}
/**
@@ -322,6 +424,45 @@ public class Review extends ReviewComponent implements IReview {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__ID, oldId, id));
}
+ /**
+ *
+ *
+ * @generated
+ */
+ public IUser getOwner() {
+ if (owner != null && owner.eIsProxy()) {
+ InternalEObject oldOwner = (InternalEObject) owner;
+ owner = (IUser) eResolveProxy(oldOwner);
+ if (owner != oldOwner) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW__OWNER, oldOwner,
+ owner));
+ }
+ }
+ return owner;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public IUser basicGetOwner() {
+ return owner;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setOwner(IUser newOwner) {
+ IUser oldOwner = owner;
+ owner = newOwner;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW__OWNER, oldOwner, owner));
+ }
+
/**
*
*
@@ -346,8 +487,10 @@ public class Review extends ReviewComponent implements IReview {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ReviewsPackage.REVIEW__TOPICS:
- return getTopics();
+ case ReviewsPackage.REVIEW__CREATION_DATE:
+ return getCreationDate();
+ case ReviewsPackage.REVIEW__MODIFICATION_DATE:
+ return getModificationDate();
case ReviewsPackage.REVIEW__ITEMS:
return getItems();
case ReviewsPackage.REVIEW__REVIEW_TASK:
@@ -360,6 +503,10 @@ public class Review extends ReviewComponent implements IReview {
return basicGetState();
case ReviewsPackage.REVIEW__ID:
return getId();
+ case ReviewsPackage.REVIEW__OWNER:
+ if (resolve)
+ return getOwner();
+ return basicGetOwner();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -373,9 +520,11 @@ public class Review extends ReviewComponent implements IReview {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ReviewsPackage.REVIEW__TOPICS:
- getTopics().clear();
- getTopics().addAll((Collection extends ITopic>) newValue);
+ case ReviewsPackage.REVIEW__CREATION_DATE:
+ setCreationDate((Date) newValue);
+ return;
+ case ReviewsPackage.REVIEW__MODIFICATION_DATE:
+ setModificationDate((Date) newValue);
return;
case ReviewsPackage.REVIEW__ITEMS:
getItems().clear();
@@ -390,6 +539,9 @@ public class Review extends ReviewComponent implements IReview {
case ReviewsPackage.REVIEW__ID:
setId((String) newValue);
return;
+ case ReviewsPackage.REVIEW__OWNER:
+ setOwner((IUser) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -402,8 +554,11 @@ public class Review extends ReviewComponent implements IReview {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ReviewsPackage.REVIEW__TOPICS:
- getTopics().clear();
+ case ReviewsPackage.REVIEW__CREATION_DATE:
+ setCreationDate(CREATION_DATE_EDEFAULT);
+ return;
+ case ReviewsPackage.REVIEW__MODIFICATION_DATE:
+ setModificationDate(MODIFICATION_DATE_EDEFAULT);
return;
case ReviewsPackage.REVIEW__ITEMS:
getItems().clear();
@@ -417,6 +572,9 @@ public class Review extends ReviewComponent implements IReview {
case ReviewsPackage.REVIEW__ID:
setId(ID_EDEFAULT);
return;
+ case ReviewsPackage.REVIEW__OWNER:
+ setOwner((IUser) null);
+ return;
}
super.eUnset(featureID);
}
@@ -429,8 +587,12 @@ public class Review extends ReviewComponent implements IReview {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ReviewsPackage.REVIEW__TOPICS:
- return topics != null && !topics.isEmpty();
+ case ReviewsPackage.REVIEW__CREATION_DATE:
+ return CREATION_DATE_EDEFAULT == null ? creationDate != null : !CREATION_DATE_EDEFAULT.equals(creationDate);
+ case ReviewsPackage.REVIEW__MODIFICATION_DATE:
+ return MODIFICATION_DATE_EDEFAULT == null
+ ? modificationDate != null
+ : !MODIFICATION_DATE_EDEFAULT.equals(modificationDate);
case ReviewsPackage.REVIEW__ITEMS:
return items != null && !items.isEmpty();
case ReviewsPackage.REVIEW__REVIEW_TASK:
@@ -439,10 +601,52 @@ public class Review extends ReviewComponent implements IReview {
return state != null;
case ReviewsPackage.REVIEW__ID:
return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ case ReviewsPackage.REVIEW__OWNER:
+ return owner != null;
}
return super.eIsSet(featureID);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
+ if (baseClass == IDated.class) {
+ switch (derivedFeatureID) {
+ case ReviewsPackage.REVIEW__CREATION_DATE:
+ return ReviewsPackage.DATED__CREATION_DATE;
+ case ReviewsPackage.REVIEW__MODIFICATION_DATE:
+ return ReviewsPackage.DATED__MODIFICATION_DATE;
+ default:
+ return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
+ if (baseClass == IDated.class) {
+ switch (baseFeatureID) {
+ case ReviewsPackage.DATED__CREATION_DATE:
+ return ReviewsPackage.REVIEW__CREATION_DATE;
+ case ReviewsPackage.DATED__MODIFICATION_DATE:
+ return ReviewsPackage.REVIEW__MODIFICATION_DATE;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
/**
*
*
@@ -454,7 +658,11 @@ public class Review extends ReviewComponent implements IReview {
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (id: "); //$NON-NLS-1$
+ result.append(" (creationDate: "); //$NON-NLS-1$
+ result.append(creationDate);
+ result.append(", modificationDate: "); //$NON-NLS-1$
+ result.append(modificationDate);
+ result.append(", id: "); //$NON-NLS-1$
result.append(id);
result.append(')');
return result.toString();
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 df6935184..426cf90a5 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
@@ -10,18 +10,13 @@
*/
package org.eclipse.mylyn.reviews.internal.core.model;
-import java.util.Collection;
-import java.util.Date;
import java.util.List;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.mylyn.reviews.core.model.IComment;
import org.eclipse.mylyn.reviews.core.model.ILocation;
import org.eclipse.mylyn.reviews.core.model.IReview;
@@ -37,14 +32,13 @@ import org.eclipse.mylyn.reviews.core.model.IUser;
* {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getAddedBy Added By}
* {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getReview Review}
* {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getName Name}
- * {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getTopics Topics}
* {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem#getId Id}
*
*
*
* @generated
*/
-public class ReviewItem extends ReviewComponent implements IReviewItem {
+public class ReviewItem extends TopicContainer implements IReviewItem {
/**
* The cached value of the '{@link #getAddedBy() Added By}' reference.
@@ -85,16 +79,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
*/
protected String name = NAME_EDEFAULT;
- /**
- * The cached value of the '{@link #getTopics() Topics}' reference list.
- *
- * @see #getTopics()
- * @generated
- * @ordered
- */
- protected EList topics;
-
/**
* The default value of the '{@link #getId() Id}' attribute.
*
@@ -132,6 +116,16 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
return ReviewsPackage.Literals.REVIEW_ITEM;
}
+ /**
+ * Unmodifiable and not updated.
+ *
+ * @generated NOT
+ */
+ @Override
+ public List getAllComments() {
+ return new BasicEList(getTopics());
+ }
+
/**
*
*
@@ -232,19 +226,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM__NAME, oldName, name));
}
- /**
- *
- *
- * @generated
- */
- public List getTopics() {
- if (topics == null) {
- topics = new EObjectWithInverseResolvingEList(ITopic.class, this,
- ReviewsPackage.REVIEW_ITEM__TOPICS, ReviewsPackage.TOPIC__ITEM);
- }
- return topics;
- }
-
/**
*
*
@@ -271,56 +252,19 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
*
* @generated NOT
*/
+ @Override
public ITopic createTopicComment(ILocation initalLocation, String commentText) {
- ITopic topic = ReviewsFactory.eINSTANCE.createTopic();
- topic.setDraft(true);
+ ITopic topic = super.createTopicComment(initalLocation, commentText);
IUser user = getAddedBy();
if (user == null) {
user = ReviewsFactory.eINSTANCE.createUser();
user.setDisplayName(""); //$NON-NLS-1$
}
topic.setAuthor(user);
- topic.setDescription(commentText);
- topic.getLocations().add(initalLocation);
-
- IComment comment = ReviewsFactory.eINSTANCE.createComment();
- comment.setDescription(topic.getDescription());
- comment.setAuthor(topic.getAuthor());
- Date created = new Date();
- comment.setCreationDate(created);
- topic.setCreationDate(created);
- topic.getComments().add(comment);
- getTopics().add(topic);
- return topic;
- }
-
- /**
- *
- *
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ReviewsPackage.REVIEW_ITEM__TOPICS:
- return ((InternalEList) (InternalEList>) getTopics()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ReviewsPackage.REVIEW_ITEM__TOPICS:
- return ((InternalEList>) getTopics()).basicRemove(otherEnd, msgs);
+ for (IComment comment : topic.getComments()) {
+ comment.setAuthor(topic.getAuthor());
}
- return super.eInverseRemove(otherEnd, featureID, msgs);
+ return topic;
}
/**
@@ -341,8 +285,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
return basicGetReview();
case ReviewsPackage.REVIEW_ITEM__NAME:
return getName();
- case ReviewsPackage.REVIEW_ITEM__TOPICS:
- return getTopics();
case ReviewsPackage.REVIEW_ITEM__ID:
return getId();
}
@@ -367,10 +309,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
case ReviewsPackage.REVIEW_ITEM__NAME:
setName((String) newValue);
return;
- case ReviewsPackage.REVIEW_ITEM__TOPICS:
- getTopics().clear();
- getTopics().addAll((Collection extends ITopic>) newValue);
- return;
case ReviewsPackage.REVIEW_ITEM__ID:
setId((String) newValue);
return;
@@ -395,9 +333,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
case ReviewsPackage.REVIEW_ITEM__NAME:
setName(NAME_EDEFAULT);
return;
- case ReviewsPackage.REVIEW_ITEM__TOPICS:
- getTopics().clear();
- return;
case ReviewsPackage.REVIEW_ITEM__ID:
setId(ID_EDEFAULT);
return;
@@ -419,8 +354,6 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
return review != null;
case ReviewsPackage.REVIEW_ITEM__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case ReviewsPackage.REVIEW_ITEM__TOPICS:
- return topics != null && !topics.isEmpty();
case ReviewsPackage.REVIEW_ITEM__ID:
return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
}
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 78b2eacab..b04a80a4a 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
@@ -11,19 +11,17 @@
package org.eclipse.mylyn.reviews.internal.core.model;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.mylyn.reviews.core.model.IComment;
+import org.eclipse.mylyn.reviews.core.model.IDated;
import org.eclipse.mylyn.reviews.core.model.IReviewItem;
import org.eclipse.mylyn.reviews.core.model.IReviewItemSet;
@@ -33,6 +31,9 @@ import org.eclipse.mylyn.reviews.core.model.IReviewItemSet;
*
* The following features are implemented:
*
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItemSet#getCreationDate Creation Date}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItemSet#getModificationDate Modification Date
+ * }
* - {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItemSet#getItems Items}
* - {@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItemSet#getRevision Revision}
*
@@ -41,6 +42,46 @@ import org.eclipse.mylyn.reviews.core.model.IReviewItemSet;
* @generated
*/
public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
+ /**
+ * The default value of the '{@link #getCreationDate() Creation Date}' attribute.
+ *
+ *
+ * @see #getCreationDate()
+ * @generated
+ * @ordered
+ */
+ protected static final Date CREATION_DATE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCreationDate() Creation Date}' attribute.
+ *
+ *
+ * @see #getCreationDate()
+ * @generated
+ * @ordered
+ */
+ protected Date creationDate = CREATION_DATE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getModificationDate() Modification Date}' attribute.
+ *
+ * @see #getModificationDate()
+ * @generated
+ * @ordered
+ */
+ protected static final Date MODIFICATION_DATE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getModificationDate() Modification Date}' attribute.
+ *
+ * @see #getModificationDate()
+ * @generated
+ * @ordered
+ */
+ protected Date modificationDate = MODIFICATION_DATE_EDEFAULT;
+
/**
* The cached value of the '{@link #getItems() Items}' reference list.
@@ -90,6 +131,64 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
return ReviewsPackage.Literals.REVIEW_ITEM_SET;
}
+ /**
+ *
+ *
+ * @generated
+ */
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setCreationDate(Date newCreationDate) {
+ Date oldCreationDate = creationDate;
+ creationDate = newCreationDate;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM_SET__CREATION_DATE,
+ oldCreationDate, creationDate));
+ }
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public Date getModificationDate() {
+ return modificationDate;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setModificationDate(Date newModificationDate) {
+ Date oldModificationDate = modificationDate;
+ modificationDate = newModificationDate;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.REVIEW_ITEM_SET__MODIFICATION_DATE,
+ oldModificationDate, modificationDate));
+ }
+ }
+
+ /**
+ *
+ *
+ * @generated NOT
+ */
+ public Date getLastChangeDate() {
+ if (getModificationDate() != null) {
+ return getModificationDate();
+ }
+ return getCreationDate();
+ }
+
/**
*
*
@@ -103,6 +202,20 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
return items;
}
+ /**
+ * Unmodifiable and not updated.
+ *
+ * @generated NOT
+ */
+ @Override
+ public List getAllComments() {
+ BasicEList all = new BasicEList(getTopics());
+ for (IReviewItem item : getItems()) {
+ all.addAll(item.getAllComments());
+ }
+ return all;
+ }
+
/**
*
*
@@ -120,9 +233,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));
+ }
}
/**
@@ -133,6 +247,10 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
+ case ReviewsPackage.REVIEW_ITEM_SET__CREATION_DATE:
+ return getCreationDate();
+ case ReviewsPackage.REVIEW_ITEM_SET__MODIFICATION_DATE:
+ return getModificationDate();
case ReviewsPackage.REVIEW_ITEM_SET__ITEMS:
return getItems();
case ReviewsPackage.REVIEW_ITEM_SET__REVISION:
@@ -150,6 +268,12 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
+ case ReviewsPackage.REVIEW_ITEM_SET__CREATION_DATE:
+ setCreationDate((Date) newValue);
+ return;
+ case ReviewsPackage.REVIEW_ITEM_SET__MODIFICATION_DATE:
+ setModificationDate((Date) newValue);
+ return;
case ReviewsPackage.REVIEW_ITEM_SET__ITEMS:
getItems().clear();
getItems().addAll((Collection extends IReviewItem>) newValue);
@@ -169,6 +293,12 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
@Override
public void eUnset(int featureID) {
switch (featureID) {
+ case ReviewsPackage.REVIEW_ITEM_SET__CREATION_DATE:
+ setCreationDate(CREATION_DATE_EDEFAULT);
+ return;
+ case ReviewsPackage.REVIEW_ITEM_SET__MODIFICATION_DATE:
+ setModificationDate(MODIFICATION_DATE_EDEFAULT);
+ return;
case ReviewsPackage.REVIEW_ITEM_SET__ITEMS:
getItems().clear();
return;
@@ -187,6 +317,12 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
+ case ReviewsPackage.REVIEW_ITEM_SET__CREATION_DATE:
+ return CREATION_DATE_EDEFAULT == null ? creationDate != null : !CREATION_DATE_EDEFAULT.equals(creationDate);
+ case ReviewsPackage.REVIEW_ITEM_SET__MODIFICATION_DATE:
+ return MODIFICATION_DATE_EDEFAULT == null
+ ? modificationDate != null
+ : !MODIFICATION_DATE_EDEFAULT.equals(modificationDate);
case ReviewsPackage.REVIEW_ITEM_SET__ITEMS:
return items != null && !items.isEmpty();
case ReviewsPackage.REVIEW_ITEM_SET__REVISION:
@@ -195,6 +331,46 @@ public class ReviewItemSet extends ReviewItem implements IReviewItemSet {
return super.eIsSet(featureID);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
+ if (baseClass == IDated.class) {
+ switch (derivedFeatureID) {
+ case ReviewsPackage.REVIEW_ITEM_SET__CREATION_DATE:
+ return ReviewsPackage.DATED__CREATION_DATE;
+ case ReviewsPackage.REVIEW_ITEM_SET__MODIFICATION_DATE:
+ return ReviewsPackage.DATED__MODIFICATION_DATE;
+ default:
+ return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
+ if (baseClass == IDated.class) {
+ switch (baseFeatureID) {
+ case ReviewsPackage.DATED__CREATION_DATE:
+ return ReviewsPackage.REVIEW_ITEM_SET__CREATION_DATE;
+ case ReviewsPackage.DATED__MODIFICATION_DATE:
+ return ReviewsPackage.REVIEW_ITEM_SET__MODIFICATION_DATE;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
/**
*
*
@@ -202,11 +378,16 @@ 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(" (revision: "); //$NON-NLS-1$
+ result.append(" (creationDate: "); //$NON-NLS-1$
+ result.append(creationDate);
+ result.append(", modificationDate: "); //$NON-NLS-1$
+ result.append(modificationDate);
+ result.append(", revision: "); //$NON-NLS-1$
result.append(revision);
result.append(')');
return result.toString();
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsAdapterFactory.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsAdapterFactory.java
index 8d08b8b87..4056a8db0 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsAdapterFactory.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsAdapterFactory.java
@@ -70,6 +70,11 @@ public class ReviewsAdapterFactory extends AdapterFactoryImpl {
* @generated
*/
protected ReviewsSwitch modelSwitch = new ReviewsSwitch() {
+ @Override
+ public Adapter caseTopicContainer(ITopicContainer object) {
+ return createTopicContainerAdapter();
+ }
+
@Override
public Adapter caseReview(IReview object) {
return createReviewAdapter();
@@ -155,6 +160,16 @@ public class ReviewsAdapterFactory extends AdapterFactoryImpl {
return createModelVersioningAdapter();
}
+ @Override
+ public Adapter caseIndexed(IIndexed object) {
+ return createIndexedAdapter();
+ }
+
+ @Override
+ public Adapter caseDated(IDated object) {
+ return createDatedAdapter();
+ }
+
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
@@ -174,6 +189,20 @@ public class ReviewsAdapterFactory extends AdapterFactoryImpl {
return modelSwitch.doSwitch((EObject) target);
}
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.reviews.core.model.ITopicContainer
+ * Topic Container}'. This default implementation returns null so that we can
+ * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.mylyn.reviews.core.model.ITopicContainer
+ * @generated
+ */
+ public Adapter createTopicContainerAdapter() {
+ return null;
+ }
+
/**
* Creates a new adapter for an object of class '{@link org.eclipse.mylyn.reviews.core.model.IReview
* Review}'. This default implementation returns null so that we can easily ignore
@@ -408,6 +437,32 @@ public class ReviewsAdapterFactory extends AdapterFactoryImpl {
return null;
}
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.reviews.core.model.IIndexed
+ * Indexed}'. This default implementation returns null so that we can easily ignore
+ * cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.mylyn.reviews.core.model.IIndexed
+ * @generated
+ */
+ public Adapter createIndexedAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.reviews.core.model.IDated Dated}
+ * '. This default implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.mylyn.reviews.core.model.IDated
+ * @generated
+ */
+ public Adapter createDatedAdapter() {
+ return null;
+ }
+
/**
* Creates a new adapter for the default case. This default implementation returns null.
*
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 c3113a20d..3ba8f65c2 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
@@ -21,11 +21,12 @@ import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.mylyn.reviews.core.model.IComment;
import org.eclipse.mylyn.reviews.core.model.ICommentType;
+import org.eclipse.mylyn.reviews.core.model.IDated;
import org.eclipse.mylyn.reviews.core.model.IFileItem;
import org.eclipse.mylyn.reviews.core.model.IFileRevision;
+import org.eclipse.mylyn.reviews.core.model.IIndexed;
import org.eclipse.mylyn.reviews.core.model.ILineLocation;
import org.eclipse.mylyn.reviews.core.model.ILineRange;
-import org.eclipse.mylyn.reviews.core.model.IItem;
import org.eclipse.mylyn.reviews.core.model.ILocation;
import org.eclipse.mylyn.reviews.core.model.IModelVersioning;
import org.eclipse.mylyn.reviews.core.model.IReview;
@@ -37,6 +38,7 @@ import org.eclipse.mylyn.reviews.core.model.IReviewState;
import org.eclipse.mylyn.reviews.core.model.IReviewsFactory;
import org.eclipse.mylyn.reviews.core.model.ITaskReference;
import org.eclipse.mylyn.reviews.core.model.ITopic;
+import org.eclipse.mylyn.reviews.core.model.ITopicContainer;
import org.eclipse.mylyn.reviews.core.model.IUser;
/**
@@ -89,7 +91,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getReviewComponent()
* @generated
*/
- public static final int REVIEW_COMPONENT = 10;
+ public static final int REVIEW_COMPONENT = 11;
/**
* The feature id for the 'Enabled' attribute.
@@ -108,6 +110,59 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final int REVIEW_COMPONENT_FEATURE_COUNT = 1;
+ /**
+ * The meta object id for the '{@link org.eclipse.mylyn.reviews.internal.core.model.TopicContainer
+ * Topic Container}' class.
+ *
+ * @see org.eclipse.mylyn.reviews.internal.core.model.TopicContainer
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getTopicContainer()
+ * @generated
+ */
+ public static final int TOPIC_CONTAINER = 0;
+
+ /**
+ * The feature id for the 'Enabled' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int TOPIC_CONTAINER__ENABLED = REVIEW_COMPONENT__ENABLED;
+
+ /**
+ * The feature id for the 'All Comments' reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int TOPIC_CONTAINER__ALL_COMMENTS = REVIEW_COMPONENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the 'Topics' reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int TOPIC_CONTAINER__TOPICS = REVIEW_COMPONENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the 'Direct Topics' reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int TOPIC_CONTAINER__DIRECT_TOPICS = REVIEW_COMPONENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the 'Topic Container' class.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int TOPIC_CONTAINER_FEATURE_COUNT = REVIEW_COMPONENT_FEATURE_COUNT + 3;
+
/**
* The meta object id for the '{@link org.eclipse.mylyn.reviews.internal.core.model.Review Review}' class.
*
@@ -116,7 +171,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getReview()
* @generated
*/
- public static final int REVIEW = 0;
+ public static final int REVIEW = 1;
/**
* The feature id for the 'Enabled' attribute.
@@ -124,7 +179,16 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW__ENABLED = REVIEW_COMPONENT__ENABLED;
+ public static final int REVIEW__ENABLED = TOPIC_CONTAINER__ENABLED;
+
+ /**
+ * The feature id for the 'All Comments' reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW__ALL_COMMENTS = TOPIC_CONTAINER__ALL_COMMENTS;
/**
* The feature id for the 'Topics' reference list.
@@ -132,7 +196,33 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW__TOPICS = REVIEW_COMPONENT_FEATURE_COUNT + 0;
+ public static final int REVIEW__TOPICS = TOPIC_CONTAINER__TOPICS;
+
+ /**
+ * The feature id for the 'Direct Topics' reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW__DIRECT_TOPICS = TOPIC_CONTAINER__DIRECT_TOPICS;
+
+ /**
+ * The feature id for the 'Creation Date' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW__CREATION_DATE = TOPIC_CONTAINER_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the 'Modification Date' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW__MODIFICATION_DATE = TOPIC_CONTAINER_FEATURE_COUNT + 1;
/**
* The feature id for the 'Items' reference list.
@@ -140,7 +230,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW__ITEMS = REVIEW_COMPONENT_FEATURE_COUNT + 1;
+ public static final int REVIEW__ITEMS = TOPIC_CONTAINER_FEATURE_COUNT + 2;
/**
* The feature id for the 'Review Task' containment reference.
@@ -166,7 +256,15 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW__ID = REVIEW_COMPONENT_FEATURE_COUNT + 4;
+ public static final int REVIEW__ID = TOPIC_CONTAINER_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the 'Owner' reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW__OWNER = TOPIC_CONTAINER_FEATURE_COUNT + 6;
/**
* The number of structural features of the 'Review' class.
@@ -174,7 +272,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW_FEATURE_COUNT = REVIEW_COMPONENT_FEATURE_COUNT + 5;
+ public static final int REVIEW_FEATURE_COUNT = TOPIC_CONTAINER_FEATURE_COUNT + 7;
/**
* The meta object id for the '{@link org.eclipse.mylyn.reviews.internal.core.model.Comment Comment}'
@@ -184,7 +282,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getComment()
* @generated
*/
- public static final int COMMENT = 1;
+ public static final int COMMENT = 2;
/**
* The feature id for the 'Enabled' attribute.
@@ -195,37 +293,54 @@ public class ReviewsPackage extends EPackageImpl {
public static final int COMMENT__ENABLED = REVIEW_COMPONENT__ENABLED;
/**
- * The feature id for the 'Author' reference.
+ * The feature id for the 'Index' attribute.
*
* @generated
* @ordered
*/
- public static final int COMMENT__AUTHOR = REVIEW_COMPONENT_FEATURE_COUNT + 0;
+ public static final int COMMENT__INDEX = REVIEW_COMPONENT_FEATURE_COUNT + 0;
/**
- * The feature id for the 'Type' containment reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int COMMENT__CREATION_DATE = REVIEW_COMPONENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the 'Modification Date' attribute.
*
* @generated
* @ordered
*/
- public static final int COMMENT__TYPE = REVIEW_COMPONENT_FEATURE_COUNT + 1;
+ public static final int COMMENT__MODIFICATION_DATE = REVIEW_COMPONENT_FEATURE_COUNT + 2;
/**
- * The feature id for the 'Description' attribute.
+ * The feature id for the 'Author' reference.
*
* @generated
* @ordered
*/
- public static final int COMMENT__DESCRIPTION = REVIEW_COMPONENT_FEATURE_COUNT + 2;
+ public static final int COMMENT__AUTHOR = REVIEW_COMPONENT_FEATURE_COUNT + 3;
/**
- * The feature id for the 'Creation Date' attribute.
+ * The feature id for the 'Type' containment reference.
*
* @generated
* @ordered
*/
- public static final int COMMENT__CREATION_DATE = REVIEW_COMPONENT_FEATURE_COUNT + 3;
+ public static final int COMMENT__TYPE = REVIEW_COMPONENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the 'Description' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int COMMENT__DESCRIPTION = REVIEW_COMPONENT_FEATURE_COUNT + 5;
/**
* The feature id for the 'Id' attribute.
@@ -233,7 +348,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int COMMENT__ID = REVIEW_COMPONENT_FEATURE_COUNT + 4;
+ public static final int COMMENT__ID = REVIEW_COMPONENT_FEATURE_COUNT + 6;
/**
* The feature id for the 'Replies' containment reference list.
@@ -250,7 +365,15 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int COMMENT__DRAFT = REVIEW_COMPONENT_FEATURE_COUNT + 6;
+ public static final int COMMENT__DRAFT = REVIEW_COMPONENT_FEATURE_COUNT + 8;
+
+ /**
+ * The feature id for the 'Parent Topic' reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int COMMENT__PARENT_TOPIC = REVIEW_COMPONENT_FEATURE_COUNT + 9;
/**
* The number of structural features of the 'Comment' class.
@@ -258,7 +381,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int COMMENT_FEATURE_COUNT = REVIEW_COMPONENT_FEATURE_COUNT + 7;
+ public static final int COMMENT_FEATURE_COUNT = REVIEW_COMPONENT_FEATURE_COUNT + 10;
/**
* The meta object id for the '{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem Review Item}
@@ -268,7 +391,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getReviewItem()
* @generated
*/
- public static final int REVIEW_ITEM = 2;
+ public static final int REVIEW_ITEM = 3;
/**
* The feature id for the 'Enabled' attribute.
@@ -276,39 +399,57 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM__ENABLED = REVIEW_COMPONENT__ENABLED;
+ public static final int REVIEW_ITEM__ENABLED = TOPIC_CONTAINER__ENABLED;
/**
- * The feature id for the 'Added By' reference.
+ * The feature id for the 'All Comments' reference list.
*
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM__ADDED_BY = REVIEW_COMPONENT_FEATURE_COUNT + 0;
+ public static final int REVIEW_ITEM__ALL_COMMENTS = TOPIC_CONTAINER__ALL_COMMENTS;
/**
- * The feature id for the 'Review' reference.
+ * The feature id for the 'Topics' reference list.
*
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM__REVIEW = REVIEW_COMPONENT_FEATURE_COUNT + 1;
+ public static final int REVIEW_ITEM__TOPICS = TOPIC_CONTAINER__TOPICS;
/**
- * The feature id for the 'Name' attribute.
+ * The feature id for the 'Direct Topics' reference list.
*
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM__NAME = REVIEW_COMPONENT_FEATURE_COUNT + 2;
+ public static final int REVIEW_ITEM__DIRECT_TOPICS = TOPIC_CONTAINER__DIRECT_TOPICS;
/**
- * The feature id for the 'Topics' reference list.
+ * The feature id for the 'Added By' reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW_ITEM__ADDED_BY = TOPIC_CONTAINER_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the 'Review' reference.
*
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM__TOPICS = REVIEW_COMPONENT_FEATURE_COUNT + 3;
+ public static final int REVIEW_ITEM__REVIEW = TOPIC_CONTAINER_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the 'Name' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW_ITEM__NAME = TOPIC_CONTAINER_FEATURE_COUNT + 2;
/**
* The feature id for the 'Id' attribute.
@@ -316,7 +457,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM__ID = REVIEW_COMPONENT_FEATURE_COUNT + 4;
+ public static final int REVIEW_ITEM__ID = TOPIC_CONTAINER_FEATURE_COUNT + 3;
/**
* The number of structural features of the 'Review Item' class.
+ *
+ * @see org.eclipse.mylyn.reviews.core.model.IIndexed
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getIndexed()
+ * @generated
+ */
+ public static final int INDEXED = 18;
+
+ /**
+ * The feature id for the 'Index' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int INDEXED__INDEX = 0;
+
+ /**
+ * The number of structural features of the 'Indexed' class.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int INDEXED_FEATURE_COUNT = 1;
/**
* The meta object id for the '{@link org.eclipse.mylyn.reviews.internal.core.model.Location Location}'
@@ -335,7 +502,15 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getLocation()
* @generated
*/
- public static final int LOCATION = 3;
+ public static final int LOCATION = 4;
+
+ /**
+ * The feature id for the 'Index' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int LOCATION__INDEX = INDEXED__INDEX;
/**
* The number of structural features of the 'Location' class.
@@ -343,7 +518,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int LOCATION_FEATURE_COUNT = 0;
+ public static final int LOCATION_FEATURE_COUNT = INDEXED_FEATURE_COUNT + 0;
/**
* The meta object id for the '{@link org.eclipse.mylyn.reviews.internal.core.model.User User}' class.
@@ -395,7 +570,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getTaskReference()
* @generated
*/
- public static final int TASK_REFERENCE = 5;
+ public static final int TASK_REFERENCE = 6;
/**
* The feature id for the 'Enabled' attribute.
@@ -438,7 +613,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getReviewState()
* @generated
*/
- public static final int REVIEW_STATE = 6;
+ public static final int REVIEW_STATE = 7;
/**
* The feature id for the 'Enabled' attribute.
@@ -465,7 +640,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getReviewGroup()
* @generated
*/
- public static final int REVIEW_GROUP = 7;
+ public static final int REVIEW_GROUP = 8;
/**
* The feature id for the 'Enabled' attribute.
@@ -518,7 +693,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getCommentType()
* @generated
*/
- public static final int COMMENT_TYPE = 8;
+ public static final int COMMENT_TYPE = 9;
/**
* The number of structural features of the 'Comment Type' class.
@@ -548,37 +723,54 @@ public class ReviewsPackage extends EPackageImpl {
public static final int TOPIC__ENABLED = COMMENT__ENABLED;
/**
- * The feature id for the 'Author' reference.
+ * The feature id for the 'Index' attribute.
*
* @generated
* @ordered
*/
- public static final int TOPIC__AUTHOR = COMMENT__AUTHOR;
+ public static final int TOPIC__INDEX = COMMENT__INDEX;
/**
- * The feature id for the 'Type' containment reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int TOPIC__CREATION_DATE = COMMENT__CREATION_DATE;
+
+ /**
+ * The feature id for the 'Modification Date' attribute.
*
* @generated
* @ordered
*/
- public static final int TOPIC__TYPE = COMMENT__TYPE;
+ public static final int TOPIC__MODIFICATION_DATE = COMMENT__MODIFICATION_DATE;
/**
- * The feature id for the 'Description' attribute.
+ * The feature id for the 'Author' reference.
*
* @generated
* @ordered
*/
- public static final int TOPIC__DESCRIPTION = COMMENT__DESCRIPTION;
+ public static final int TOPIC__AUTHOR = COMMENT__AUTHOR;
/**
- * The feature id for the 'Creation Date' attribute.
+ * The feature id for the 'Type' containment reference.
*
* @generated
* @ordered
*/
- public static final int TOPIC__CREATION_DATE = COMMENT__CREATION_DATE;
+ public static final int TOPIC__TYPE = COMMENT__TYPE;
+
+ /**
+ * The feature id for the 'Description' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int TOPIC__DESCRIPTION = COMMENT__DESCRIPTION;
/**
* The feature id for the 'Id' attribute.
@@ -605,6 +797,14 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final int TOPIC__DRAFT = COMMENT__DRAFT;
+ /**
+ * The feature id for the 'Parent Topic' reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int TOPIC__PARENT_TOPIC = COMMENT__PARENT_TOPIC;
+
/**
* The feature id for the 'Task' containment reference.
@@ -671,7 +871,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getFileItem()
* @generated
*/
- public static final int FILE_ITEM = 11;
+ public static final int FILE_ITEM = 12;
/**
* The feature id for the 'Enabled' attribute.
@@ -682,36 +882,54 @@ public class ReviewsPackage extends EPackageImpl {
public static final int FILE_ITEM__ENABLED = REVIEW_ITEM__ENABLED;
/**
- * The feature id for the 'Added By' reference.
+ * The feature id for the 'All Comments' reference list.
*
* @generated
* @ordered
*/
- public static final int FILE_ITEM__ADDED_BY = REVIEW_ITEM__ADDED_BY;
+ public static final int FILE_ITEM__ALL_COMMENTS = REVIEW_ITEM__ALL_COMMENTS;
/**
- * The feature id for the 'Review' reference.
+ * The feature id for the 'Topics' reference list.
*
* @generated
* @ordered
*/
- public static final int FILE_ITEM__REVIEW = REVIEW_ITEM__REVIEW;
+ public static final int FILE_ITEM__TOPICS = REVIEW_ITEM__TOPICS;
/**
- * The feature id for the 'Name' attribute.
+ * The feature id for the 'Direct Topics' reference list.
*
* @generated
* @ordered
*/
- public static final int FILE_ITEM__NAME = REVIEW_ITEM__NAME;
+ public static final int FILE_ITEM__DIRECT_TOPICS = REVIEW_ITEM__DIRECT_TOPICS;
/**
- * The feature id for the 'Topics' reference list.
+ * The feature id for the 'Added By' reference.
*
* @generated
* @ordered
*/
- public static final int FILE_ITEM__TOPICS = REVIEW_ITEM__TOPICS;
+ public static final int FILE_ITEM__ADDED_BY = REVIEW_ITEM__ADDED_BY;
+
+ /**
+ * The feature id for the 'Review' reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int FILE_ITEM__REVIEW = REVIEW_ITEM__REVIEW;
+
+ /**
+ * The feature id for the 'Name' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int FILE_ITEM__NAME = REVIEW_ITEM__NAME;
/**
* The feature id for the 'Id' attribute.
@@ -754,7 +972,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getReviewItemSet()
* @generated
*/
- public static final int REVIEW_ITEM_SET = 12;
+ public static final int REVIEW_ITEM_SET = 13;
/**
* The feature id for the 'Enabled' attribute.
@@ -764,6 +982,32 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final int REVIEW_ITEM_SET__ENABLED = REVIEW_ITEM__ENABLED;
+ /**
+ * The feature id for the 'All Comments' reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW_ITEM_SET__ALL_COMMENTS = REVIEW_ITEM__ALL_COMMENTS;
+
+ /**
+ * The feature id for the 'Topics' reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW_ITEM_SET__TOPICS = REVIEW_ITEM__TOPICS;
+
+ /**
+ * The feature id for the 'Direct Topics' reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW_ITEM_SET__DIRECT_TOPICS = REVIEW_ITEM__DIRECT_TOPICS;
+
/**
* The feature id for the 'Added By' reference.
*
@@ -789,20 +1033,29 @@ public class ReviewsPackage extends EPackageImpl {
public static final int REVIEW_ITEM_SET__NAME = REVIEW_ITEM__NAME;
/**
- * The feature id for the 'Topics' reference list.
+ * The feature id for the 'Id' attribute.
*
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM_SET__TOPICS = REVIEW_ITEM__TOPICS;
+ public static final int REVIEW_ITEM_SET__ID = REVIEW_ITEM__ID;
/**
- * The feature id for the 'Id' attribute.
+ * The feature id for the 'Creation Date' attribute.
*
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM_SET__ID = REVIEW_ITEM__ID;
+ public static final int REVIEW_ITEM_SET__CREATION_DATE = REVIEW_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the 'Modification Date' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int REVIEW_ITEM_SET__MODIFICATION_DATE = REVIEW_ITEM_FEATURE_COUNT + 1;
/**
* The feature id for the 'Items' reference list.
@@ -810,7 +1063,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM_SET__ITEMS = REVIEW_ITEM_FEATURE_COUNT + 0;
+ public static final int REVIEW_ITEM_SET__ITEMS = REVIEW_ITEM_FEATURE_COUNT + 2;
/**
* The feature id for the 'Revision' attribute.
@@ -818,7 +1071,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int REVIEW_ITEM_SET__REVISION = REVIEW_ITEM_FEATURE_COUNT + 1;
+ public static final int REVIEW_ITEM_SET__REVISION = REVIEW_ITEM_FEATURE_COUNT + 3;
/**
* The number of structural features of the 'Review Item Set' class.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int LINE_LOCATION__INDEX = LOCATION__INDEX;
/**
* The feature id for the 'Ranges' containment reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int LINE_LOCATION__RANGE_MIN = LOCATION_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the 'Range Max' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int LINE_LOCATION__RANGE_MAX = LOCATION_FEATURE_COUNT + 2;
+
/**
* The number of structural features of the 'Line Location' class.
@@ -855,7 +1132,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int LINE_LOCATION_FEATURE_COUNT = LOCATION_FEATURE_COUNT + 1;
+ public static final int LINE_LOCATION_FEATURE_COUNT = LOCATION_FEATURE_COUNT + 3;
/**
* The meta object id for the '{@link org.eclipse.mylyn.reviews.internal.core.model.LineRange Line Range}'
@@ -865,7 +1142,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getLineRange()
* @generated
*/
- public static final int LINE_RANGE = 14;
+ public static final int LINE_RANGE = 15;
/**
* The feature id for the 'Start' attribute.
@@ -900,7 +1177,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getFileRevision()
* @generated
*/
- public static final int FILE_REVISION = 15;
+ public static final int FILE_REVISION = 16;
/**
* The feature id for the 'Enabled' attribute.
@@ -911,36 +1188,54 @@ public class ReviewsPackage extends EPackageImpl {
public static final int FILE_REVISION__ENABLED = REVIEW_ITEM__ENABLED;
/**
- * The feature id for the 'Added By' reference.
+ * The feature id for the 'All Comments' reference list.
*
* @generated
* @ordered
*/
- public static final int FILE_REVISION__ADDED_BY = REVIEW_ITEM__ADDED_BY;
+ public static final int FILE_REVISION__ALL_COMMENTS = REVIEW_ITEM__ALL_COMMENTS;
/**
- * The feature id for the 'Review' reference.
+ * The feature id for the 'Topics' reference list.
*
* @generated
* @ordered
*/
- public static final int FILE_REVISION__REVIEW = REVIEW_ITEM__REVIEW;
+ public static final int FILE_REVISION__TOPICS = REVIEW_ITEM__TOPICS;
/**
- * The feature id for the 'Name' attribute.
+ * The feature id for the 'Direct Topics' reference list.
*
* @generated
* @ordered
*/
- public static final int FILE_REVISION__NAME = REVIEW_ITEM__NAME;
+ public static final int FILE_REVISION__DIRECT_TOPICS = REVIEW_ITEM__DIRECT_TOPICS;
/**
- * The feature id for the 'Topics' reference list.
+ * The feature id for the 'Added By' reference.
*
* @generated
* @ordered
*/
- public static final int FILE_REVISION__TOPICS = REVIEW_ITEM__TOPICS;
+ public static final int FILE_REVISION__ADDED_BY = REVIEW_ITEM__ADDED_BY;
+
+ /**
+ * The feature id for the 'Review' reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int FILE_REVISION__REVIEW = REVIEW_ITEM__REVIEW;
+
+ /**
+ * The feature id for the 'Name' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int FILE_REVISION__NAME = REVIEW_ITEM__NAME;
/**
* The feature id for the 'Id' attribute.
@@ -974,6 +1269,14 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final int FILE_REVISION__CONTENT = REVIEW_ITEM_FEATURE_COUNT + 2;
+ /**
+ * The feature id for the 'File' reference.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int FILE_REVISION__FILE = REVIEW_ITEM_FEATURE_COUNT + 3;
+
/**
* The number of structural features of the 'File Revision' class.
@@ -981,7 +1284,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
* @ordered
*/
- public static final int FILE_REVISION_FEATURE_COUNT = REVIEW_ITEM_FEATURE_COUNT + 3;
+ public static final int FILE_REVISION_FEATURE_COUNT = REVIEW_ITEM_FEATURE_COUNT + 4;
/**
* The meta object id for the '{@link org.eclipse.mylyn.reviews.core.model.IModelVersioning
@@ -991,7 +1294,7 @@ public class ReviewsPackage extends EPackageImpl {
* @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getModelVersioning()
* @generated
*/
- public static final int MODEL_VERSIONING = 16;
+ public static final int MODEL_VERSIONING = 17;
/**
* The feature id for the 'Fragment Version' attribute.
+ *
+ * @see org.eclipse.mylyn.reviews.core.model.IDated
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getDated()
+ * @generated
+ */
+ public static final int DATED = 19;
+
+ /**
+ * The feature id for the 'Creation Date' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DATED__CREATION_DATE = 0;
+
+ /**
+ * The feature id for the 'Modification Date' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DATED__MODIFICATION_DATE = 1;
+
+ /**
+ * The number of structural features of the 'Dated' class.
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DATED_FEATURE_COUNT = 2;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass topicContainerEClass = null;
+
/**
*
*
@@ -1130,6 +1475,20 @@ public class ReviewsPackage extends EPackageImpl {
*/
private EClass modelVersioningEClass = null;
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass indexedEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass datedEClass = null;
+
/**
* Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
* EPackage.Registry} by the package package URI value.
@@ -1191,6 +1550,60 @@ public class ReviewsPackage extends EPackageImpl {
return theReviewsPackage;
}
+ /**
+ * Returns the meta object for class '{@link org.eclipse.mylyn.reviews.core.model.ITopicContainer
+ * Topic Container}'.
+ *
+ * @return the meta object for class 'Topic Container'.
+ * @see org.eclipse.mylyn.reviews.core.model.ITopicContainer
+ * @generated
+ */
+ public EClass getTopicContainer() {
+ return topicContainerEClass;
+ }
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.mylyn.reviews.core.model.ITopicContainer#getAllComments All Comments}'.
+ *
+ * @return the meta object for the reference list 'All Comments'.
+ * @see org.eclipse.mylyn.reviews.core.model.ITopicContainer#getAllComments()
+ * @see #getTopicContainer()
+ * @generated
+ */
+ public EReference getTopicContainer_AllComments() {
+ return (EReference) topicContainerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.mylyn.reviews.core.model.ITopicContainer#getTopics Topics}'.
+ *
+ *
+ * @return the meta object for the reference list 'Topics'.
+ * @see org.eclipse.mylyn.reviews.core.model.ITopicContainer#getTopics()
+ * @see #getTopicContainer()
+ * @generated
+ */
+ public EReference getTopicContainer_Topics() {
+ return (EReference) topicContainerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.mylyn.reviews.core.model.ITopicContainer#getDirectTopics Direct Topics}'.
+ *
+ * @return the meta object for the reference list 'Direct Topics'.
+ * @see org.eclipse.mylyn.reviews.core.model.ITopicContainer#getDirectTopics()
+ * @see #getTopicContainer()
+ * @generated
+ */
+ public EReference getTopicContainer_DirectTopics() {
+ return (EReference) topicContainerEClass.getEStructuralFeatures().get(2);
+ }
+
/**
* Returns the meta object for class '{@link org.eclipse.mylyn.reviews.core.model.IReview Review}'.
@@ -1203,19 +1616,6 @@ public class ReviewsPackage extends EPackageImpl {
return reviewEClass;
}
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.mylyn.reviews.core.model.IReview#getTopics
- * Topics}'.
- *
- * @return the meta object for the reference list 'Topics'.
- * @see org.eclipse.mylyn.reviews.core.model.IReview#getTopics()
- * @see #getReview()
- * @generated
- */
- public EReference getReview_Topics() {
- return (EReference) reviewEClass.getEStructuralFeatures().get(0);
- }
-
/**
* Returns the meta object for the reference list '{@link org.eclipse.mylyn.reviews.core.model.IReview#getItems
* Items}'.
@@ -1226,7 +1626,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public EReference getReview_Items() {
- return (EReference) reviewEClass.getEStructuralFeatures().get(1);
+ return (EReference) reviewEClass.getEStructuralFeatures().get(0);
}
/**
@@ -1240,7 +1640,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public EReference getReview_ReviewTask() {
- return (EReference) reviewEClass.getEStructuralFeatures().get(2);
+ return (EReference) reviewEClass.getEStructuralFeatures().get(1);
}
/**
@@ -1254,7 +1654,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public EReference getReview_State() {
- return (EReference) reviewEClass.getEStructuralFeatures().get(3);
+ return (EReference) reviewEClass.getEStructuralFeatures().get(2);
}
/**
@@ -1267,7 +1667,20 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public EAttribute getReview_Id() {
- return (EAttribute) reviewEClass.getEStructuralFeatures().get(4);
+ return (EAttribute) reviewEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.mylyn.reviews.core.model.IReview#getOwner
+ * Owner}'.
+ *
+ * @return the meta object for the reference 'Owner'.
+ * @see org.eclipse.mylyn.reviews.core.model.IReview#getOwner()
+ * @see #getReview()
+ * @generated
+ */
+ public EReference getReview_Owner() {
+ return (EReference) reviewEClass.getEStructuralFeatures().get(4);
}
/**
@@ -1322,19 +1735,6 @@ public class ReviewsPackage extends EPackageImpl {
return (EAttribute) commentEClass.getEStructuralFeatures().get(2);
}
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.mylyn.reviews.core.model.IComment#getCreationDate
- * Creation Date}'.
- *
- * @return the meta object for the attribute 'Creation Date'.
- * @see org.eclipse.mylyn.reviews.core.model.IComment#getCreationDate()
- * @see #getComment()
- * @generated
- */
- public EAttribute getComment_CreationDate() {
- return (EAttribute) commentEClass.getEStructuralFeatures().get(3);
- }
-
/**
* Returns the meta object for the attribute '{@link org.eclipse.mylyn.reviews.core.model.IComment#getId
* Id}'.
@@ -1345,7 +1745,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public EAttribute getComment_Id() {
- return (EAttribute) commentEClass.getEStructuralFeatures().get(4);
+ return (EAttribute) commentEClass.getEStructuralFeatures().get(3);
}
/**
@@ -1359,7 +1759,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public EReference getComment_Replies() {
- return (EReference) commentEClass.getEStructuralFeatures().get(5);
+ return (EReference) commentEClass.getEStructuralFeatures().get(4);
}
/**
@@ -1372,7 +1772,20 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public EAttribute getComment_Draft() {
- return (EAttribute) commentEClass.getEStructuralFeatures().get(6);
+ return (EAttribute) commentEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.mylyn.reviews.core.model.IComment#getParentTopic
+ * Parent Topic}'.
+ *
+ * @return the meta object for the reference 'Parent Topic'.
+ * @see org.eclipse.mylyn.reviews.core.model.IComment#getParentTopic()
+ * @see #getComment()
+ * @generated
+ */
+ public EReference getComment_ParentTopic() {
+ return (EReference) commentEClass.getEStructuralFeatures().get(6);
}
/**
@@ -1426,20 +1839,6 @@ public class ReviewsPackage extends EPackageImpl {
return (EAttribute) reviewItemEClass.getEStructuralFeatures().get(2);
}
- /**
- * Returns the meta object for the reference list '
- * {@link org.eclipse.mylyn.reviews.core.model.IReviewItem#getTopics Topics}'.
- *
- * @return the meta object for the reference list 'Topics'.
- * @see org.eclipse.mylyn.reviews.core.model.IReviewItem#getTopics()
- * @see #getReviewItem()
- * @generated
- */
- public EReference getReviewItem_Topics() {
- return (EReference) reviewItemEClass.getEStructuralFeatures().get(3);
- }
-
/**
* Returns the meta object for the attribute '{@link org.eclipse.mylyn.reviews.core.model.IReviewItem#getId
* Id}'.
@@ -1450,7 +1849,7 @@ public class ReviewsPackage extends EPackageImpl {
* @generated
*/
public EAttribute getReviewItem_Id() {
- return (EAttribute) reviewItemEClass.getEStructuralFeatures().get(4);
+ return (EAttribute) reviewItemEClass.getEStructuralFeatures().get(3);
}
/**
@@ -1855,6 +2254,32 @@ public class ReviewsPackage extends EPackageImpl {
return (EReference) lineLocationEClass.getEStructuralFeatures().get(0);
}
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.mylyn.reviews.core.model.ILineLocation#getRangeMin
+ * Range Min}'.
+ *
+ * @return the meta object for the attribute 'Range Min'.
+ * @see org.eclipse.mylyn.reviews.core.model.ILineLocation#getRangeMin()
+ * @see #getLineLocation()
+ * @generated
+ */
+ public EAttribute getLineLocation_RangeMin() {
+ return (EAttribute) lineLocationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.mylyn.reviews.core.model.ILineLocation#getRangeMax
+ * Range Max}'.
+ *
+ * @return the meta object for the attribute 'Range Max'.
+ * @see org.eclipse.mylyn.reviews.core.model.ILineLocation#getRangeMax()
+ * @see #getLineLocation()
+ * @generated
+ */
+ public EAttribute getLineLocation_RangeMax() {
+ return (EAttribute) lineLocationEClass.getEStructuralFeatures().get(2);
+ }
+
/**
* Returns the meta object for class '{@link org.eclipse.mylyn.reviews.core.model.ILineRange Line Range}'.
*
@@ -1944,6 +2369,19 @@ public class ReviewsPackage extends EPackageImpl {
return (EAttribute) fileRevisionEClass.getEStructuralFeatures().get(2);
}
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.mylyn.reviews.core.model.IFileRevision#getFile
+ * File}'.
+ *
+ * @return the meta object for the reference 'File'.
+ * @see org.eclipse.mylyn.reviews.core.model.IFileRevision#getFile()
+ * @see #getFileRevision()
+ * @generated
+ */
+ public EReference getFileRevision_File() {
+ return (EReference) fileRevisionEClass.getEStructuralFeatures().get(3);
+ }
+
/**
* Returns the meta object for class '{@link org.eclipse.mylyn.reviews.core.model.IModelVersioning
* Model Versioning}'.
@@ -1970,6 +2408,70 @@ public class ReviewsPackage extends EPackageImpl {
return (EAttribute) modelVersioningEClass.getEStructuralFeatures().get(0);
}
+ /**
+ * Returns the meta object for class '{@link org.eclipse.mylyn.reviews.core.model.IIndexed Indexed}'.
+ *
+ * @return the meta object for class 'Indexed'.
+ * @see org.eclipse.mylyn.reviews.core.model.IIndexed
+ * @generated
+ */
+ public EClass getIndexed() {
+ return indexedEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.mylyn.reviews.core.model.IIndexed#getIndex
+ * Index}'.
+ *
+ * @return the meta object for the attribute 'Index'.
+ * @see org.eclipse.mylyn.reviews.core.model.IIndexed#getIndex()
+ * @see #getIndexed()
+ * @generated
+ */
+ public EAttribute getIndexed_Index() {
+ return (EAttribute) indexedEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.mylyn.reviews.core.model.IDated Dated}'.
+ *
+ * @return the meta object for class 'Dated'.
+ * @see org.eclipse.mylyn.reviews.core.model.IDated
+ * @generated
+ */
+ public EClass getDated() {
+ return datedEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.mylyn.reviews.core.model.IDated#getCreationDate
+ * Creation Date}'.
+ *
+ * @return the meta object for the attribute 'Creation Date'.
+ * @see org.eclipse.mylyn.reviews.core.model.IDated#getCreationDate()
+ * @see #getDated()
+ * @generated
+ */
+ public EAttribute getDated_CreationDate() {
+ return (EAttribute) datedEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.mylyn.reviews.core.model.IDated#getModificationDate Modification Date}'.
+ *
+ * @return the meta object for the attribute 'Modification Date'.
+ * @see org.eclipse.mylyn.reviews.core.model.IDated#getModificationDate()
+ * @see #getDated()
+ * @generated
+ */
+ public EAttribute getDated_ModificationDate() {
+ return (EAttribute) datedEClass.getEStructuralFeatures().get(1);
+ }
+
/**
* Returns the factory that creates the instances of the model.
*
@@ -1999,27 +2501,31 @@ public class ReviewsPackage extends EPackageImpl {
isCreated = true;
// Create classes and their features
+ topicContainerEClass = createEClass(TOPIC_CONTAINER);
+ createEReference(topicContainerEClass, TOPIC_CONTAINER__ALL_COMMENTS);
+ createEReference(topicContainerEClass, TOPIC_CONTAINER__TOPICS);
+ createEReference(topicContainerEClass, TOPIC_CONTAINER__DIRECT_TOPICS);
+
reviewEClass = createEClass(REVIEW);
- createEReference(reviewEClass, REVIEW__TOPICS);
createEReference(reviewEClass, REVIEW__ITEMS);
createEReference(reviewEClass, REVIEW__REVIEW_TASK);
createEReference(reviewEClass, REVIEW__STATE);
createEAttribute(reviewEClass, REVIEW__ID);
+ createEReference(reviewEClass, REVIEW__OWNER);
commentEClass = createEClass(COMMENT);
createEReference(commentEClass, COMMENT__AUTHOR);
createEReference(commentEClass, COMMENT__TYPE);
createEAttribute(commentEClass, COMMENT__DESCRIPTION);
- createEAttribute(commentEClass, COMMENT__CREATION_DATE);
createEAttribute(commentEClass, COMMENT__ID);
createEReference(commentEClass, COMMENT__REPLIES);
createEAttribute(commentEClass, COMMENT__DRAFT);
+ createEReference(commentEClass, COMMENT__PARENT_TOPIC);
reviewItemEClass = createEClass(REVIEW_ITEM);
createEReference(reviewItemEClass, REVIEW_ITEM__ADDED_BY);
createEReference(reviewItemEClass, REVIEW_ITEM__REVIEW);
createEAttribute(reviewItemEClass, REVIEW_ITEM__NAME);
- createEReference(reviewItemEClass, REVIEW_ITEM__TOPICS);
createEAttribute(reviewItemEClass, REVIEW_ITEM__ID);
locationEClass = createEClass(LOCATION);
@@ -2063,6 +2569,8 @@ public class ReviewsPackage extends EPackageImpl {
lineLocationEClass = createEClass(LINE_LOCATION);
createEReference(lineLocationEClass, LINE_LOCATION__RANGES);
+ createEAttribute(lineLocationEClass, LINE_LOCATION__RANGE_MIN);
+ createEAttribute(lineLocationEClass, LINE_LOCATION__RANGE_MAX);
lineRangeEClass = createEClass(LINE_RANGE);
createEAttribute(lineRangeEClass, LINE_RANGE__START);
@@ -2072,9 +2580,17 @@ public class ReviewsPackage extends EPackageImpl {
createEAttribute(fileRevisionEClass, FILE_REVISION__PATH);
createEAttribute(fileRevisionEClass, FILE_REVISION__REVISION);
createEAttribute(fileRevisionEClass, FILE_REVISION__CONTENT);
+ createEReference(fileRevisionEClass, FILE_REVISION__FILE);
modelVersioningEClass = createEClass(MODEL_VERSIONING);
createEAttribute(modelVersioningEClass, MODEL_VERSIONING__FRAGMENT_VERSION);
+
+ indexedEClass = createEClass(INDEXED);
+ createEAttribute(indexedEClass, INDEXED__INDEX);
+
+ datedEClass = createEClass(DATED);
+ createEAttribute(datedEClass, DATED__CREATION_DATE);
+ createEAttribute(datedEClass, DATED__MODIFICATION_DATE);
}
/**
@@ -2105,25 +2621,49 @@ public class ReviewsPackage extends EPackageImpl {
// Set bounds for type parameters
// Add supertypes to classes
- reviewEClass.getESuperTypes().add(this.getReviewComponent());
+ topicContainerEClass.getESuperTypes().add(this.getReviewComponent());
+ reviewEClass.getESuperTypes().add(this.getTopicContainer());
+ reviewEClass.getESuperTypes().add(this.getDated());
commentEClass.getESuperTypes().add(this.getReviewComponent());
- reviewItemEClass.getESuperTypes().add(this.getReviewComponent());
+ commentEClass.getESuperTypes().add(this.getIndexed());
+ commentEClass.getESuperTypes().add(this.getDated());
+ reviewItemEClass.getESuperTypes().add(this.getTopicContainer());
+ locationEClass.getESuperTypes().add(this.getIndexed());
taskReferenceEClass.getESuperTypes().add(this.getReviewComponent());
reviewStateEClass.getESuperTypes().add(this.getReviewComponent());
reviewGroupEClass.getESuperTypes().add(this.getReviewComponent());
topicEClass.getESuperTypes().add(this.getComment());
fileItemEClass.getESuperTypes().add(this.getReviewItem());
reviewItemSetEClass.getESuperTypes().add(this.getReviewItem());
+ reviewItemSetEClass.getESuperTypes().add(this.getDated());
lineLocationEClass.getESuperTypes().add(this.getLocation());
fileRevisionEClass.getESuperTypes().add(this.getReviewItem());
// Initialize classes and features; add operations and parameters
- initEClass(reviewEClass, IReview.class, "Review", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEClass(topicContainerEClass, ITopicContainer.class,
+ "TopicContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(
+ getTopicContainer_AllComments(),
+ this.getComment(),
+ null,
+ "allComments", null, 0, -1, ITopicContainer.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_Topics(),
+ getTopicContainer_Topics(),
this.getTopic(),
null,
- "topics", 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$
+ "topics", null, 0, -1, ITopicContainer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(
+ getTopicContainer_DirectTopics(),
+ this.getTopic(),
+ this.getTopic_Item(),
+ "directTopics", null, 0, -1, ITopicContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ EOperation op = addEOperation(topicContainerEClass, this.getTopic(),
+ "createTopicComment", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getLocation(), "initalLocation", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, ecorePackage.getEString(), "commentText", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(reviewEClass, IReview.class, "Review", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
getReview_Items(),
this.getReviewItem(),
@@ -2143,6 +2683,11 @@ public class ReviewsPackage extends EPackageImpl {
getReview_Id(),
ecorePackage.getEString(),
"id", null, 0, 1, IReview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(
+ getReview_Owner(),
+ this.getUser(),
+ null,
+ "owner", 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$
initEClass(commentEClass, IComment.class, "Comment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
@@ -2159,10 +2704,6 @@ public class ReviewsPackage extends EPackageImpl {
getComment_Description(),
ecorePackage.getEString(),
"description", null, 0, 1, IComment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getComment_CreationDate(),
- ecorePackage.getEDate(),
- "creationDate", null, 0, 1, IComment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getComment_Id(),
ecorePackage.getEString(),
@@ -2176,6 +2717,11 @@ public class ReviewsPackage extends EPackageImpl {
getComment_Draft(),
ecorePackage.getEBoolean(),
"draft", null, 0, 1, IComment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(
+ getComment_ParentTopic(),
+ this.getTopic(),
+ this.getTopic_Comments(),
+ "parentTopic", 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$
initEClass(reviewItemEClass, IReviewItem.class,
"ReviewItem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
@@ -2193,21 +2739,11 @@ public class ReviewsPackage extends EPackageImpl {
getReviewItem_Name(),
ecorePackage.getEString(),
"name", null, 0, 1, IReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getReviewItem_Topics(),
- this.getTopic(),
- this.getTopic_Item(),
- "topics", null, 0, -1, IReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getReviewItem_Id(),
ecorePackage.getEString(),
"id", null, 0, 1, IReviewItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- EOperation op = addEOperation(reviewItemEClass, this.getTopic(),
- "createTopicComment", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- addEParameter(op, this.getLocation(), "initalLocation", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- addEParameter(op, ecorePackage.getEString(), "commentText", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
initEClass(locationEClass, ILocation.class, "Location", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEClass(userEClass, IUser.class, "User", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
@@ -2272,7 +2808,7 @@ public class ReviewsPackage extends EPackageImpl {
initEReference(
getTopic_Comments(),
this.getComment(),
- null,
+ this.getComment_ParentTopic(),
"comments", 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_Review(),
@@ -2285,8 +2821,8 @@ public class ReviewsPackage extends EPackageImpl {
"title", null, 0, 1, ITopic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getTopic_Item(),
- this.getReviewItem(),
- this.getReviewItem_Topics(),
+ this.getTopicContainer(),
+ this.getTopicContainer_DirectTopics(),
"item", 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$
initEClass(reviewComponentEClass, IReviewComponent.class,
@@ -2328,6 +2864,14 @@ public class ReviewsPackage extends EPackageImpl {
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$
+ initEAttribute(
+ getLineLocation_RangeMin(),
+ ecorePackage.getEInt(),
+ "rangeMin", null, 1, 1, ILineLocation.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(
+ getLineLocation_RangeMax(),
+ ecorePackage.getEInt(),
+ "rangeMax", null, 1, 1, ILineLocation.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, 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$
@@ -2354,6 +2898,11 @@ public class ReviewsPackage extends EPackageImpl {
getFileRevision_Content(),
ecorePackage.getEString(),
"content", null, 0, 1, IFileRevision.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(
+ getFileRevision_File(),
+ this.getFileItem(),
+ null,
+ "file", null, 0, 1, IFileRevision.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(modelVersioningEClass, IModelVersioning.class,
"ModelVersioning", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
@@ -2362,6 +2911,22 @@ public class ReviewsPackage extends EPackageImpl {
ecorePackage.getEString(),
"fragmentVersion", "1.0.0", 0, 1, IModelVersioning.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEClass(indexedEClass, IIndexed.class, "Indexed", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(
+ getIndexed_Index(),
+ ecorePackage.getELong(),
+ "index", null, 1, 1, IIndexed.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(datedEClass, IDated.class, "Dated", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(
+ getDated_CreationDate(),
+ ecorePackage.getEDate(),
+ "creationDate", null, 0, 1, IDated.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(
+ getDated_ModificationDate(),
+ ecorePackage.getEDate(),
+ "modificationDate", null, 0, 1, IDated.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
// Create resource
createResource(eNS_URI);
@@ -2398,14 +2963,22 @@ public class ReviewsPackage extends EPackageImpl {
*/
public interface Literals {
/**
- * The meta object literal for the '{@link org.eclipse.mylyn.reviews.internal.core.model.Review Review}
- * ' class.
+ * The meta object literal for the '{@link org.eclipse.mylyn.reviews.internal.core.model.TopicContainer
+ * Topic Container}' class.
*
- * @see org.eclipse.mylyn.reviews.internal.core.model.Review
- * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getReview()
+ * @see org.eclipse.mylyn.reviews.internal.core.model.TopicContainer
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getTopicContainer()
* @generated
*/
- public static final EClass REVIEW = eINSTANCE.getReview();
+ public static final EClass TOPIC_CONTAINER = eINSTANCE.getTopicContainer();
+
+ /**
+ * The meta object literal for the 'All Comments' reference list feature.
+ *
+ * @generated
+ */
+ public static final EReference TOPIC_CONTAINER__ALL_COMMENTS = eINSTANCE.getTopicContainer_AllComments();
/**
* The meta object literal for the 'Topics' reference list feature.
+ *
+ * @generated
+ */
+ public static final EReference TOPIC_CONTAINER__DIRECT_TOPICS = eINSTANCE.getTopicContainer_DirectTopics();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.mylyn.reviews.internal.core.model.Review Review}
+ * ' class.
+ *
+ * @see org.eclipse.mylyn.reviews.internal.core.model.Review
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getReview()
+ * @generated
+ */
+ public static final EClass REVIEW = eINSTANCE.getReview();
/**
* The meta object literal for the 'Items' reference list feature.
+ *
+ * @generated
+ */
+ public static final EReference REVIEW__OWNER = eINSTANCE.getReview_Owner();
+
/**
* The meta object literal for the '{@link org.eclipse.mylyn.reviews.internal.core.model.Comment
* Comment}' class.
@@ -2481,14 +3080,6 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final EAttribute COMMENT__DESCRIPTION = eINSTANCE.getComment_Description();
- /**
- * The meta object literal for the 'Creation Date' attribute feature.
- *
- *
- * @generated
- */
- public static final EAttribute COMMENT__CREATION_DATE = eINSTANCE.getComment_CreationDate();
-
/**
* The meta object literal for the 'Id' attribute feature.
@@ -2513,6 +3104,14 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final EAttribute COMMENT__DRAFT = eINSTANCE.getComment_Draft();
+ /**
+ * The meta object literal for the 'Parent Topic' reference feature.
+ *
+ *
+ * @generated
+ */
+ public static final EReference COMMENT__PARENT_TOPIC = eINSTANCE.getComment_ParentTopic();
+
/**
* The meta object literal for the '{@link org.eclipse.mylyn.reviews.internal.core.model.ReviewItem
* Review Item}' class.
@@ -2547,14 +3146,6 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final EAttribute REVIEW_ITEM__NAME = eINSTANCE.getReviewItem_Name();
- /**
- * The meta object literal for the 'Topics' reference list feature.
- *
- * @generated
- */
- public static final EReference REVIEW_ITEM__TOPICS = eINSTANCE.getReviewItem_Topics();
-
/**
* The meta object literal for the 'Id' attribute feature.
@@ -2833,6 +3424,22 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final EReference LINE_LOCATION__RANGES = eINSTANCE.getLineLocation_Ranges();
+ /**
+ * The meta object literal for the 'Range Min' attribute feature.
+ *
+ * @generated
+ */
+ public static final EAttribute LINE_LOCATION__RANGE_MIN = eINSTANCE.getLineLocation_RangeMin();
+
+ /**
+ * The meta object literal for the 'Range Max' attribute feature.
+ *
+ * @generated
+ */
+ public static final EAttribute LINE_LOCATION__RANGE_MAX = eINSTANCE.getLineLocation_RangeMax();
+
/**
* The meta object literal for the '{@link org.eclipse.mylyn.reviews.internal.core.model.LineRange
* Line Range}' class.
@@ -2893,6 +3500,14 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final EAttribute FILE_REVISION__CONTENT = eINSTANCE.getFileRevision_Content();
+ /**
+ * The meta object literal for the 'File' reference feature.
+ *
+ * @generated
+ */
+ public static final EReference FILE_REVISION__FILE = eINSTANCE.getFileRevision_File();
+
/**
* The meta object literal for the '{@link org.eclipse.mylyn.reviews.core.model.IModelVersioning
* Model Versioning}' class.
@@ -2911,6 +3526,50 @@ public class ReviewsPackage extends EPackageImpl {
*/
public static final EAttribute MODEL_VERSIONING__FRAGMENT_VERSION = eINSTANCE.getModelVersioning_FragmentVersion();
+ /**
+ * The meta object literal for the '{@link org.eclipse.mylyn.reviews.core.model.IIndexed Indexed}'
+ * class.
+ *
+ * @see org.eclipse.mylyn.reviews.core.model.IIndexed
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getIndexed()
+ * @generated
+ */
+ public static final EClass INDEXED = eINSTANCE.getIndexed();
+
+ /**
+ * The meta object literal for the 'Index' attribute feature.
+ *
+ * @generated
+ */
+ public static final EAttribute INDEXED__INDEX = eINSTANCE.getIndexed_Index();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.mylyn.reviews.core.model.IDated Dated}' class.
+ *
+ *
+ * @see org.eclipse.mylyn.reviews.core.model.IDated
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage#getDated()
+ * @generated
+ */
+ public static final EClass DATED = eINSTANCE.getDated();
+
+ /**
+ * The meta object literal for the 'Creation Date' attribute feature.
+ *
+ *
+ * @generated
+ */
+ public static final EAttribute DATED__CREATION_DATE = eINSTANCE.getDated_CreationDate();
+
+ /**
+ * The meta object literal for the 'Modification Date' attribute feature.
+ *
+ * @generated
+ */
+ public static final EAttribute DATED__MODIFICATION_DATE = eINSTANCE.getDated_ModificationDate();
+
}
} //ReviewsPackage
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 c0905c3c4..96eb4dee3 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
@@ -81,9 +81,22 @@ public class ReviewsSwitch {
*/
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
+ case ReviewsPackage.TOPIC_CONTAINER: {
+ ITopicContainer topicContainer = (ITopicContainer) theEObject;
+ T result = caseTopicContainer(topicContainer);
+ if (result == null)
+ result = caseReviewComponent(topicContainer);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
case ReviewsPackage.REVIEW: {
IReview review = (IReview) theEObject;
T result = caseReview(review);
+ if (result == null)
+ result = caseTopicContainer(review);
+ if (result == null)
+ result = caseDated(review);
if (result == null)
result = caseReviewComponent(review);
if (result == null)
@@ -95,6 +108,10 @@ public class ReviewsSwitch {
T result = caseComment(comment);
if (result == null)
result = caseReviewComponent(comment);
+ if (result == null)
+ result = caseIndexed(comment);
+ if (result == null)
+ result = caseDated(comment);
if (result == null)
result = defaultCase(theEObject);
return result;
@@ -102,6 +119,8 @@ public class ReviewsSwitch {
case ReviewsPackage.REVIEW_ITEM: {
IReviewItem reviewItem = (IReviewItem) theEObject;
T result = caseReviewItem(reviewItem);
+ if (result == null)
+ result = caseTopicContainer(reviewItem);
if (result == null)
result = caseReviewComponent(reviewItem);
if (result == null)
@@ -111,6 +130,8 @@ public class ReviewsSwitch {
case ReviewsPackage.LOCATION: {
ILocation location = (ILocation) theEObject;
T result = caseLocation(location);
+ if (result == null)
+ result = caseIndexed(location);
if (result == null)
result = defaultCase(theEObject);
return result;
@@ -163,6 +184,10 @@ public class ReviewsSwitch {
result = caseComment(topic);
if (result == null)
result = caseReviewComponent(topic);
+ if (result == null)
+ result = caseIndexed(topic);
+ if (result == null)
+ result = caseDated(topic);
if (result == null)
result = defaultCase(theEObject);
return result;
@@ -179,6 +204,8 @@ public class ReviewsSwitch {
T result = caseFileItem(fileItem);
if (result == null)
result = caseReviewItem(fileItem);
+ if (result == null)
+ result = caseTopicContainer(fileItem);
if (result == null)
result = caseReviewComponent(fileItem);
if (result == null)
@@ -190,6 +217,10 @@ public class ReviewsSwitch {
T result = caseReviewItemSet(reviewItemSet);
if (result == null)
result = caseReviewItem(reviewItemSet);
+ if (result == null)
+ result = caseDated(reviewItemSet);
+ if (result == null)
+ result = caseTopicContainer(reviewItemSet);
if (result == null)
result = caseReviewComponent(reviewItemSet);
if (result == null)
@@ -201,6 +232,8 @@ public class ReviewsSwitch {
T result = caseLineLocation(lineLocation);
if (result == null)
result = caseLocation(lineLocation);
+ if (result == null)
+ result = caseIndexed(lineLocation);
if (result == null)
result = defaultCase(theEObject);
return result;
@@ -217,6 +250,8 @@ public class ReviewsSwitch {
T result = caseFileRevision(fileRevision);
if (result == null)
result = caseReviewItem(fileRevision);
+ if (result == null)
+ result = caseTopicContainer(fileRevision);
if (result == null)
result = caseReviewComponent(fileRevision);
if (result == null)
@@ -230,11 +265,40 @@ public class ReviewsSwitch {
result = defaultCase(theEObject);
return result;
}
+ case ReviewsPackage.INDEXED: {
+ IIndexed indexed = (IIndexed) theEObject;
+ T result = caseIndexed(indexed);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case ReviewsPackage.DATED: {
+ IDated dated = (IDated) theEObject;
+ T result = caseDated(dated);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
default:
return defaultCase(theEObject);
}
}
+ /**
+ * <<<<<<< Upstream, based on origin/master ======= Returns the result of interpreting the object as an instance of
+ * 'Topic Container'. This implementation returns null; returning a non-null result
+ * will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Topic Container'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTopicContainer(ITopicContainer object) {
+ return null;
+ }
+
/**
* Returns the result of interpreting the object as an instance of 'Review'. This
* implementation returns null; returning a non-null result will terminate the switch.
@@ -477,6 +541,34 @@ public class ReviewsSwitch {
return null;
}
+ /**
+ * Returns the result of interpreting the object as an instance of 'Indexed'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Indexed'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIndexed(IIndexed object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Dated'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Dated'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDated(IDated object) {
+ return null;
+ }
+
/**
* Returns the result of interpreting the object as an instance of 'EObject'. This
* implementation returns null; returning a non-null result will terminate the switch, but this is the last case
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 a0315e2db..d3677a073 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
@@ -25,6 +25,7 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
@@ -34,6 +35,7 @@ import org.eclipse.mylyn.reviews.core.model.IReview;
import org.eclipse.mylyn.reviews.core.model.IReviewItem;
import org.eclipse.mylyn.reviews.core.model.ITaskReference;
import org.eclipse.mylyn.reviews.core.model.ITopic;
+import org.eclipse.mylyn.reviews.core.model.ITopicContainer;
/**
* An implementation of the model object 'Topic'.
@@ -120,7 +122,7 @@ public class Topic extends Comment implements ITopic {
* @generated
* @ordered
*/
- protected IReviewItem item;
+ protected ITopicContainer item;
/**
*
@@ -235,7 +237,8 @@ public class Topic extends Comment implements ITopic {
*/
public List getComments() {
if (comments == null) {
- comments = new EObjectResolvingEList(IComment.class, this, ReviewsPackage.TOPIC__COMMENTS);
+ comments = new EObjectWithInverseResolvingEList(IComment.class, this,
+ ReviewsPackage.TOPIC__COMMENTS, ReviewsPackage.COMMENT__PARENT_TOPIC);
}
return comments;
}
@@ -305,10 +308,10 @@ public class Topic extends Comment implements ITopic {
*
* @generated
*/
- public IReviewItem getItem() {
+ public ITopicContainer getItem() {
if (item != null && item.eIsProxy()) {
InternalEObject oldItem = (InternalEObject) item;
- item = (IReviewItem) eResolveProxy(oldItem);
+ item = (ITopicContainer) eResolveProxy(oldItem);
if (item != oldItem) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.TOPIC__ITEM, oldItem, item));
@@ -322,7 +325,7 @@ public class Topic extends Comment implements ITopic {
*
* @generated
*/
- public IReviewItem basicGetItem() {
+ public ITopicContainer basicGetItem() {
return item;
}
@@ -331,8 +334,8 @@ public class Topic extends Comment implements ITopic {
*
* @generated
*/
- public NotificationChain basicSetItem(IReviewItem newItem, NotificationChain msgs) {
- IReviewItem oldItem = item;
+ public NotificationChain basicSetItem(ITopicContainer newItem, NotificationChain msgs) {
+ ITopicContainer oldItem = item;
item = newItem;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ReviewsPackage.TOPIC__ITEM,
@@ -350,15 +353,15 @@ public class Topic extends Comment implements ITopic {
*
* @generated
*/
- public void setItem(IReviewItem newItem) {
+ public void setItem(ITopicContainer newItem) {
if (newItem != item) {
NotificationChain msgs = null;
if (item != null)
- msgs = ((InternalEObject) item).eInverseRemove(this, ReviewsPackage.REVIEW_ITEM__TOPICS,
- IReviewItem.class, msgs);
+ msgs = ((InternalEObject) item).eInverseRemove(this, ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS,
+ ITopicContainer.class, msgs);
if (newItem != null)
- msgs = ((InternalEObject) newItem).eInverseAdd(this, ReviewsPackage.REVIEW_ITEM__TOPICS,
- IReviewItem.class, msgs);
+ msgs = ((InternalEObject) newItem).eInverseAdd(this, ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS,
+ ITopicContainer.class, msgs);
msgs = basicSetItem(newItem, msgs);
if (msgs != null)
msgs.dispatch();
@@ -366,19 +369,36 @@ public class Topic extends Comment implements ITopic {
eNotify(new ENotificationImpl(this, Notification.SET, ReviewsPackage.TOPIC__ITEM, newItem, newItem));
}
+ /**
+ * Returns 0; base comments aren't ordered.
+ *
+ * @generated NOT
+ */
+ @Override
+ public long getIndex() {
+ long index = Long.MAX_VALUE;
+ for (ILocation location : getLocations()) {
+ index = Math.min(index, location.getIndex());
+ }
+ return index;
+ }
+
/**
*
*
* @generated
*/
+ @SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
+ case ReviewsPackage.TOPIC__COMMENTS:
+ return ((InternalEList) (InternalEList>) getComments()).basicAdd(otherEnd, msgs);
case ReviewsPackage.TOPIC__ITEM:
if (item != null)
- msgs = ((InternalEObject) item).eInverseRemove(this, ReviewsPackage.REVIEW_ITEM__TOPICS,
- IReviewItem.class, msgs);
- return basicSetItem((IReviewItem) otherEnd, msgs);
+ msgs = ((InternalEObject) item).eInverseRemove(this, ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS,
+ ITopicContainer.class, msgs);
+ return basicSetItem((ITopicContainer) otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
@@ -395,6 +415,8 @@ public class Topic extends Comment implements ITopic {
return basicSetTask(null, msgs);
case ReviewsPackage.TOPIC__LOCATIONS:
return ((InternalEList>) getLocations()).basicRemove(otherEnd, msgs);
+ case ReviewsPackage.TOPIC__COMMENTS:
+ return ((InternalEList>) getComments()).basicRemove(otherEnd, msgs);
case ReviewsPackage.TOPIC__ITEM:
return basicSetItem(null, msgs);
}
@@ -458,7 +480,7 @@ public class Topic extends Comment implements ITopic {
setTitle((String) newValue);
return;
case ReviewsPackage.TOPIC__ITEM:
- setItem((IReviewItem) newValue);
+ setItem((ITopicContainer) newValue);
return;
}
super.eSet(featureID, newValue);
@@ -488,7 +510,7 @@ public class Topic extends Comment implements ITopic {
setTitle(TITLE_EDEFAULT);
return;
case ReviewsPackage.TOPIC__ITEM:
- setItem((IReviewItem) null);
+ setItem((ITopicContainer) null);
return;
}
super.eUnset(featureID);
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/TopicContainer.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/TopicContainer.java
new file mode 100644
index 000000000..b86ada349
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/TopicContainer.java
@@ -0,0 +1,245 @@
+/**
+ * Copyright (c) 2011 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ */
+package org.eclipse.mylyn.reviews.internal.core.model;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.mylyn.reviews.core.model.IComment;
+import org.eclipse.mylyn.reviews.core.model.ILocation;
+import org.eclipse.mylyn.reviews.core.model.ITopic;
+import org.eclipse.mylyn.reviews.core.model.ITopicContainer;
+
+/**
+ * An implementation of the model object 'Topic Container'.
+ *
+ * The following features are implemented:
+ *
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.TopicContainer#getAllComments All Comments}
+ * - {@link org.eclipse.mylyn.reviews.internal.core.model.TopicContainer#getTopics Topics}
+ *
+ *
+ *
+ * @generated
+ */
+public abstract class TopicContainer extends ReviewComponent implements ITopicContainer {
+ /**
+ * The cached value of the '{@link #getTopics() Topics}' reference list.
+ *
+ * @see #getTopics()
+ * @generated
+ * @ordered
+ */
+ protected EList topics;
+
+ /**
+ * The cached value of the '{@link #getDirectTopics() Direct Topics}' reference list.
+ *
+ * @see #getDirectTopics()
+ * @generated
+ * @ordered
+ */
+ protected EList directTopics;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected TopicContainer() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ReviewsPackage.Literals.TOPIC_CONTAINER;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public List getAllComments() {
+ // TODO: implement this method to return the 'All Comments' reference list
+ // Ensure that you remove @generated or mark it @generated NOT
+ // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting
+ // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used.
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ *
+ *
+ * @generated NOT
+ */
+ public List getTopics() {
+ return getDirectTopics();
+ }
+
+ /**
+ * See Important note in {@link ITopicContainer#getDirectTopics()}
+ *
+ * @generated
+ */
+ public List getDirectTopics() {
+ if (directTopics == null) {
+ directTopics = new EObjectWithInverseResolvingEList(ITopic.class, this,
+ ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS, ReviewsPackage.TOPIC__ITEM);
+ }
+ return directTopics;
+ }
+
+ /**
+ *
+ *
+ * @generated NOT
+ */
+ public ITopic createTopicComment(ILocation initalLocation, String commentText) {
+ ITopic topic = ReviewsFactory.eINSTANCE.createTopic();
+ topic.setDraft(true);
+ topic.setDescription(commentText);
+ if (initalLocation != null) {
+ topic.getLocations().add(initalLocation);
+ }
+
+ IComment comment = ReviewsFactory.eINSTANCE.createComment();
+ comment.setDescription(topic.getDescription());
+ comment.setDraft(true);
+ Date created = new Date();
+ comment.setCreationDate(created);
+ topic.setCreationDate(created);
+ topic.getComments().add(comment);
+ getTopics().add(topic);
+ return topic;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS:
+ return ((InternalEList) (InternalEList>) getDirectTopics()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS:
+ return ((InternalEList>) getDirectTopics()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ReviewsPackage.TOPIC_CONTAINER__ALL_COMMENTS:
+ return getAllComments();
+ case ReviewsPackage.TOPIC_CONTAINER__TOPICS:
+ return getTopics();
+ case ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS:
+ return getDirectTopics();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ReviewsPackage.TOPIC_CONTAINER__TOPICS:
+ getTopics().clear();
+ getTopics().addAll((Collection extends ITopic>) newValue);
+ return;
+ case ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS:
+ getDirectTopics().clear();
+ getDirectTopics().addAll((Collection extends ITopic>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ReviewsPackage.TOPIC_CONTAINER__TOPICS:
+ getTopics().clear();
+ return;
+ case ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS:
+ getDirectTopics().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ReviewsPackage.TOPIC_CONTAINER__ALL_COMMENTS:
+ return !getAllComments().isEmpty();
+ case ReviewsPackage.TOPIC_CONTAINER__TOPICS:
+ return topics != null && !topics.isEmpty();
+ case ReviewsPackage.TOPIC_CONTAINER__DIRECT_TOPICS:
+ return directTopics != null && !directTopics.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //TopicContainer
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/annotations/ReviewAnnotationModel.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/annotations/ReviewAnnotationModel.java
index aff5484b9..da9c9e835 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/annotations/ReviewAnnotationModel.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/annotations/ReviewAnnotationModel.java
@@ -210,8 +210,8 @@ public class ReviewAnnotationModel implements IAnnotationModel {
if (location instanceof ILineLocation) {
ILineLocation lineLocation = (ILineLocation) location;
try {
- startLine = lineLocation.getTotalMin();
- endLine = lineLocation.getTotalMax();
+ startLine = lineLocation.getRangeMin();
+ endLine = lineLocation.getRangeMax();
int offset = 0;
int length = 0;
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java
index 2ec77011b..6fd70e902 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java
@@ -101,8 +101,8 @@ class ReviewCompareInputListener implements ITextInputListener, IReviewCompareSo
ILocation location = comment.getLocations().get(0);
if (location instanceof ILineLocation) {
ILineLocation lineLocation = (ILineLocation) location;
- startLine = lineLocation.getTotalMin();
- endLine = lineLocation.getTotalMax();
+ startLine = lineLocation.getRangeMin();
+ endLine = lineLocation.getRangeMax();
if (lineNr >= startLine && lineNr <= endLine) {
AnnotationPreference pref = new AnnotationPreferenceLookup().getAnnotationPreference(annotation);
if (pref.getHighlightPreferenceValue()) {
@@ -217,8 +217,8 @@ class ReviewCompareInputListener implements ITextInputListener, IReviewCompareSo
if (range instanceof ILineLocation) {
ILineLocation lineLocation = (ILineLocation) range;
// editors count lines from 0, Crucible counts from 1
- final int startLine = lineLocation.getTotalMin() - 1;
- final int endLine = lineLocation.getTotalMax() - 1;
+ final int startLine = lineLocation.getRangeMin() - 1;
+ final int endLine = lineLocation.getRangeMax() - 1;
if (sourceViewer != null) {
IDocument document = sourceViewer.getDocument();
if (document != null) {
--
cgit v1.2.3