| author | Steffen Pingel | 2012-02-17 18:27:33 (EST) |
|---|---|---|
| committer | Steffen Pingel | 2012-02-17 18:27:33 (EST) |
| commit | 7f053963ca33912045bdd9c15ecd3e76fdba97b8 (patch) (side-by-side diff) | |
| tree | 04cefa86b2655c2a2e72b3e8c5580d7eded7db65 | |
| parent | d8f800e3e7a7f70f7d924886838e9180e1993e78 (diff) | |
| download | org.eclipse.mylyn.commons-7f053963ca33912045bdd9c15ecd3e76fdba97b8.zip org.eclipse.mylyn.commons-7f053963ca33912045bdd9c15ecd3e76fdba97b8.tar.gz org.eclipse.mylyn.commons-7f053963ca33912045bdd9c15ecd3e76fdba97b8.tar.bz2 | |
REOPENED - bug 371771: add sub-project specific branding bundles
https://bugs.eclipse.org/bugs/show_bug.cgi?id=371771
Change-Id: I4ae3362e899de038c7b68c98093f4ea6a221e12e
4 files changed, 15 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java index c3861d9..96c26ec 100644 --- a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java +++ b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java @@ -39,6 +39,8 @@ public class CoreUtil { } } + private static final String FRAMEWORK_VERSION = "3.7.0"; //$NON-NLS-1$ + /** * Returns a string representation of <code>object</code>. If object is a map or array the returned string will * contains a comma separated list of contained elements. @@ -208,4 +210,13 @@ public class CoreUtil { return lastDigit; } + /** + * Returns the running Mylyn version without the qualifier. + * + * @since 3.7 + */ + public static Version getFrameworkVersion() { + return new Version(FRAMEWORK_VERSION); + } + } diff --git a/org.eclipse.mylyn.commons.notifications.core/src/org/eclipse/mylyn/commons/notifications/core/NotificationEnvironment.java b/org.eclipse.mylyn.commons.notifications.core/src/org/eclipse/mylyn/commons/notifications/core/NotificationEnvironment.java index f6b53d3..c16826c 100644 --- a/org.eclipse.mylyn.commons.notifications.core/src/org/eclipse/mylyn/commons/notifications/core/NotificationEnvironment.java +++ b/org.eclipse.mylyn.commons.notifications.core/src/org/eclipse/mylyn/commons/notifications/core/NotificationEnvironment.java @@ -40,12 +40,7 @@ public class NotificationEnvironment { } public Version getFrameworkVersion() { - Bundle bundle = Platform.getBundle("org.eclipse.mylyn"); //$NON-NLS-1$ - if (bundle != null) { - return CoreUtil.getVersion(bundle); - } else { - return Version.emptyVersion; - } + return CoreUtil.getFrameworkVersion(); } public Version getPlatformVersion() { diff --git a/org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF index 7e60383..3107b23 100644 --- a/org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF @@ -6,7 +6,7 @@ Bundle-Version: 0.9.0.qualifier Bundle-Vendor: Eclipse Mylyn Require-Bundle: org.eclipse.core.runtime, org.junit, - org.eclipse.mylyn, + org.eclipse.mylyn.commons.core, org.eclipse.mylyn.commons.sdk.util, org.eclipse.mylyn.commons.notifications.core, org.eclipse.mylyn.commons.notifications.feed diff --git a/org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/core/NotificationEnvironmentTest.java b/org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/core/NotificationEnvironmentTest.java index 3b766d4..088f700 100644 --- a/org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/core/NotificationEnvironmentTest.java +++ b/org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/core/NotificationEnvironmentTest.java @@ -23,6 +23,7 @@ import junit.framework.TestCase; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Platform; +import org.eclipse.mylyn.commons.core.CoreUtil; import org.eclipse.mylyn.commons.notifications.core.IFilterable; import org.eclipse.mylyn.commons.notifications.core.NotificationEnvironment; import org.eclipse.mylyn.internal.commons.notifications.feed.FeedEntry; @@ -106,7 +107,7 @@ public class NotificationEnvironmentTest extends TestCase { assertTrue("Expected value > 3.6, got " + frameworkVersion, new VersionRange("3.6.0").isIncluded(frameworkVersion)); } else { - assertEquals(Version.emptyVersion, frameworkVersion); + assertEquals(CoreUtil.getFrameworkVersion(), frameworkVersion); } } |

