Plug-in Fragment cannot resolve classes from host [message #488656] |
Tue, 29 September 2009 11:48  |
Eclipse User |
|
|
|
Originally posted by: cold.phusion.gmail.com
Hi,
I am new to extending plugins with fragments, so I guess this should be
straight-forward. Imagine the following set-up:
Host: org.eclipse.swt
Fragment: xyz.abc.product
The Fragment's manifest:
=============================
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Extension Fragment
Bundle-SymbolicName: xyz.abc.product
Bundle-Version: 1.5.0
Bundle-Vendor: ABC
Fragment-Host: org.eclipse.swt
All imports from the host plugin are not resolved in the any of the fragment
classes as if the host plugin was not on the classpath...
Is there anything I've forgotten in the manifest / fragment configuration?
Thanks,
Alex
|
|
|
|
|
Re: Plug-in Fragment cannot resolve classes from host [message #490826 is a reply to message #488656] |
Sun, 11 October 2009 11:54   |
Eclipse User |
|
|
|
Originally posted by: cold.phusion.gmail.com
Hi,
@Chris - thank you for replying. Yes, I'm trying to extend the SWT library
(org.eclipse.swt) and yes - its manifest includes "Eclipse-ExtensibleAPI: true".
I'm wondering if this is not actually the correct behavior? That is - if you are
extending a plugin with a fragment, are you allowed to use its classes or not?
@André - no, unfortunately I haven't. I'll post another thread on the equinox
newsgroup, because I need a solution rather urgently. I'll keep you posted.
Cheers,
Alex
Alex Shterev <cold.phusion@gmail.com> wrote:
> Hi,
>
> I am new to extending plugins with fragments, so I guess this should be
> straight-forward. Imagine the following set-up:
>
> Host: org.eclipse.swt
> Fragment: xyz.abc.product
>
> The Fragment's manifest:
> =============================
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Extension Fragment
> Bundle-SymbolicName: xyz.abc.product
> Bundle-Version: 1.5.0
> Bundle-Vendor: ABC
> Fragment-Host: org.eclipse.swt
>
> All imports from the host plugin are not resolved in the any of the fragment
> classes as if the host plugin was not on the classpath...
> Is there anything I've forgotten in the manifest / fragment configuration?
>
>
> Thanks,
> Alex
>
>
|
|
|
|
Re: Plug-in Fragment cannot resolve classes from host [message #496476 is a reply to message #496306] |
Tue, 10 November 2009 04:10  |
Eclipse User |
|
|
|
Andre Kullmann a écrit :
> Hi,
>
> I found me mistake. The host- plugin was not in the feature. After I
> include the plugin in the same feature.xml as the fragment everythink
> works fine.
>
> Cheers,
> André
Thanks a lot Andre. I met a similar issue with automated tests because of org.eclipse.ant.optionla.junit fragmant and stggled for days until I saw you message. Now it's ok thanks to your tip.
IMHO, this should be considered as a bug or a feature request against Equinox, since Equinox users (ie plugin developers) do not expect nor understand such a constraint. Should we file a bug for it?
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
|
|
|
|
Re: Plug-in Fragment cannot resolve classes from host [message #602376 is a reply to message #488656] |
Fri, 09 October 2009 15:04  |
Eclipse User |
|
|
|
Alex Shterev wrote:
> Hi,
>
> I am new to extending plugins with fragments, so I guess this should be
> straight-forward. Imagine the following set-up:
>
> Host: org.eclipse.swt
> Fragment: xyz.abc.product
>
> The Fragment's manifest:
> =============================
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Extension Fragment
> Bundle-SymbolicName: xyz.abc.product
> Bundle-Version: 1.5.0
> Bundle-Vendor: ABC
> Fragment-Host: org.eclipse.swt
>
> All imports from the host plugin are not resolved in the any of the fragment
> classes as if the host plugin was not on the classpath...
> Is there anything I've forgotten in the manifest / fragment configuration?
Are you patching SWT or something else? PDE has two headers to deal with
these type of things:
The Eclipse-ExtensibleAPI is used to specify whether a host bundle
allows fragment bundles to add addtional API to the host. This header
should be used if a host bundle wants to allow fragments to add
additional packages to the API of the host. If this header is not
specified then a default value of 'false' is used. The
Eclipse-ExtensibleAPI header must use the following syntax:
Eclipse-ExtensibleAPI ::= ( 'true' | 'false' )
The following is an example of the Eclipse-ExtensibleAPI header:
Eclipse-ExtensibleAPI: true
--
Eclipse-PatchFragment ::= ( 'true' | 'false' )
https://bugs.eclipse.org/bugs/show_bug.cgi?id=126687
Cheers,
Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
|
|
|
Re: Plug-in Fragment cannot resolve classes from host [message #602401 is a reply to message #488656] |
Sun, 11 October 2009 11:54  |
Eclipse User |
|
|
|
Hi,
@Chris - thank you for replying. Yes, I'm trying to extend the SWT library
(org.eclipse.swt) and yes - its manifest includes "Eclipse-ExtensibleAPI: true".
I'm wondering if this is not actually the correct behavior? That is - if you are
extending a plugin with a fragment, are you allowed to use its classes or not?
@André - no, unfortunately I haven't. I'll post another thread on the equinox
newsgroup, because I need a solution rather urgently. I'll keep you posted.
Cheers,
Alex
Alex Shterev <cold.phusion@gmail.com> wrote:
> Hi,
>
> I am new to extending plugins with fragments, so I guess this should be
> straight-forward. Imagine the following set-up:
>
> Host: org.eclipse.swt
> Fragment: xyz.abc.product
>
> The Fragment's manifest:
> =============================
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Extension Fragment
> Bundle-SymbolicName: xyz.abc.product
> Bundle-Version: 1.5.0
> Bundle-Vendor: ABC
> Fragment-Host: org.eclipse.swt
>
> All imports from the host plugin are not resolved in the any of the fragment
> classes as if the host plugin was not on the classpath...
> Is there anything I've forgotten in the manifest / fragment configuration?
>
>
> Thanks,
> Alex
>
>
|
|
|
|
Re: Plug-in Fragment cannot resolve classes from host [message #603130 is a reply to message #603122] |
Tue, 10 November 2009 04:10  |
Eclipse User |
|
|
|
Andre Kullmann a écrit :
> Hi,
>
> I found me mistake. The host- plugin was not in the feature. After I
> include the plugin in the same feature.xml as the fragment everythink
> works fine.
>
> Cheers,
> André
Thanks a lot Andre. I met a similar issue with automated tests because of org.eclipse.ant.optionla.junit fragmant and stggled for days until I saw you message. Now it's ok thanks to your tip.
IMHO, this should be considered as a bug or a feature request against Equinox, since Equinox users (ie plugin developers) do not expect nor understand such a constraint. Should we file a bug for it?
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
|
|
|
Powered by
FUDForum. Page generated in 0.09151 seconds