Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Fragments And API Extensibility
Fragments And API Extensibility [message #334457] Tue, 10 February 2009 16:19
Bill Winspur is currently offline Bill WinspurFriend
Messages: 180
Registered: July 2009
Senior Member
------ On eclipse, 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


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

Eclipse-ExtensibleAPI: true

------ 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.

--------- 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


============================= 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,
rvice.permissionadmin.PermissionAdmin,org.osgi.service.start level.Sta
Created-By: 1.4.2 (IBM Corporation)
Bundle-Copyright: %copyright
Eclipse-ExtensibleAPI: true
Eclipse-SystemBundle: true
Bundle-Name: %systemBundle
Ant-Version: Apache Ant 1.7.0
Bundle-Description: %systemBundle
Export-Package: org.eclipse.osgi.event;version="1.0",..........


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:Additional Files for Deployed Product
Next Topic:ant editor freezes in 3.4.1 (M20080911-1700)
Goto Forum:

Current Time: Tue May 22 12:14:44 GMT 2018

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

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

Back to the top