Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Fragments And API Extensibility
Fragments And API Extensibility [message #334457] Tue, 10 February 2009 11:19
Eclipse UserFriend
Intent
------ On eclipse 3.3.1.1, and using a fragment for the first time, I am
trying to extend the API of a previously installed plugin, by installing
a fragment into bundle org.eclipse.osgi, with the intent of adding class

ca.wydv.starter.StarterAccessAdaptor

to the bundle's API. The fragment exports package ca.wydv.starter. It
happens that the plugin manififest of org.eclipse.osgi includes the
declaration:

Eclipse-ExtensibleAPI: true

Problem
------ After directly exporting the fragment into my eclipse
installation's plugins/ directory followed by a reboot of Eclipse,
the java import statement:

import ca.wydv.starter.StarterAccessAdaptor;

in a PDE plugin project(selfhost-button) that uses StarterAccessAdaptor,
is not satisfied by a plugin-dependency on org.eclipse.core.runtime
(which in turn depends on org.eclipse.osgi). It seems that my fragment
has not extended the API of bundle org.eclipse.osgi.

More Info
--------- If I get a clean compile of my selfhost-button plugin (by
connecting its project to the fragment project to satisf the reference
to StarterAccessAdaptor), I am able to directly export selfhost-button
into my eclipse install, When I reboot and test the plugin it bombs
with an unhandled loop exception: NoClassDefFound for class
StarterAccessAdaptor. It seems, that the platform is not loading the
ca.wydv.starter.StarterAccessAdaptor class supposedly contributed by
the fragment.

However, the fragment-plugin jar, has been copied into the eclipse
installation's plugins/ folder, and the fragment shows up in the Plug-ins
and Plugin-registry views.

Questions
--------- I'm short of ideas on what to do next to have my
StarterAccessAdaptor class loaded by the platform.

Where can I look for logging/docs that might relate to the problem?

Thanks for your attention. Relevant manifests and other resources follow

Bill.

============================= Fragment Manifest

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: EclipseStarter Access Adaptor
Bundle-SymbolicName: ca.wydv.starter.access.fragment
Bundle-Version: 1.0.0
Bundle-Vendor: Wynnon Systems Inc.
Fragment-Host: org.eclipse.osgi;bundle-version="3.3.1"
Export-Package: ca.wydv.starter
Bundle-ClassPath: jar/ca.wydv.starter.access.adaptor.jar


============================= Bundle org.eclipse.osgi Manifest

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Export-Service: org.osgi.service.packageadmin.PackageAdmin,org.osgi.se
rvice.permissionadmin.PermissionAdmin,org.osgi.service.start level.Sta
rtLevel,org.eclipse.osgi.service.debug.DebugOptions
Created-By: 1.4.2 (IBM Corporation)
Bundle-Copyright: %copyright
Eclipse-ExtensibleAPI: true
Eclipse-SystemBundle: true
Bundle-Name: %systemBundle
Bundle-Vendor: %eclipse.org
Ant-Version: Apache Ant 1.7.0
Bundle-Description: %systemBundle
Export-Package: org.eclipse.osgi.event;version="1.0",..........

============================= StarterAccessAdaptor.java

package ca.wydv.starter;
import org.osgi.framework.BundleContext;

public class StarterAccessAdaptor{

public static BundleContext startup(String[] args){
try {
BundleContext ctx = org.eclipse.core.runtime.adaptor.EclipseStarter
.startup(args, null);
return ctx;
} catch (Exception e) {
System.out.println("StarterAccessAdaptor.startup() failed due: "+ e);
return null;
}
}
}
=============================
Previous Topic:Ant output as tree?
Next Topic:How to access files within a jar ?
Goto Forum:
  


Current Time: Thu Mar 27 03:16:48 EDT 2025

Powered by FUDForum. Page generated in 0.06323 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top