diff options
author | Sam Davis | 2015-04-30 18:58:49 +0000 |
---|---|---|
committer | Sam Davis | 2015-04-30 23:37:24 +0000 |
commit | 360d969afea3a96b9ea074eab5f68d2b4aff8ce5 (patch) | |
tree | 3f918b4d709785d8da76322345910314e6a6700d | |
parent | b98f3a9277889cdf5889beec6bade293ce4ae460 (diff) | |
download | org.eclipse.mylyn.reviews-360d969afea3a96b9ea074eab5f68d2b4aff8ce5.tar.gz org.eclipse.mylyn.reviews-360d969afea3a96b9ea074eab5f68d2b4aff8ce5.tar.xz org.eclipse.mylyn.reviews-360d969afea3a96b9ea074eab5f68d2b4aff8ce5.zip |
458662: add supported versions to connector label
Change-Id: Ie18813c38d08afb2ae99b510183b11cf8c374e5e
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458662
3 files changed, 8 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/GerritConnector.java b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/GerritConnector.java index 61597ad43..6d3dfd68c 100644 --- a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/GerritConnector.java +++ b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/GerritConnector.java @@ -37,6 +37,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.mylyn.commons.core.StatusHandler; import org.eclipse.mylyn.commons.net.Policy; import org.eclipse.mylyn.internal.gerrit.core.client.GerritAuthenticationState; +import org.eclipse.mylyn.internal.gerrit.core.client.GerritCapabilities; import org.eclipse.mylyn.internal.gerrit.core.client.GerritClient; import org.eclipse.mylyn.internal.gerrit.core.client.GerritClientStateListener; import org.eclipse.mylyn.internal.gerrit.core.client.GerritConfiguration; @@ -101,11 +102,6 @@ public class GerritConnector extends ReviewsConnector { */ public static final String CONNECTOR_KIND = "org.eclipse.mylyn.gerrit"; //$NON-NLS-1$ - /** - * Label for the connector. - */ - public static final String CONNECTOR_LABEL = "Gerrit Code Review"; //$NON-NLS-1$ - public static final String KEY_REPOSITORY_CONFIG = CONNECTOR_KIND + ".config"; //$NON-NLS-1$ public static final String KEY_REPOSITORY_AUTH = CONNECTOR_KIND + ".auth"; //$NON-NLS-1$ @@ -156,7 +152,8 @@ public class GerritConnector extends ReviewsConnector { @Override public String getLabel() { - return Messages.GerritConnector_Label; + return NLS.bind(Messages.GerritConnector_Label, GerritCapabilities.MINIMUM_SUPPORTED_VERSION, + GerritCapabilities.MAXIMUM_SUPPORTED_VERSION); } @Override diff --git a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritCapabilities.java b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritCapabilities.java index ffb17ab1d..a0328935d 100644 --- a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritCapabilities.java +++ b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritCapabilities.java @@ -18,7 +18,9 @@ import org.osgi.framework.Version; */ public class GerritCapabilities { - private static final Version VERSION_2_12_0 = new Version(2, 12, 0); + public static final Version MINIMUM_SUPPORTED_VERSION = new Version(2, 9, 0); + + public static final Version MAXIMUM_SUPPORTED_VERSION = new Version(2, 11, 0); private final Version version; @@ -30,6 +32,6 @@ public class GerritCapabilities { * Returns true, if this version of Gerrit has been tested with the connector. */ public boolean isSupported() { - return version.compareTo(VERSION_2_12_0) < 0; + return version.compareTo(MINIMUM_SUPPORTED_VERSION) >= 0 && version.compareTo(MAXIMUM_SUPPORTED_VERSION) <= 0; } } diff --git a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/messages.properties b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/messages.properties index 01aeff0c6..a69d4b445 100644 --- a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/messages.properties +++ b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/messages.properties @@ -10,7 +10,7 @@ # Marc-Andre Laperle (Ericsson) - Add topic ############################################################################### GerritConnector_Executing_query=Executing query -GerritConnector_Label=Gerrit Code Review (supports 2.6.1 and later) +GerritConnector_Label=Gerrit Code Review (supports {0} to {1}) GerritQueryResultSchema_Branch=Branch GerritQueryResultSchema_ChangeId=Change-Id GerritQueryResultSchema_Project=Project |