Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Parker2013-04-17 18:59:29 -0400
committerMiles Parker2013-04-17 18:59:29 -0400
commit069c12cecdb57dba205dc570fefd0e564c714e1c (patch)
tree43330729ecf5f60b4fa52a54b400da2b09cf38f5 /org.eclipse.mylyn.reviews.edit
parent323c14495047756a4a9d46986802a8e6195deaca (diff)
downloadorg.eclipse.mylyn.reviews-069c12cecdb57dba205dc570fefd0e564c714e1c.tar.gz
org.eclipse.mylyn.reviews-069c12cecdb57dba205dc570fefd0e564c714e1c.tar.xz
org.eclipse.mylyn.reviews-069c12cecdb57dba205dc570fefd0e564c714e1c.zip
403393: Change Mylyn Reviews IFileRevision element name to IFileVersion
•Change Name of FileRevision to FileVersion •Add FileVersion#fileRevision reference and team.IFileRevision datatype •Add Repository#taskRepositoryUrl and taskConnectorKind attributes •Add Repository#taskRepository reference and mylyn.TaskRepository type •Make FileItem#base and #target containment references Change-Id: I2b8a9bcfc1b231699eb23de9279327836b746dd3 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=403393
Diffstat (limited to 'org.eclipse.mylyn.reviews.edit')
-rw-r--r--org.eclipse.mylyn.reviews.edit/icons/full/ctool16/CreateReviewItemSet_items_FileVersion.gifbin0 -> 223 bytes
-rw-r--r--org.eclipse.mylyn.reviews.edit/icons/full/obj16/FileVersion.gifbin0 -> 129 bytes
-rw-r--r--org.eclipse.mylyn.reviews.edit/plugin.properties9
-rw-r--r--org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/FileVersionItemProvider.java (renamed from org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/FileRevisionItemProvider.java)74
-rw-r--r--org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/RepositoryItemProvider.java60
-rw-r--r--org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewsItemProviderAdapterFactory.java18
6 files changed, 123 insertions, 38 deletions
diff --git a/org.eclipse.mylyn.reviews.edit/icons/full/ctool16/CreateReviewItemSet_items_FileVersion.gif b/org.eclipse.mylyn.reviews.edit/icons/full/ctool16/CreateReviewItemSet_items_FileVersion.gif
new file mode 100644
index 00000000..d9318b15
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.edit/icons/full/ctool16/CreateReviewItemSet_items_FileVersion.gif
Binary files differ
diff --git a/org.eclipse.mylyn.reviews.edit/icons/full/obj16/FileVersion.gif b/org.eclipse.mylyn.reviews.edit/icons/full/obj16/FileVersion.gif
new file mode 100644
index 00000000..c4a8af41
--- /dev/null
+++ b/org.eclipse.mylyn.reviews.edit/icons/full/obj16/FileVersion.gif
Binary files differ
diff --git a/org.eclipse.mylyn.reviews.edit/plugin.properties b/org.eclipse.mylyn.reviews.edit/plugin.properties
index b0136776..801dff83 100644
--- a/org.eclipse.mylyn.reviews.edit/plugin.properties
+++ b/org.eclipse.mylyn.reviews.edit/plugin.properties
@@ -142,3 +142,12 @@ _UI_RequirementStatus_NotSatisfied_literal = NOT_SATISFIED
_UI_RequirementStatus_Rejected_literal = REJECTED
_UI_RequirementStatus_Error_literal = ERROR
_UI_FileItem_set_feature = Set
+_UI_FileVersion_type = File Version
+_UI_Repository_taskRepository_feature = Task Repository
+_UI_FileVersion_path_feature = Path
+_UI_FileVersion_description_feature = Description
+_UI_FileVersion_content_feature = Content
+_UI_FileVersion_file_feature = File
+_UI_FileVersion_fileRevision_feature = File Revision
+_UI_Repository_taskRepositoryUrl_feature = Task Repository Url
+_UI_Repository_taskConnectorKind_feature = Task Connector Kind
diff --git a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/FileRevisionItemProvider.java b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/FileVersionItemProvider.java
index ce78f5dd..119d023e 100644
--- a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/FileRevisionItemProvider.java
+++ b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/FileVersionItemProvider.java
@@ -26,24 +26,24 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.mylyn.reviews.core.model.IFileRevision;
+import org.eclipse.mylyn.reviews.core.model.IFileVersion;
import org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage;
/**
- * This is the item provider adapter for a {@link org.eclipse.mylyn.reviews.core.model.IFileRevision} object. <!--
+ * This is the item provider adapter for a {@link org.eclipse.mylyn.reviews.core.model.IFileVersion} object. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
-public class FileRevisionItemProvider extends ReviewItemItemProvider implements IEditingDomainItemProvider,
+public class FileVersionItemProvider extends ReviewItemItemProvider implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
- public FileRevisionItemProvider(AdapterFactory adapterFactory) {
+ public FileVersionItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -58,9 +58,10 @@ public class FileRevisionItemProvider extends ReviewItemItemProvider implements
super.getPropertyDescriptors(object);
addPathPropertyDescriptor(object);
- addRevisionPropertyDescriptor(object);
+ addDescriptionPropertyDescriptor(object);
addContentPropertyDescriptor(object);
addFilePropertyDescriptor(object);
+ addFileRevisionPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -74,26 +75,25 @@ public class FileRevisionItemProvider extends ReviewItemItemProvider implements
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_FileRevision_path_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_FileRevision_path_feature", "_UI_FileRevision_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ReviewsPackage.Literals.FILE_REVISION__PATH, true, false, false,
+ getString("_UI_FileVersion_path_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_FileVersion_path_feature", "_UI_FileVersion_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ReviewsPackage.Literals.FILE_VERSION__PATH, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
- * This adds a property descriptor for the Revision feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
- protected void addRevisionPropertyDescriptor(Object object) {
+ protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_FileRevision_revision_feature"), //$NON-NLS-1$
+ getString("_UI_FileVersion_description_feature"), //$NON-NLS-1$
getString(
- "_UI_PropertyDescriptor_description", "_UI_FileRevision_revision_feature", "_UI_FileRevision_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ReviewsPackage.Literals.FILE_REVISION__REVISION, true, false, false,
+ "_UI_PropertyDescriptor_description", "_UI_FileVersion_description_feature", "_UI_FileVersion_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ReviewsPackage.Literals.FILE_VERSION__DESCRIPTION, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
@@ -106,10 +106,10 @@ public class FileRevisionItemProvider extends ReviewItemItemProvider implements
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_FileRevision_content_feature"), //$NON-NLS-1$
+ getString("_UI_FileVersion_content_feature"), //$NON-NLS-1$
getString(
- "_UI_PropertyDescriptor_description", "_UI_FileRevision_content_feature", "_UI_FileRevision_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ReviewsPackage.Literals.FILE_REVISION__CONTENT, true, false, false,
+ "_UI_PropertyDescriptor_description", "_UI_FileVersion_content_feature", "_UI_FileVersion_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ReviewsPackage.Literals.FILE_VERSION__CONTENT, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
@@ -122,20 +122,35 @@ public class FileRevisionItemProvider extends ReviewItemItemProvider implements
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_FileRevision_file_feature"), //$NON-NLS-1$
+ getString("_UI_FileVersion_file_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_FileVersion_file_feature", "_UI_FileVersion_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ReviewsPackage.Literals.FILE_VERSION__FILE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the File Revision feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addFileRevisionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_FileVersion_fileRevision_feature"), //$NON-NLS-1$
getString(
- "_UI_PropertyDescriptor_description", "_UI_FileRevision_file_feature", "_UI_FileRevision_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ReviewsPackage.Literals.FILE_REVISION__FILE, true, false, true, null, null, null));
+ "_UI_PropertyDescriptor_description", "_UI_FileVersion_fileRevision_feature", "_UI_FileVersion_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ReviewsPackage.Literals.FILE_VERSION__FILE_REVISION, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
- * This returns FileRevision.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * This returns FileVersion.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/FileRevision")); //$NON-NLS-1$
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/FileVersion")); //$NON-NLS-1$
}
/**
@@ -145,9 +160,9 @@ public class FileRevisionItemProvider extends ReviewItemItemProvider implements
*/
@Override
public String getText(Object object) {
- String label = ((IFileRevision) object).getName();
- return label == null || label.length() == 0 ? getString("_UI_FileRevision_type") : //$NON-NLS-1$
- getString("_UI_FileRevision_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ String label = ((IFileVersion) object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_FileVersion_type") : //$NON-NLS-1$
+ getString("_UI_FileVersion_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -161,10 +176,11 @@ public class FileRevisionItemProvider extends ReviewItemItemProvider implements
public void notifyChanged(Notification notification) {
updateChildren(notification);
- switch (notification.getFeatureID(IFileRevision.class)) {
- case ReviewsPackage.FILE_REVISION__PATH:
- case ReviewsPackage.FILE_REVISION__REVISION:
- case ReviewsPackage.FILE_REVISION__CONTENT:
+ switch (notification.getFeatureID(IFileVersion.class)) {
+ case ReviewsPackage.FILE_VERSION__PATH:
+ case ReviewsPackage.FILE_VERSION__DESCRIPTION:
+ case ReviewsPackage.FILE_VERSION__CONTENT:
+ case ReviewsPackage.FILE_VERSION__FILE_REVISION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
diff --git a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/RepositoryItemProvider.java b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/RepositoryItemProvider.java
index 5299935c..bac4a527 100644
--- a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/RepositoryItemProvider.java
+++ b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/RepositoryItemProvider.java
@@ -18,12 +18,14 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.mylyn.reviews.core.model.IRepository;
@@ -58,11 +60,64 @@ public class RepositoryItemProvider extends ReviewGroupItemProvider implements I
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
+ addTaskRepositoryUrlPropertyDescriptor(object);
+ addTaskConnectorKindPropertyDescriptor(object);
+ addTaskRepositoryPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
+ * This adds a property descriptor for the Task Repository Url feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void addTaskRepositoryUrlPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Repository_taskRepositoryUrl_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Repository_taskRepositoryUrl_feature", "_UI_Repository_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ReviewsPackage.Literals.REPOSITORY__TASK_REPOSITORY_URL, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Task Connector Kind feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void addTaskConnectorKindPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Repository_taskConnectorKind_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Repository_taskConnectorKind_feature", "_UI_Repository_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ReviewsPackage.Literals.REPOSITORY__TASK_CONNECTOR_KIND, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Task Repository feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTaskRepositoryPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Repository_taskRepository_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Repository_taskRepository_feature", "_UI_Repository_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ReviewsPackage.Literals.REPOSITORY__TASK_REPOSITORY, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!--
@@ -126,6 +181,11 @@ public class RepositoryItemProvider extends ReviewGroupItemProvider implements I
updateChildren(notification);
switch (notification.getFeatureID(IRepository.class)) {
+ case ReviewsPackage.REPOSITORY__TASK_REPOSITORY_URL:
+ case ReviewsPackage.REPOSITORY__TASK_CONNECTOR_KIND:
+ case ReviewsPackage.REPOSITORY__TASK_REPOSITORY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
case ReviewsPackage.REPOSITORY__APPROVAL_TYPES:
case ReviewsPackage.REPOSITORY__REVIEW_STATES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
diff --git a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewsItemProviderAdapterFactory.java b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewsItemProviderAdapterFactory.java
index f760e5e1..1a1f10fc 100644
--- a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewsItemProviderAdapterFactory.java
+++ b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewsItemProviderAdapterFactory.java
@@ -378,26 +378,26 @@ public class ReviewsItemProviderAdapterFactory extends ReviewsAdapterFactory imp
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.mylyn.reviews.core.model.IFileRevision}
+ * This keeps track of the one adapter used for all {@link org.eclipse.mylyn.reviews.core.model.IFileVersion}
* instances. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
- protected FileRevisionItemProvider fileRevisionItemProvider;
+ protected FileVersionItemProvider fileVersionItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.mylyn.reviews.core.model.IFileRevision}. <!-- begin-user-doc -->
+ * This creates an adapter for a {@link org.eclipse.mylyn.reviews.core.model.IFileVersion}. <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
- public Adapter createFileRevisionAdapter() {
- if (fileRevisionItemProvider == null) {
- fileRevisionItemProvider = new FileRevisionItemProvider(this);
+ public Adapter createFileVersionAdapter() {
+ if (fileVersionItemProvider == null) {
+ fileVersionItemProvider = new FileVersionItemProvider(this);
}
- return fileRevisionItemProvider;
+ return fileVersionItemProvider;
}
/**
@@ -702,8 +702,8 @@ public class ReviewsItemProviderAdapterFactory extends ReviewsAdapterFactory imp
lineLocationItemProvider.dispose();
if (lineRangeItemProvider != null)
lineRangeItemProvider.dispose();
- if (fileRevisionItemProvider != null)
- fileRevisionItemProvider.dispose();
+ if (fileVersionItemProvider != null)
+ fileVersionItemProvider.dispose();
if (approvalTypeItemProvider != null)
approvalTypeItemProvider.dispose();
if (userApprovalsMapItemProvider != null)

Back to the top