Lines 45-50
Link Here
|
45 |
// Places to look for library files |
45 |
// Places to look for library files |
46 |
private static String[] WS_JAR_VARIANTS = buildWSVariants(); |
46 |
private static String[] WS_JAR_VARIANTS = buildWSVariants(); |
47 |
private static String[] OS_JAR_VARIANTS = buildOSVariants(); |
47 |
private static String[] OS_JAR_VARIANTS = buildOSVariants(); |
|
|
48 |
// Next static var is not really needed. |
49 |
// At best, for performance reasons, one could create a hashtable of nl_jar_variants, indexed by locale. |
48 |
private static String[] NL_JAR_VARIANTS = buildNLVariants(); |
50 |
private static String[] NL_JAR_VARIANTS = buildNLVariants(); |
49 |
private static String[] JAR_VARIANTS = buildVanillaVariants(); |
51 |
private static String[] JAR_VARIANTS = buildVanillaVariants(); |
50 |
|
52 |
|
Lines 65-71
Link Here
|
65 |
return (String[])result.toArray(new String[result.size()]); |
67 |
return (String[])result.toArray(new String[result.size()]); |
66 |
} |
68 |
} |
67 |
private static String[] buildNLVariants() { |
69 |
private static String[] buildNLVariants() { |
68 |
String nl = BootLoader.getNL(); |
70 |
return buildNLVariants(BootLoader.getNL()); |
|
|
71 |
} |
72 |
private static String[] buildNLVariants(String nl) { |
73 |
// Theoretically, we could create a hash table of all the nl variants |
74 |
// built, indexed by the nl string. This would avoid extra computation |
75 |
// and memory allocation. |
69 |
ArrayList result = new ArrayList(); |
76 |
ArrayList result = new ArrayList(); |
70 |
IPath base = new Path("nl"); //$NON-NLS-1$ |
77 |
IPath base = new Path("nl"); //$NON-NLS-1$ |
71 |
|
78 |
|
Lines 909-914
Link Here
|
909 |
|
916 |
|
910 |
private URL findNL(URL install, IPath path, Map override) { |
917 |
private URL findNL(URL install, IPath path, Map override) { |
911 |
String nl = null; |
918 |
String nl = null; |
|
|
919 |
|
912 |
if (override != null) |
920 |
if (override != null) |
913 |
try { |
921 |
try { |
914 |
// check for override |
922 |
// check for override |
Lines 923-930
Link Here
|
923 |
return null; |
931 |
return null; |
924 |
|
932 |
|
925 |
URL result = null; |
933 |
URL result = null; |
926 |
for (int i=0; i<NL_JAR_VARIANTS.length; i++) { |
934 |
String[] nl_jar_variants = buildNLVariants(nl); |
927 |
IPath filePath = new Path(NL_JAR_VARIANTS[i]).append(path); |
935 |
for (int i=0; i<nl_jar_variants.length; i++) { |
|
|
936 |
IPath filePath = new Path(nl_jar_variants[i]).append(path); |
928 |
result = findInPlugin(install, filePath); |
937 |
result = findInPlugin(install, filePath); |
929 |
if (result != null) |
938 |
if (result != null) |
930 |
return result; |
939 |
return result; |
Lines 980-983
Link Here
|
980 |
} |
989 |
} |
981 |
return null; |
990 |
return null; |
982 |
} |
991 |
} |
983 |
} |
992 |
} |