Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to use eclipse rcp fragments to update a plugin
How to use eclipse rcp fragments to update a plugin [message #521277] Wed, 17 March 2010 02:49 Go to next message
czetsuya is currently offline czetsuyaFriend
Messages: 9
Registered: March 2010
Location: Philippines
Junior Member
Hi,

I've been playing about it this morning but just can't make it work.

What I did was on the same workspace, I created a helloworld project and created another project mathlibrary (it has a MyMath class and operationA method, which simply accepts 2 integer and output the sum).

Now, what I want is to create a fragment, which has MyMath project as the host plugin. I simply wanted to override the operationA method, this time it should output the product of the 2 integers.

The host plugin has this manifest:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Math
Bundle-SymbolicName: org.demo.fragment.math
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.demo.fragment.math
Eclipse-ExtensibleAPI: true

Manifest of the fragment:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Patch
Bundle-SymbolicName: org.demo.fragment.math.patch
Bundle-Version: 1.0.0
Fragment-Host: org.demo.fragment.math;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-PatchFragment: true

It seems the runnable application that used the host doesn't see the fragment and still it outputs the sum.

It's like this:

RunnableProject (call operationA(a, b))
->Dependent on Host Plugin (has operationA=sum(a, b)
->Patched by Fragment (operationA=product(a, b)

In my previous try (language file), I've successfully used fragments to have separate language resource like en, ja, de, etc. What I did was in the project's Run Configuration->Arguments tab I've changed the nl parameter to -nl <my language>, example -nl ja (Japanese) or -nl en (English)

Any suggestion?

[Edit]
Problem solved. Miss some items in the manifest.mf configuration

Thanks,
czetsuya


[Updated on: Wed, 17 March 2010 05:46]

Report message to a moderator

Re: How to use eclipse rcp fragments to update a plugin [message #521330 is a reply to message #521277] Wed, 17 March 2010 10:12 Go to previous messageGo to next message
Rhodan76 Mising name is currently offline Rhodan76 Mising nameFriend
Messages: 71
Registered: July 2009
Member
Quote:
Problem solved. Miss some items in the manifest.mf configuration

Please post your solution, so other users can participate on this...

[Updated on: Wed, 17 March 2010 10:12]

Report message to a moderator

Re: How to use eclipse rcp fragments to update a plugin [message #521391 is a reply to message #521330] Wed, 17 March 2010 08:42 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Just in general: you can use a fragment to replace and add classes to a
host (but not remove). The setup includes something like:

host:
Bundle-ClassPath: lib/frag.jar, .

fragment:
Bundle-ClassPath: lib/frag.jar

When the fragment contents are merged into the hosts namespace, the host
classloader will look in the fragments lib/frag.jar first, allowing you
to "patch" classes that you want.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to use eclipse rcp fragments to update a plugin [message #543999 is a reply to message #521277] Thu, 01 July 2010 10:04 Go to previous message
Sascha Becher is currently offline Sascha BecherFriend
Messages: 17
Registered: December 2009
Junior Member
Quote:
[Edit]
Problem solved. Miss some items in the manifest.mf configuration

Thanks,
czetsuya


I'm glad to hear that from you.

This is just a forum to ask questions and get help, not provide it.
Previous Topic:Access system Arguments
Next Topic:Common Navigator Framework linking with editor and adding popup menu
Goto Forum:
  


Current Time: Fri Apr 26 20:42:38 GMT 2024

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

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

Back to the top