[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [equinox-dev] Refresh bundle through code
|
Hello,
I use this code to "refresh" the changes made to the classes of a bundle,
Hope this help:
public static void updateBundle(Bundle bundle){
try {
/* first uninstall the budle */
bundle.uninstall();
/* refresh packages */
ServiceTracker packageAdminTracker = new ServiceTracker(Activator.bundleContext, PackageAdmin.class.getName(), null);
packageAdminTracker.open();
PackageAdmin packageAdmin = (PackageAdmin) packageAdminTracker.getService();
packageAdmin.refreshPackages(new Bundle[]{bundle});
/* install new bundle and start */
Bundle nuevoBundle = Activator.bundleContext.installBundle(getBundleFileForUpdate(bundle).toURL().toString());
nuevoBundle.start();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (BundleException e) {
e.printStackTrace();
}
Adolfo
2009/5/7 Avinash
<avinashmv@xxxxxxxxxx>
Hi all,
Can anyone let me know how to refresh a bundle through code, if i have
reference to bundle. I can see methods update/start/stop, but no direct method
to refresh.
Please help me in this regard, thanks in advance.
V.Avinash Makam
HUAWEI TECHNOLOGIES CO.,LTD.
Address: 2nd floor,
Solitaire
Koramangala Intermediate ring
road,
Bangalore
www.huawei.com
-------------------------------------------------------------------------------------------------------------------------------------
This
e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any
use of the
information contained herein in any way (including, but not
limited to, total or partial
disclosure, reproduction, or dissemination) by
persons other than the intended
recipient(s) is prohibited. If you receive
this e-mail in error, please notify the sender by
phone or email immediately
and delete it!
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev