Export problems (fragment related) [message #436716] |
Thu, 15 September 2005 06:13  |
Eclipse User |
|
|
|
Hello,
I have an Eclipse 3.1 RCP product, which I try to export via the
Eclipse product wizard available from my .product file. The product
configuration is managed by plugins (not features).
Everything worked fine, until it was necessary to add a fragment
(whatever.org.eclipse.swt.patch) to the project. Just selecting the "add
required plugins" button on the configuration page added the fragment to
the list, but if I start the export process (resynchronization works
fine), I get the error message:
"Problems during export
Reason:
Unable to plugin-id: whatever.org.eclipse.swt.patch_0.0.0. Please
check the error log for more details"
Regrettably the error log window does not show anything, there is also
no log file in the export directory.
Any ideas?
Thank you very much,
Daniel Krügler
|
|
|
|
|
|
|
|
Re: Export problems (fragment related) [message #436934 is a reply to message #436931] |
Tue, 20 September 2005 08:38   |
Eclipse User |
|
|
|
Alex Blewitt wrote:
> Technically, it's not possible to depend on a fragment, only on
> another plugin. I'm not sure whether it's possible/feasible/sensible
> to have code from one fragment depend on code from another fragment,
> which is what this seems to be.
Actually it should be feasible to patch a fragment, at least considering
that fragments are now more than simple i18n helper, but also useful for
(temporary) bugfixing and allows access to package accessible members,
which otherwise can not be accessed to due to the class loader-related
problems, which you explained to me in my previous posting ;-))
Allowing to patch fragments would be consistent with Java capability to
get access to package visible items provided I open the same package.
Using a fragment was done to realize solve this problem.
Furtheron I don't understand why the problem occurs only for the export
process and **not** for the RCP app started by the run configuration!
> Given that it's a simple patch, I'd suggest modifying the source for
> the original SWT fragment and distributing that with your code, and
> then re-applying the patch for future versions that come out. That's
> what I did when a bug didn't get fixed in the 3.0 stream, and
> provided backwards compatibiltiy with 2.1 stream
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=38085
Hmmh, you mean I should modify the sources of Spinner and create a jar
with that modified source - Shudder!
I hope there exist another solution... I would try anything else first,
even obscure stuff like class loader context switches or similar. Do you
know a method to use class loader context switch to get access to the
package visible method in another plugin, but same package??
Thanks,
Daniel Krügler
|
|
|
Re: Export problems (fragment related) [message #437020 is a reply to message #436934] |
Tue, 20 September 2005 09:25  |
Eclipse User |
|
|
|
It's not that difficult to modify the source, especially as you already know what you're trying to change. Alternatively, you could build/compile a new class, then add the .class into the Jar file (using a utility like 'winzip', for example). You don't necessarily need to build the entier win32.jar from scratch.
The export operation does a slightly different build than the definitions in the project's .classpath; that's why you sometimes get different behaviour between classes visible in the projects, but not visible when running a test app.
|
|
|
Powered by
FUDForum. Page generated in 0.32094 seconds