| Summary: | [BiDi] Cannot load mirrored Help Contents button image on JFace dialog | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Kit Lo <kitlo> | ||||||||||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||||||||||
| Status: | VERIFIED FIXED | QA Contact: | Paul Webster <pwebster> | ||||||||||||
| Severity: | major | ||||||||||||||
| Priority: | P3 | CC: | dsayed, ghadas, khouly, ob1.eclipse, pwebster, stephen.francisco | ||||||||||||
| Version: | 3.6.2 | ||||||||||||||
| Target Milestone: | 3.8 M2 | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows XP | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
See bug 153933 comment #6 You have to provide the mirror icon in both locations, AFAICT. PW I still think that there is a problem with the ICONS_PATH when declaring the help image in JFaceResources#initializeDefaultImages. ICONS_PATH folder is not where the "help.gif" image is located in org.eclipse.jface plugin. We should either move the "help.gif" image to the ICONS_PATH folder (/icons/full) in the org.eclipse.jface plugin, or use the correct path (/org/eclipse/jface/dialogs/images) when declaring the help image in JFaceResources#initializeDefaultImages. Language fragments follow the folder structure of the host plugins when creating the translated Java resource files and translated images. How would an adopter know that he needs to place an extra copy of the image to another location? (In reply to comment #2) > ICONS_PATH folder is not where the "help.gif" image is located in > org.eclipse.jface plugin. It's in both locations, at least in my org.eclipse.jface plugin. For something that's been like that for so long, I can't really change it (not for such a low-level plugin like JFace). PW Created attachment 202323 [details]
jface plugin extract
Created attachment 202324 [details]
help image path
I downloaded the development environment from both CVS and GIT and I can see that the plugin project "org.eclipse.jface" includes the folder "icons/full" which contains the "help.gif" image, however the plugin jar "org.eclipse.jface" in the run time eclipse doesn't contain this folder.Please find a screen shot for the extracted plugin.`
So there are two cases:
1)When launching eclipse runtime in arabic or english, the help.gif is loaded from "org/eclipse/jface/dialogs/images/" folder as the "$nl$/icons/full/" folder doesn't exist in the plugin jar.
2)When launching eclipse as an eclipse application using the code from CVS or GIT in arabic or english, the image is loaded from "$nl$/icons/full/" as it does exist in the development code.
Attached is a simple flow chart describing how the location of the help image is specified at runtime. Referring to this flow, I think we have two solutions:
1)If icons/full folder will be included in the "org.eclipse.jface" plugin(at runtime), then the mirrored help image should be added into a folder "nl/ar/icons/full" in the language pack.
2)If icons/full is not included within the structure of "org.eclipse.jface" plugin(and this is the current case), then the mirrored help image should be added to "nl\ar\org\eclipse\jface\dialogs\images" in the language pack. This will require change the default path of help image in JFaceResources.initializeDefaultImages() to point to "$nl$/org/eclipse/jface/dialogs/images/"
Created attachment 202745 [details]
Proposed Patch
Please find the proposed patch for solution 2.
Created attachment 202752 [details]
Mirrored help image for bidi support
(In reply to comment #5) > 1)When launching eclipse runtime in arabic or english, the help.gif is loaded > from "org/eclipse/jface/dialogs/images/" folder as the "$nl$/icons/full/" > folder doesn't exist in the plugin jar. > > 2)When launching eclipse as an eclipse application using the code from CVS or > GIT in arabic or english, the image is loaded from "$nl$/icons/full/" as it > does exist in the development code. That's the bug - the "icons" directory should have being included in the build.properties file. I fixed that for 3.8M2 / 4.2M2: In R3 development (for 3.8M2): http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R3_development&id=920dec3c603401149235fbbf4fd50ab84fac3481 In R4 developemnt (for 4.2M2): http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=266e10d9af03766f178f5c6674c5026be33a1f00 With this issue fixed, the localized help image should be placed in the $nl$/icons/full directory. For Arabic that would probably be: nl/ar/icons/full/help.gif With localized image placed in the proper location there is no need to change path lookup. Verified in Build: I20110915-1308, I added the help image in the path "nl/ar/icons/full" of the Arabic pack and it is working fine, I recommend to close this defect as Fixed. . (In reply to comment #9) > Verified in Build: I20110915-1308, Thank you! |
Created attachment 187750 [details] Cannot load mirrored Help Contents button image on JFace dialog Help Contents button image on JFace dialog should be mirrored. I created an Arabic language pack with a mirrored image for the Help Contents button and launched Eclipse in Arabic. However, the Help Contents button image on JFace dialog is not mirrored. See attached screen capture. I believe the problem is in JFaceResources#initializeDefaultImages. ICONS_PATH has a value of "$nl$/icons/full/". But, that's not where the mirrored image of "help.gif" is located in the Arabic language pack. If I change the path to "$nl$/org/eclipse/jface/dialogs/images/", then the mirrored image for the Help Contents button is loaded properly.