essiembre / eclipse-rbe

Eclipse plugin for editing Java resource bundles. Lets you manage all localized .properties files in one screen. Some features: sorted keys, warning icons on missing keys/values, conversion to/from Unicode, hierarchical view of keys, and more.

Home Page:http://essiembre.github.io/eclipse-rbe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default bundle not showing

fx-nicolas opened this issue · comments

commented

I'm using RBE to translate bundles for a dev team.
In certain project, the "default" bundle appears, in other project, it does not.§
I cannot figure out a pattern there.
Any idea?
Thanks
FX

I have the same issue. I even tried debugging, deleting eclipse indexes, nothing helps.
It's even worse because it used to work until today, now the Default tab just doesn't show and i didn't change anything.

Now tried importing the project into a clean fresh workspace - this helped.

I can confirm the issue. Using Eclipse 4.4 and RBE 1.0.4, the "default" bundle often doesn't show up in RBE (although the RBE is started from the default bundle). Some resource bundles initially work, then they stop working at some time.
I am suspecting this issue might be related to the resource bundles being under version control using SVN. While I have no proof, the default bundle seems to go missing somewhen after the Eclipse projects are committed to SVN.

I have same problem with a project under version control using git.

I also found the following behavior:
1- Try to open the default bundle with RBE
2- The RBE opens but not show the default language
3- Ask RBE to create default language bundle
4- RBE creates a new file without extension for the default language bundle

Looking at this, the cause to not show the default bundle could be a problem setting the default resource bundle file's name.
So the 'bundle.properties' is there but RBE is looking for 'bundle' file as default.

Hi all, I've the same problem. Suddenly, without prenotification, the RBE doesn't show the default bundle tab. No idea what's wrong...

/Ralf.

I have a same problem Elclipse Luna 4.4, Dont show editor.

Okay so with a bit of debugging we here realized what's wrong.

First, the workaround is to disable support for loading of resources from fragment (3rd checkbox from the top in settings), or close your plugin's fragments projects before opening resources.

Now, the error itself.
First, ResourceFactory uses FragmentResourceFactory if current project has fragments. It loads all available resources from all fragments and then calls ResourceFactory again to look for a factory to load host (current) project's resources, that is StandardResourceFactory.
StandardResourceFactoryloads all the host's resources correctly, including the default resource for which it assigns the Locale value of null.
But then FragmentResourceFactory adds all the SourceEditors created by StandardResourceFactory except those, which have null Locale thus discarding the default resource.

I'm not sure of implications of removing that null check, so i didn't try to make any changes.
Error line: https://github.com/essiembre/eclipse-rbe/blob/bf15767b27/eclipse-rbe-plugin/src/com/essiembre/eclipse/rbe/ui/editor/resources/FragmentResourceFactory.java#L161

Hi,
I created a pull request which fixes this issue.
Can you please verify&accept this change or you can possibly give me an access to merge the change by myself.

Thank you

Lukas

Fixed in the latest release