Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344764

Summary: translation fragments generated from an update site discard the plug-in's directory structure
Product: [Technology] Babel Reporter: Stephan Herrmann <stephan.herrmann>
Component: ServerAssignee: Babel server inbox <babel.server-inbox>
Status: CLOSED FIXED QA Contact: Kit Lo <kitlo>
Severity: normal    
Priority: P3 CC: kitlo
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
current (wrong) structure
none
original structure
none
property files in our binary plugin none

Description Stephan Herrmann CLA 2011-05-04 17:02:36 EDT
I've registered the Object Teams plug-ins to babel by specifying our
p2 update site.

Our plug-ins are correctly picked up but inside the translation fragments
all property files are stored in the fragment's root directory.
Thus all files that are search in any subdirectories will not be found.

Note, that I was happy about the option to specify a p2 update site rather
than a map file, because Object Teams sits in an SVN repository for which
map-files don't seem to be standardized, meaning: I would be surprised
if announcing our map file to babel would actually work.
Comment 1 Kit Lo CLA 2011-05-10 11:26:46 EDT
Hi Stephan, as long as the Babel plugin fragments specify the correct Fragment-Host in the plugin manifest files, I think Eclipse will be able to load the plugin fragments properly.

Can you provide a picture of what you expect to see?
Comment 2 Stephan Herrmann CLA 2011-05-10 11:47:37 EDT
Created attachment 195234 [details]
current (wrong) structure

(In reply to comment #1)
> Hi Stephan, as long as the Babel plugin fragments specify the correct
> Fragment-Host in the plugin manifest files, I think Eclipse will be able to
> load the plugin fragments properly.

Loading the fragment isn't the problem, finding the property files
inside the fragment is.
 
> Can you provide a picture of what you expect to see?

The screenshot attached to this comment shows what I currently see for one
of our plugins.
Comment 3 Stephan Herrmann CLA 2011-05-10 11:49:28 EDT
Created attachment 195235 [details]
original structure

This is how property files sit in our directory structure.
The same structure must be re-created in the translation fragment, I believe.
Comment 4 Stephan Herrmann CLA 2011-05-10 11:55:23 EDT
Created attachment 195237 [details]
property files in our binary plugin

Here's a better picture, taken from the actual content of a plug-in jar file.
Just ignore any other files except for *.properties.

(The previous picture showed a bogus toplevel directory and "src",
both not relevant when building the jars).
Comment 5 Kit Lo CLA 2011-05-10 15:01:40 EDT
I see the problem now. We do create the directory structure for plugins from map files. There must be a bug on the update site side. I will take a look.
Comment 6 Kit Lo CLA 2011-06-13 10:46:33 EDT
Most plugin source files in CVS are organized in source folders like "src", "src_ant", and "Ant Editor". For example:

"org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/AntDTDMessages.properties"

Babel NL pack generator has a regular expression to mask out the optional source folder name in the file path. In some situations, the regular expression couldn't match the pattern and removed the folder structure in the jar instead.

I added logics to test for patterns like this. Please verify the new language packs at:

http://build.eclipse.org/technology/babel/babel_language_packs/N20110613-0400/indigo.php
Comment 7 Stephan Herrmann CLA 2011-06-13 11:59:26 EDT
I tried the packs for Object Teams and they look good now. Thanks!
Comment 8 Kit Lo CLA 2011-06-13 12:08:16 EDT
Verified, closing.