summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2009-01-08 10:33:52 (EST)
committerCarsten Drossel2009-01-08 10:33:52 (EST)
commitb2e273372be1fbf53e66adf78425c0e99601526a (patch)
treeaa24e047cd2aff5e0586f3c471584ca3c2660e18
parentfe0c96f2296562b4a7f4303eeb3eabebdc2bd8de (diff)
downloadorg.eclipse.riena-b2e273372be1fbf53e66adf78425c0e99601526a.zip
org.eclipse.riena-b2e273372be1fbf53e66adf78425c0e99601526a.tar.gz
org.eclipse.riena-b2e273372be1fbf53e66adf78425c0e99601526a.tar.bz2
fixed warnings due to discouraged access of class org.eclipse.ui.internal.util.BundleUtility
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/lnf/LnfManager.java7
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/utils/BundleUtil.java29
2 files changed, 32 insertions, 4 deletions
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/lnf/LnfManager.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/lnf/LnfManager.java
index 870569d..52938f3 100644
--- a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/lnf/LnfManager.java
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/lnf/LnfManager.java
@@ -10,10 +10,9 @@
*******************************************************************************/
package org.eclipse.riena.ui.swt.lnf;
-import org.eclipse.riena.ui.swt.lnf.rienadefault.RienaDefaultLnf;
-
import org.eclipse.core.runtime.Platform;
-import org.eclipse.ui.internal.util.BundleUtility;
+import org.eclipse.riena.ui.swt.lnf.rienadefault.RienaDefaultLnf;
+import org.eclipse.riena.ui.swt.utils.BundleUtil;
import org.osgi.framework.Bundle;
/**
@@ -80,7 +79,7 @@ public final class LnfManager {
String pluginID = parts[0];
String classPath = parts[1];
Bundle bundle = Platform.getBundle(pluginID);
- if (!BundleUtility.isReady(bundle)) {
+ if (!BundleUtil.isReady(bundle)) {
return null;
}
lnfClass = bundle.loadClass(classPath);
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/utils/BundleUtil.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/utils/BundleUtil.java
new file mode 100644
index 0000000..d422d84
--- /dev/null
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/utils/BundleUtil.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG 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:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.ui.swt.utils;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * Helper class with utility method related to bundles.
+ */
+public final class BundleUtil {
+
+ private BundleUtil() {
+ // private constructor of utility class
+ }
+
+ public static boolean isReady(Bundle bundle) {
+ return bundle != null
+ && ((bundle.getState() & (Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING)) != 0);
+ }
+
+}