X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui.workbench%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fworkbench%2Fosgi%2FBundlesView.java;h=68e7d54df2cd65add7ffa72448142dd9021f4368;hb=a0a29f58e12262d6354d2a69e91d63d4a2e7a822;hp=ca32da0d839b99056c2a0ffb092f00ce6292833a;hpb=21a4ea1fb5380ce1dd763c1ea09067cdd2dfd0f3;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/osgi/BundlesView.java b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/osgi/BundlesView.java index ca32da0d8..68e7d54df 100644 --- a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/osgi/BundlesView.java +++ b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/osgi/BundlesView.java @@ -34,6 +34,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; +import org.osgi.framework.Constants; /** * Overview of the bundles as a table. Equivalent to Equinox 'ss' console @@ -107,17 +108,13 @@ public class BundlesView extends ViewPart { private static final long serialVersionUID = 6871926308708629989L; public String getText(Object element) { - - return ""; - // FIXME triggers compilation failure - // return ((Bundle) element).getVersion().toString(); + Bundle bundle = (org.osgi.framework.Bundle) element; + return bundle.getVersion().toString(); } }); new ColumnViewerComparator(column, new Comparator() { public int compare(Bundle o1, Bundle o2) { - return 0; - // FIXME getVersion() triggers compilation failure - // return o1.getVersion().compareTo(o2.getVersion()); + return o1.getVersion().compareTo(o2.getVersion()); } }); @@ -196,10 +193,13 @@ public class BundlesView extends ViewPart { return "RESOLVED"; case Bundle.STARTING: String activationPolicy = bundle.getHeaders() - .get("Bundle-ActivationPolicy").toString(); + .get(Constants.BUNDLE_ACTIVATIONPOLICY).toString(); + + // .get("Bundle-ActivationPolicy").toString(); // FIXME constant triggers the compilation failure - // .get(Constants.BUNDLE_ACTIVATIONPOLICY).toString(); - if (activationPolicy != null && activationPolicy.equals("lazy")) + if (activationPolicy != null + && activationPolicy.equals(Constants.ACTIVATION_LAZY)) + // && activationPolicy.equals("lazy")) // FIXME constant triggers the compilation failure // && activationPolicy.equals(Constants.ACTIVATION_LAZY)) return "<>";