You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jeff McAffer (JIRA)" <ji...@apache.org> on 2006/09/10 02:48:28 UTC

[jira] Commented: (FELIX-136) Add property to modify development-time bundle class path for Eclipse PDE

    [ http://issues.apache.org/jira/browse/FELIX-136?page=comments#action_12433657 ] 
            
Jeff McAffer commented on FELIX-136:
------------------------------------

It may be helpful to outline briefly what PDE and Equinox do.  Basically when you launch an Equinox framework, PDE looks at the plugins projects involved and generates a set of classpath entry mappings.  This is done by looking at the manifest classpath header and the values in a build.properties file in each project.  These properties basically tell PDE how to map a runtime classpath entry to a dev-time class directory (e.g., bin) in the project.  PDE proceeds to run Equinox in "dev mode" by passing -dev <path to mapping file>.

Equinox then notices that it is in dev mode and loads the mapping file.  Then, whenever a classloader is created fora bundle, the bundle's classpath header is read and the corresponding mappings applied.  The result is a classloader whose classpath includes the dev time class directories.

So we have two options with Felix and KF and ... 
1) suggest that these other framworks follow suit and read the same mapping file and apply it similarly (we can help with the code for that)

2) make PDE extensible so that other framework projects can supply launchers

Actually, there is a third option -- try to standardize a mechanism for launching frameworks that includes dev mode functionality and then implement that in PDE.

On a different topic, I don't think you actualy can ignore the differences in getEntryPaths etc.  We have many cases where bundles access files not as resources but as entries.  As such they do bundle.getEntry("images/icon.gif").  If the images dir is not at the root of what the framework thinks is the bundle, icon.gif will not be found.  To address this there would have be some mechanism for mapping the bundle root location (perhaps to multiple locations)

> Add property to modify development-time bundle class path for Eclipse PDE
> -------------------------------------------------------------------------
>
>                 Key: FELIX-136
>                 URL: http://issues.apache.org/jira/browse/FELIX-136
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>            Reporter: Richard S. Hall
>         Assigned To: Richard S. Hall
>            Priority: Minor
>
> Eclipse PDE uses "framework launchers" for lauching arbitrary OSGi frameworks. Felix in combination with its "reference:" protocol is successfully able to be launched by Eclipse PDE, but it is not ideal since it requires that the project be structured with everything in the root directory. Since projects are typically organized around bin/ and classes/ directories, this is less than perfect.
> Equinox supports a special property to modify the bundle's class path at development time to alleviate this situation. Such a property could also be added to Felix to improve integration with Eclipse PDE.
> For example, DirectoryRevision could be modified to search for a configuration property named ${bundle-symbolic-name}.classpath and could prepend this value to the existing manifest header. To my understanding, this is similar to the approach used by Equinox.
> If we implement this, then we should probably add another property to enable/disable development-time features, so that people cannot use this property unless the framework is being used in development mode.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira