summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Parker2012-09-28 20:11:56 (EDT)
committer Miles Parker2012-10-16 19:21:01 (EDT)
commite49e514f1c6f42f6aa0dcb8a469a6ce11713383d (patch)
tree1a26d48e4a7be02cfa074bacfaa0502cd452a2c8
parent51f6383cee1c15658b757f31f81b3ce5351ea66d (diff)
downloadorg.eclipse.mylyn.reviews-e49e514f1c6f42f6aa0dcb8a469a6ce11713383d.zip
org.eclipse.mylyn.reviews-e49e514f1c6f42f6aa0dcb8a469a6ce11713383d.tar.gz
org.eclipse.mylyn.reviews-e49e514f1c6f42f6aa0dcb8a469a6ce11713383d.tar.bz2
324327: Interfaces extend EObject, added resource factoryrefs/changes/54/8054/2
Change-Id: Icf4ece153613f9538cc14e07aeb76692eb2df7f6 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=324327
-rw-r--r--org.eclipse.mylyn.reviews.core/model/reviews.genmodel14
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ICommentType.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineRange.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILocation.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewComponent.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IUser.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/FileItem.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewItem.java4
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java26
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java36
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResourceFactory.java60
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsXMLProcessor.java56
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/Topic.java4
13 files changed, 193 insertions, 31 deletions
diff --git a/org.eclipse.mylyn.reviews.core/model/reviews.genmodel b/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
index 23e73b0..a429bcb 100644
--- a/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
+++ b/org.eclipse.mylyn.reviews.core/model/reviews.genmodel
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2011 Tasktop Technologies and others.&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Tasktop Technologies - initial API and implementation"
modelDirectory="/org.eclipse.mylyn.reviews.core/src" editDirectory="/org.eclipse.mylyn.reviews.edit/src"
editorDirectory="/org.eclipse.mylyn.reviews.editor/src" modelPluginID="org.eclipse.mylyn.reviews.core"
- modelName="Reviews" modelPluginClass="" nonNLSMarkers="true" rootExtendsInterface=""
- rootImplementsInterface="" suppressEMFTypes="true" suppressEMFMetaData="true"
- suppressEMFModelTags="true" codeFormatting="true" testsDirectory="/org.eclipse.mylyn.reviews.edit.tests/src"
+ modelName="Reviews" modelPluginClass="" nonNLSMarkers="true" rootImplementsInterface=""
+ suppressEMFTypes="true" suppressEMFMetaData="true" suppressEMFModelTags="true"
+ codeFormatting="true" testsDirectory="/org.eclipse.mylyn.reviews.edit.tests/src"
importerID="org.eclipse.emf.importer.ecore" bundleManifest="false" complianceLevel="5.0"
copyrightFields="false" editPluginID="org.eclipse.mylyn.reviews.edit" editorPluginID="org.eclipse.mylyn.reviews.editor"
testsPluginID="org.eclipse.mylyn.reviews.edit.tests" runtimeVersion="2.5" interfaceNamePattern="I{0}"
classNamePattern="{0}">
<foreignModel>reviews.ecore</foreignModel>
- <genPackages prefix="Reviews" basePackage="org.eclipse.mylyn" disposableProviderFactory="true"
+ <genPackages prefix="Reviews" basePackage="org.eclipse.mylyn" resource="XML" disposableProviderFactory="true"
interfacePackageSuffix="core.model" metaDataPackageSuffix="core.model" classPackageSuffix="internal.core.model"
utilityPackageSuffix="internal.core.model" providerPackageSuffix="ui.model.provider"
presentationPackageSuffix="ui.model.presentations" contentTypeIdentifier=""
@@ -38,10 +37,12 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference reviews.ecore#//ReviewItem/review"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//ReviewItem/name"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference reviews.ecore#//ReviewItem/topics"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//ReviewItem/id"/>
</genClasses>
<genClasses image="false" ecoreClass="reviews.ecore#//Location"/>
<genClasses ecoreClass="reviews.ecore#//User">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//User/id"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//User/email"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//User/displayName"/>
</genClasses>
<genClasses ecoreClass="reviews.ecore#//TaskReference">
@@ -71,7 +72,6 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference reviews.ecore#//FileItem/target"/>
</genClasses>
<genClasses ecoreClass="reviews.ecore#//ReviewItemSet">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//ReviewItemSet/id"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reviews.ecore#//ReviewItemSet/items"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reviews.ecore#//ReviewItemSet/revision"/>
</genClasses>
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ICommentType.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ICommentType.java
index 86cebd7..08a5398 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ICommentType.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ICommentType.java
@@ -10,6 +10,8 @@
*/
package org.eclipse.mylyn.reviews.core.model;
+import org.eclipse.emf.ecore.EObject;
+
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Comment Type</b></em>'.
@@ -18,5 +20,5 @@ package org.eclipse.mylyn.reviews.core.model;
*
* @generated
*/
-public interface ICommentType {
+public interface ICommentType extends EObject {
} // ICommentType
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineRange.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineRange.java
index d7fae9c..d65eea4 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineRange.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/ILineRange.java
@@ -10,6 +10,8 @@
*/
package org.eclipse.mylyn.reviews.core.model;
+import org.eclipse.emf.ecore.EObject;
+
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Line Range</b></em>'.
@@ -25,7 +27,7 @@ package org.eclipse.mylyn.reviews.core.model;
*
* @generated
*/
-public interface ILineRange {
+public interface ILineRange extends EObject {
/**
* Returns the value of the '<em><b>Start</b></em>' attribute.
* <!-- begin-user-doc -->
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 0ce63bc..ed5c282 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,6 +10,8 @@
*/
package org.eclipse.mylyn.reviews.core.model;
+import org.eclipse.emf.ecore.EObject;
+
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Location</b></em>'.
@@ -18,5 +20,5 @@ package org.eclipse.mylyn.reviews.core.model;
*
* @generated
*/
-public interface ILocation {
+public interface ILocation extends EObject {
} // ILocation
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewComponent.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewComponent.java
index 7e82c78..88e50e4 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewComponent.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IReviewComponent.java
@@ -10,6 +10,8 @@
*/
package org.eclipse.mylyn.reviews.core.model;
+import org.eclipse.emf.ecore.EObject;
+
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Review Component</b></em>'.
@@ -24,7 +26,7 @@ package org.eclipse.mylyn.reviews.core.model;
*
* @generated
*/
-public interface IReviewComponent {
+public interface IReviewComponent extends EObject {
/**
* Returns the value of the '<em><b>Enabled</b></em>' attribute.
* The default value is <code>"true"</code>.
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IUser.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IUser.java
index daa577a..e8529c7 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IUser.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/core/model/IUser.java
@@ -10,6 +10,8 @@
*/
package org.eclipse.mylyn.reviews.core.model;
+import org.eclipse.emf.ecore.EObject;
+
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>User</b></em>'.
@@ -26,7 +28,7 @@ package org.eclipse.mylyn.reviews.core.model;
*
* @generated
*/
-public interface IUser {
+public interface IUser extends EObject {
/**
* Returns the value of the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
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 50eb299..afc9313 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
@@ -82,7 +82,7 @@ public class FileItem extends ReviewItem implements IFileItem {
* @generated
*/
public IFileRevision getBase() {
- if (base != null && ((EObject) base).eIsProxy()) {
+ if (base != null && base.eIsProxy()) {
InternalEObject oldBase = (InternalEObject) base;
base = (IFileRevision) eResolveProxy(oldBase);
if (base != oldBase) {
@@ -121,7 +121,7 @@ public class FileItem extends ReviewItem implements IFileItem {
* @generated
*/
public IFileRevision getTarget() {
- if (target != null && ((EObject) target).eIsProxy()) {
+ if (target != null && target.eIsProxy()) {
InternalEObject oldTarget = (InternalEObject) target;
target = (IFileRevision) eResolveProxy(oldTarget);
if (target != oldTarget) {
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 9a3e9a3..802ec23 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
@@ -142,7 +142,7 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
* @generated
*/
public IUser getAddedBy() {
- if (addedBy != null && ((EObject) addedBy).eIsProxy()) {
+ if (addedBy != null && addedBy.eIsProxy()) {
InternalEObject oldAddedBy = (InternalEObject) addedBy;
addedBy = (IUser) eResolveProxy(oldAddedBy);
if (addedBy != oldAddedBy) {
@@ -182,7 +182,7 @@ public class ReviewItem extends ReviewComponent implements IReviewItem {
* @generated
*/
public IReview getReview() {
- if (review != null && ((EObject) review).eIsProxy()) {
+ if (review != null && review.eIsProxy()) {
InternalEObject oldReview = (InternalEObject) review;
review = (IReview) eResolveProxy(oldReview);
if (review != oldReview) {
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java
index 6b7ab2f..ebb7afd 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsFactory.java
@@ -72,31 +72,31 @@ public class ReviewsFactory extends EFactoryImpl implements IReviewsFactory {
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case ReviewsPackage.REVIEW:
- return (EObject) createReview();
+ return createReview();
case ReviewsPackage.COMMENT:
- return (EObject) createComment();
+ return createComment();
case ReviewsPackage.REVIEW_ITEM:
- return (EObject) createReviewItem();
+ return createReviewItem();
case ReviewsPackage.USER:
- return (EObject) createUser();
+ return createUser();
case ReviewsPackage.TASK_REFERENCE:
- return (EObject) createTaskReference();
+ return createTaskReference();
case ReviewsPackage.REVIEW_GROUP:
- return (EObject) createReviewGroup();
+ return createReviewGroup();
case ReviewsPackage.TOPIC:
- return (EObject) createTopic();
+ return createTopic();
case ReviewsPackage.REVIEW_COMPONENT:
- return (EObject) createReviewComponent();
+ return createReviewComponent();
case ReviewsPackage.FILE_ITEM:
- return (EObject) createFileItem();
+ return createFileItem();
case ReviewsPackage.REVIEW_ITEM_SET:
- return (EObject) createReviewItemSet();
+ return createReviewItemSet();
case ReviewsPackage.LINE_LOCATION:
- return (EObject) createLineLocation();
+ return createLineLocation();
case ReviewsPackage.LINE_RANGE:
- return (EObject) createLineRange();
+ return createLineRange();
case ReviewsPackage.FILE_REVISION:
- return (EObject) createFileRevision();
+ return createFileRevision();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java
new file mode 100644
index 0000000..34c7d4a
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResource.java
@@ -0,0 +1,36 @@
+/**
+ * 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 org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsResourceFactory
+ * @generated
+ */
+public class ReviewsResource extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public ReviewsResource(URI uri) {
+ super(uri);
+ }
+
+} //ReviewsResource
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResourceFactory.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResourceFactory.java
new file mode 100644
index 0000000..920d6ef
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsResourceFactory.java
@@ -0,0 +1,60 @@
+/**
+ * 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 org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.mylyn.reviews.internal.core.model.ReviewsResource
+ * @generated
+ */
+public class ReviewsResourceFactory extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReviewsResourceFactory() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new ReviewsResource(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} //ReviewsResourceFactory
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsXMLProcessor.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsXMLProcessor.java
new file mode 100644
index 0000000..fe08ade
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/model/ReviewsXMLProcessor.java
@@ -0,0 +1,56 @@
+/**
+ * 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.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ReviewsXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReviewsXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ ReviewsPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the ReviewsResourceFactory factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new ReviewsResourceFactory());
+ registrations.put(STAR_EXTENSION, new ReviewsResourceFactory());
+ }
+ return registrations;
+ }
+
+} //ReviewsXMLProcessor
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 9715d89..ca80441 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
@@ -222,7 +222,7 @@ public class Topic extends Comment implements ITopic {
* @generated
*/
public IReview getReview() {
- if (review != null && ((EObject) review).eIsProxy()) {
+ if (review != null && review.eIsProxy()) {
InternalEObject oldReview = (InternalEObject) review;
review = (IReview) eResolveProxy(oldReview);
if (review != oldReview) {
@@ -282,7 +282,7 @@ public class Topic extends Comment implements ITopic {
* @generated
*/
public IReviewItem getItem() {
- if (item != null && ((EObject) item).eIsProxy()) {
+ if (item != null && item.eIsProxy()) {
InternalEObject oldItem = (InternalEObject) item;
item = (IReviewItem) eResolveProxy(oldItem);
if (item != oldItem) {