Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » [How to] prepare a plugin to be patched?
[How to] prepare a plugin to be patched? [message #448555] Wed, 26 April 2006 05:57 Go to next message
Eclipse UserFriend
Hi,

I'm looking for an idea to prepare my plug-ins to be patched (by me).

The scenario: A very big plug-in containing several hundred classes. I
want to *replace* the faulty class by a new class by a patch. I cannot
replace the whole plug-in due to whatever reason...

Any idea how to do that?

I tried without success:

* a fragment, but that can only add not replace classes
* introduce a "patch.jar" in the plug-in and
provide it (later) by a fragment

What is the proposed way do solve this problem?

Many thanks

Günther
Re: [How to] prepare a plugin to be patched? [message #448590 is a reply to message #448555] Thu, 27 April 2006 08:39 Go to previous messageGo to next message
Eclipse UserFriend
Guenther Koegel wrote:
> Hi,
>
> I'm looking for an idea to prepare my plug-ins to be patched (by me).
>
> The scenario: A very big plug-in containing several hundred classes. I
> want to *replace* the faulty class by a new class by a patch. I cannot
> replace the whole plug-in due to whatever reason...
>
> Any idea how to do that?
>
> I tried without success:
>
> * a fragment, but that can only add not replace classes
> * introduce a "patch.jar" in the plug-in and
> provide it (later) by a fragment


Actually, the second scenario is the one that's supposed to work.

ex: main plugin has a classpath like:
Bundle-ClassPath: patch.jar, .
and doesn't provide patch.jar

Then the fragment provides patch.jar.

Are you saying that it doesn't work?

Later,
PW
Re: [How to] prepare a plugin to be patched? [message #448801 is a reply to message #448590] Wed, 03 May 2006 04:40 Go to previous message
Eclipse UserFriend
Paul Webster schrieb:
> Guenther Koegel wrote:
.... [snip] ...
>> * introduce a "patch.jar" in the plug-in and
>> provide it (later) by a fragment
>
>
> Actually, the second scenario is the one that's supposed to work.
>
> ex: main plugin has a classpath like:
> Bundle-ClassPath: patch.jar, .
> and doesn't provide patch.jar
>
> Then the fragment provides patch.jar.
>
> Are you saying that it doesn't work?
>
> Later,
> PW

Thank you Paul for reminding me that I'm doing something wrong! My error
was to place the "patch.jar" on the runtime classpath *AND* in the build
configuration on the "Runtime Information". Therefore my "patch.jar" was
created and contained some classes. And now the steps to do it right:

Summary for the plug-in:
1) On the Runtime tab add a "New" library to the classpath
2) Move it "Up" until the library is on the top of the list

Summary for the fragment:
3) Export the patched packages
4) Put the library "patch.jar" missing in the plugin.xml in the
tab "Runtime Information"
5) Export your fragment and deploy!

That's all and it works now...

Bye

Günther
Previous Topic:Get classes from RCP to plugin
Next Topic:Closing welcome screen
Goto Forum:
  


Current Time: Sun Aug 31 07:55:34 EDT 2025

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

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

Back to the top