Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to override plugin_customization.ini from a fragment
How to override plugin_customization.ini from a fragment [message #464995] Wed, 21 March 2007 14:51 Go to next message
Javier Rodriguez is currently offline Javier Rodriguez
Messages: 41
Registered: July 2009
Member
Hi,

I looking for a solution to brand my application by using a fragment. This
works fine for splah screen, about etc... But i would need a why to
replace the plugin_customization.ini with the one that is present in the
fragment. Is it possible?

Thanks,
Xavier
Re: How to override plugin_customization.ini from a fragment [message #696934 is a reply to message #464995] Fri, 15 July 2011 07:11 Go to previous messageGo to next message
Kay Kasemir is currently offline Kay Kasemir
Messages: 4
Registered: July 2011
Junior Member
Hello:

Have you found a solution to this?

Is it possible to _define_ a plugin_customization.ini in a fragment, i.e. if the product has no such file, a fragment can provide it?
Is it possible to _replace_ a plugin_customization.ini in a fragment in case the product already contains a file?
Is it possible to _extend_ a file?

Thanks,
Kay
Re: How to override plugin_customization.ini from a fragment [message #696983 is a reply to message #696934] Fri, 15 July 2011 09:01 Go to previous messageGo to next message
Kay Kasemir is currently offline Kay Kasemir
Messages: 4
Registered: July 2011
Junior Member
Here's what seems to work:

You cannot put the plugin_customization.ini file into fragments for your product plugin. Plugin customization.ini files in fragments seem to be ignored.

But here's what you can do: Fake localization!

In your product plugin, have a plugin_customization.ini file that looks like this:

some.plugin/some_setting=%some_value

Then, in a fragment of the product plugin, place a plugin_customization.properties file that contains

some_value=Value A

In another fragment, you can have

some_value=Value B

By loading the appropriate fragments, for example from an update site, you can now install the settings that you want.
Re: How to override plugin_customization.ini from a fragment [message #697079 is a reply to message #696983] Fri, 15 July 2011 13:24 Go to previous messageGo to next message
Marco Maccaferri is currently offline Marco Maccaferri
Messages: 132
Registered: July 2009
Senior Member
On 15/07/2011 11:01 Kay Kasemir ha scritto:

> You cannot put the plugin_customization.ini file into fragments
> for your product plugin. Plugin customization.ini files in fragments
> seem to be ignored.

Interesting, I'm experimenting a bit with this and it looks to work
well. You can't override the values if the product plugin has its own
plugin_customization.ini file, but the product plugin doesn't have it
the plugin_customization.ini from the fragment is used.

Wondering if I'm missing something.
Re: How to override plugin_customization.ini from a fragment [message #698164 is a reply to message #697079] Mon, 18 July 2011 23:08 Go to previous messageGo to next message
Kay Kasemir is currently offline Kay Kasemir
Messages: 4
Registered: July 2011
Junior Member
What you write is interesting.

For me, having no plugin_customization.ini in the product plugin,
only having a plugin_customization.ini in a fragment of the product plugin
didn't seem to work.

One side effect could have been that the IDE tends to create a plugin_customization.ini in the product plugin, one that contains
only

org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true

So even when I thought I had no plugin_customization.ini in the product plugin,
I often did in fact have one that was auto-created.


For me, using 'fake localization', i.e. having settings with %variables
in the product plugin's plugin_customization.ini,
then setting those via a plugin_customization.properties file in a fragment
is actually closest to what I need: Easily build products that are almost the
same, differing mostly in their default settings.

Still, you may be correct that if you can assert that there's really no plugin_customization.ini in the product plugin, having them in a fragment
is also OK.
Re: How to override plugin_customization.ini from a fragment [message #698522 is a reply to message #698164] Tue, 19 July 2011 15:33 Go to previous message
Marco Maccaferri is currently offline Marco Maccaferri
Messages: 132
Registered: July 2009
Senior Member
On 19/07/2011 01:08 Kay Kasemir ha scritto:

> One side effect could have been that the IDE tends to create a plugin_customization.ini in the product plugin, one that contains
> only
>
> org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true
>
> So even when I thought I had no plugin_customization.ini in the product plugin,
> I often did in fact have one that was auto-created.

That's may be what I missed. I'm building the product with an headless
script and it works fine, it doesn't create a plugin_customization.ini
file. I don't export from the IDE so I can't tell for sure but it sounds
like a bug to me.

Regards,
Marco.
Previous Topic:Changing a Viewpart from a Menu item
Next Topic:Conflict in keys shortcuts
Goto Forum:
  


Current Time: Wed Oct 22 05:08:44 GMT 2014

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

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