Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2016-07-17 08:14:37 -0400
committerGerrit Code Review @ Eclipse.org2016-09-12 13:45:53 -0400
commit2f9f5e4c06f3684409b01c086dee43ebee9ab723 (patch)
tree9af3f4f173118595bea19b3cfa341a3e20b9cb5f
parent7fc77503de68cb636a3bc4b3b31124e007849c09 (diff)
downloadorg.eclipse.mylyn.tasks-2f9f5e4c06f3684409b01c086dee43ebee9ab723.tar.gz
org.eclipse.mylyn.tasks-2f9f5e4c06f3684409b01c086dee43ebee9ab723.tar.xz
org.eclipse.mylyn.tasks-2f9f5e4c06f3684409b01c086dee43ebee9ab723.zip
478512: Report Bug or Enhancement uses feature versions that may not
match the Bugzilla versions Change-Id: I123b48457faa91d523c856a6c063539047a7c63b Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=478512
-rw-r--r--org.eclipse.mylyn.tasks.bugs/schema/support.exsd7
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java17
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/Messages.java2
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProduct.java10
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProviderManager.java12
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/messages.properties1
6 files changed, 47 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.bugs/schema/support.exsd b/org.eclipse.mylyn.tasks.bugs/schema/support.exsd
index fcfe4401d..a0108dc71 100644
--- a/org.eclipse.mylyn.tasks.bugs/schema/support.exsd
+++ b/org.eclipse.mylyn.tasks.bugs/schema/support.exsd
@@ -187,6 +187,13 @@
</documentation>
</annotation>
</attribute>
+ <attribute name="versionPluginId" type="string">
+ <annotation>
+ <documentation>
+ The id of a bundle that specifies the version information for the product.
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java
index d499dbcaa..4ae998830 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java
@@ -80,13 +80,17 @@ public class DefaultSupportHandler extends AbstractSupportHandler {
}
}
if (response.getProduct() != null) {
- IBundleGroup bundleGroup = ((SupportProduct) response.getProduct()).getBundleGroup();
+ IBundleGroup bundleGroup = ((SupportProduct) response.getProduct()).getVersioningBundleGroup();
+ if (bundleGroup == null) {
+ bundleGroup = ((SupportProduct) response.getProduct()).getBundleGroup();
+ }
if (bundleGroup != null) {
TaskAttribute attribute = taskData.getRoot().getMappedAttribute(TaskAttribute.VERSION);
if (attribute != null) {
final String version = getBestMatch(bundleGroup.getVersion(), attribute.getOptions());
if (version.length() > 0) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryConnector(taskData.getConnectorKind());
+ AbstractRepositoryConnector connector = TasksUi
+ .getRepositoryConnector(taskData.getConnectorKind());
ITaskMapping mapping = connector.getTaskMapping(taskData);
mapping.merge(new TaskMapping() {
@Override
@@ -182,6 +186,15 @@ public class DefaultSupportHandler extends AbstractSupportHandler {
// }
// }
}
+ sb.append(Messages.DefaultSupportHandler_VersioningPlugin);
+ sb.append("\n"); //$NON-NLS-1$
+ IBundleGroup bundleGroup = product.getVersioningBundleGroup();
+ sb.append(" "); //$NON-NLS-1$
+ sb.append(bundleGroup.getIdentifier());
+ sb.append(" "); //$NON-NLS-1$
+ sb.append(bundleGroup.getVersion());
+ sb.append("\n"); //$NON-NLS-1$
+
return sb.toString();
}
} else if (status instanceof ErrorLogStatus) {
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/Messages.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/Messages.java
index 6973e9520..b21699048 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/Messages.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/Messages.java
@@ -45,6 +45,8 @@ public class Messages extends NLS {
public static String DefaultSupportHandler_Step_3;
+ public static String DefaultSupportHandler_VersioningPlugin;
+
public static String DefaultSupportHandler_What_steps_message;
public static String DefaultTaskContributor_Error;
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProduct.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProduct.java
index a92da7541..6715da586 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProduct.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProduct.java
@@ -34,6 +34,8 @@ public class SupportProduct extends AbstractSupportElement implements IProduct {
private IProvider provider;
+ private IBundleGroup versioningBundleGroup;
+
public SupportProduct() {
mappingByNamespace = new TreeMap<String, ProductRepositoryMapping>();
}
@@ -98,6 +100,10 @@ public class SupportProduct extends AbstractSupportElement implements IProduct {
return !mappingByNamespace.isEmpty();
}
+ public IBundleGroup getVersioningBundleGroup() {
+ return versioningBundleGroup;
+ }
+
/**
* @deprecated Use {@link #isInstalled()} instead
*/
@@ -114,6 +120,10 @@ public class SupportProduct extends AbstractSupportElement implements IProduct {
this.bundleGroup = bundleGroup;
}
+ public void setVersioningBundleGroup(IBundleGroup versioningBundleGroup) {
+ this.versioningBundleGroup = versioningBundleGroup;
+ }
+
/**
* @deprecated Use {@link #setInstalled(boolean)} instead
*/
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProviderManager.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProviderManager.java
index 691d1e1dc..4f322d769 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProviderManager.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProviderManager.java
@@ -57,6 +57,8 @@ public class SupportProviderManager {
private static final String ATTRIBUTE_PLUGIN_ID = "pluginId"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_VERSION_PLUGIN_ID = "versionPluginId"; //$NON-NLS-1$
+
private static final String ATTRIBUTE_PRODUCT_ID = "productId"; //$NON-NLS-1$
private static final String ATTRIBUTE_PROVIDER_ID = "providerId"; //$NON-NLS-1$
@@ -211,6 +213,16 @@ public class SupportProviderManager {
}
}
}
+ String versionPluginId = element.getAttribute(ATTRIBUTE_VERSION_PLUGIN_ID);
+ if (versionPluginId != null) {
+ IBundleGroup bundleVersionPlugin = getBundleGroup(versionPluginId);
+ if (bundleVersionPlugin != null) {
+ if (item instanceof SupportProduct) {
+ ((SupportProduct) item).setVersioningBundleGroup(bundleVersionPlugin);
+ }
+ }
+
+ }
if (item.getName() == null) {
item.setName(Messages.SupportProviderManager_Product_Unknown);
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/messages.properties b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/messages.properties
index 7b798dec7..5491d5030 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/messages.properties
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/messages.properties
@@ -18,6 +18,7 @@ DefaultSupportHandler_Severity_X=Severity: {0}
DefaultSupportHandler_Step_1=1. \n
DefaultSupportHandler_Step_2=2. \n
DefaultSupportHandler_Step_3=3. \n
+DefaultSupportHandler_VersioningPlugin=Versioning Plugin:
DefaultSupportHandler_What_steps_message=What steps will reproduce the problem?
DefaultTaskContributor_Error=Error
DefaultTaskContributor_Error_Details=-- Error Details --

Back to the top