Re: Reuse of 3rd part plugins [message #455764] |
Thu, 05 October 2006 13:33  |
Eclipse User |
|
|
|
Well, I've done a litte step forward, but it still doesn't work...
I' ve understand where to put the plugins that I want to use (in the plugins directory of the <b>target eclipse</b>), but it seems it can't still find log4j, as you can see from a snapshot of the message shown by the view that should contain the log viewer:
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.nightlabs.log4j.LogView.<init>(LogView.java:44)
...
Where should I put this damned <i>log4j-1.2.13.jar</i> to make it work fine???
Please, be kind and patient with a newbie, I feel I'm close to the solution of my troubles, but I'm going slightly mad if you don't help me now...
I look forward to your reply.
Thank you all
Yours faithfully,
Andrea
|
|
|
|
|
Re: Reuse of 3rd part plugins [message #455768 is a reply to message #455767] |
Thu, 05 October 2006 15:01   |
Eclipse User |
|
|
|
Thank you both Martin and Alex!
Martin: I had tried to export the package from my rcp, but it didn't worked... I've also tried to add that line to my manifest, but the problem remain...
It's unbeliveable, I've also added a plugin (the directory plugin <i>org.apache.jakarta_log4j_1.2.8v200607172048</i>) to my target platform's plugins directory, updated the classpath, exported the org.apache.log4j and I get still the same message...
Now I will try to follow also your hit, Alex (sooner or later I must exactly understand what it happens inside, after all!), hoping to find some answers...
If I'm really desperate, I'll post you my manifest.mf, buid.properties and plugin.xml, otherwise I will inform you about my mistake (there must be a mistake, of course...).
By now, thank you both very much for your precious help and hints!
Andrea
|
|
|
|
|
|
|
Re: RCP application localization - HELP !! [message #455814 is a reply to message #455790] |
Sat, 07 October 2006 02:02   |
Eclipse User |
|
|
|
Originally posted by: arshadm.pripetsoft.com.nospam
Hi,
Thanks for that.
Just in case anyone else is interested in the same issues here is a summary
of what I understand so far.
1. The directory structure for the localized content should be probably be
something like the following:-
plugin.properties
plugin_fr.properties
nl/about.properties
nl/en/about.properties
nl/en/docs/index.html
nl/fr/about.properties
nl/fr/docs/index.html
The plugin.properties file though needs to use the old naming scheme
(i.e. plugin_fr.properties, etc) and that file need needs to sit at the root
level.
The plugin.xml external strings go in the plugin.properties files, all
other application external strings should go under the "nl/..." structure
(this is not required but lowers the initial memory footprint).
2. Now we have the structure how do we access it.
i. Our activator class is given the BundleContext when the plugin is
started. We can get access to the actual running "Bundle" from here.
ii. We can then use the FileLocator.find(Bundle,IPath,Map) function
to get access to one of these files. The IPath parameter should be something
like "$nl$/about.properties", etc.
Question:
Does anyone know how to set the application locale on installation? I
assume it currently picks that info up from the Java runtime. It would be
nice to let the user change it from within the application.
Regards.
"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:31144732.1160133008612.JavaMail.root@cp1.javalobby.org...
> Download the language packs and see e.g. the .properties files in the UI
> toolkits to see how it's done.
>
> http://download.eclipse.org/eclipse/downloads/drops/L-3.2_La nguage_Packs-200607121700/index.php
>
> I believe that they have fragments with files like 'plugin_de.properties'
> which then take precedence over the files in 'plugin.properties'.
>
> Values defined in the plugin.properties file are used by e.g. the
> extension points e.g. <view class="my.view" name="%view.name">[/xml].
> You'd then have 'view.name=My View' in plugin.properties (assuming a
> default of english) and 'view.name=Mijn View' for plugin_nl.properties
> (for NL=Dutch). Similary for plugin_de.properties etc.
>
> If you want, you can have a fragment per language. Or, like Eclipse, you
> can dump all other languages into a single fragment (or a few fragments).
> Or, if you want, you can ship it with the main plugin.
>
> Alex.
|
|
|
|
|
Re: RCP application localization - HELP !! [message #458114 is a reply to message #458111] |
Tue, 14 November 2006 06:22  |
Eclipse User |
|
|
|
Not as far as I know, no. You are probably better off bouncing the application. If you really need the end user to decide, then pop up a dialog during the startup phase asking what language to use, and then restart the platform with the new language setting.
Alex.
|
|
|
Powered by
FUDForum. Page generated in 0.27317 seconds