Lines 41-52
Link Here
|
41 |
|
41 |
|
42 |
package org.netbeans.modules.options; |
42 |
package org.netbeans.modules.options; |
43 |
|
43 |
|
|
|
44 |
import java.awt.image.LookupTable; |
44 |
import java.beans.PropertyChangeListener; |
45 |
import java.beans.PropertyChangeListener; |
45 |
import java.lang.ref.Reference; |
46 |
import java.lang.ref.Reference; |
46 |
import java.lang.ref.WeakReference; |
47 |
import java.lang.ref.WeakReference; |
47 |
import java.util.ArrayList; |
48 |
import java.util.ArrayList; |
48 |
import java.util.Arrays; |
49 |
import java.util.Arrays; |
49 |
import java.util.Collections; |
50 |
import java.util.Collections; |
|
|
51 |
import java.util.HashMap; |
50 |
import java.util.Iterator; |
52 |
import java.util.Iterator; |
51 |
import java.util.LinkedHashMap; |
53 |
import java.util.LinkedHashMap; |
52 |
import java.util.List; |
54 |
import java.util.List; |
Lines 54-63
Link Here
|
54 |
import java.util.Set; |
56 |
import java.util.Set; |
55 |
import javax.swing.Icon; |
57 |
import javax.swing.Icon; |
56 |
import javax.swing.JComponent; |
58 |
import javax.swing.JComponent; |
|
|
59 |
import org.netbeans.spi.options.AdvancedOption; |
57 |
import org.netbeans.spi.options.OptionsCategory; |
60 |
import org.netbeans.spi.options.OptionsCategory; |
58 |
import org.netbeans.spi.options.OptionsPanelController; |
61 |
import org.netbeans.spi.options.OptionsPanelController; |
59 |
import org.openide.util.HelpCtx; |
62 |
import org.openide.util.HelpCtx; |
60 |
import org.openide.util.Lookup; |
63 |
import org.openide.util.Lookup; |
|
|
64 |
import org.openide.util.Lookup.Item; |
65 |
import org.openide.util.Lookup.Result; |
61 |
import org.openide.util.LookupEvent; |
66 |
import org.openide.util.LookupEvent; |
62 |
import org.openide.util.LookupListener; |
67 |
import org.openide.util.LookupListener; |
63 |
import org.openide.util.RequestProcessor; |
68 |
import org.openide.util.RequestProcessor; |
Lines 69-81
Link Here
|
69 |
*/ |
74 |
*/ |
70 |
public final class CategoryModel implements LookupListener { |
75 |
public final class CategoryModel implements LookupListener { |
71 |
private static Reference<CategoryModel> INSTANCE = new WeakReference<CategoryModel>(new CategoryModel()); |
76 |
private static Reference<CategoryModel> INSTANCE = new WeakReference<CategoryModel>(new CategoryModel()); |
72 |
private final RequestProcessor RP = new RequestProcessor(); |
77 |
private final RequestProcessor RP = new RequestProcessor(); |
73 |
private static String currentCategoryID = null; |
78 |
private static String currentCategoryID = null; |
74 |
private String highlitedCategoryID = null; |
79 |
private String highlitedCategoryID = null; |
75 |
private boolean categoriesValid = true; |
80 |
private boolean categoriesValid = true; |
76 |
private final Map<String, CategoryModel.Category> id2Category = |
81 |
private final Map<String, CategoryModel.Category> id2Category = |
77 |
Collections.synchronizedMap(new LinkedHashMap<String, CategoryModel.Category>()); |
82 |
Collections.synchronizedMap(new LinkedHashMap<String, CategoryModel.Category>()); |
78 |
private MasterLookup masterLookup; |
83 |
private MasterLookup masterLookup; |
|
|
84 |
|
85 |
Set<Map.Entry<String, CategoryModel.Category>> getCategories() { |
86 |
return id2Category.entrySet(); |
87 |
} |
88 |
|
79 |
private final RequestProcessor.Task masterLookupTask = RP.create(new Runnable() { |
89 |
private final RequestProcessor.Task masterLookupTask = RP.create(new Runnable() { |
80 |
public void run() { |
90 |
public void run() { |
81 |
String[] categoryIDs = getCategoryIDs(); |
91 |
String[] categoryIDs = getCategoryIDs(); |
Lines 93-99
Link Here
|
93 |
},true); |
103 |
},true); |
94 |
private final RequestProcessor.Task categoryTask = RP.create(new Runnable() { |
104 |
private final RequestProcessor.Task categoryTask = RP.create(new Runnable() { |
95 |
public void run() { |
105 |
public void run() { |
96 |
Map<String, OptionsCategory> all = loadOptionsCategories(); |
106 |
Map<String, OptionsCategory> all = loadOptionsCategories(); |
97 |
Map<String, CategoryModel.Category> temp = new LinkedHashMap<String, CategoryModel.Category>(); |
107 |
Map<String, CategoryModel.Category> temp = new LinkedHashMap<String, CategoryModel.Category>(); |
98 |
for (Iterator<Map.Entry<String, OptionsCategory>> it = all.entrySet().iterator(); it.hasNext();) { |
108 |
for (Iterator<Map.Entry<String, OptionsCategory>> it = all.entrySet().iterator(); it.hasNext();) { |
99 |
Map.Entry<String, OptionsCategory> entry = it.next(); |
109 |
Map.Entry<String, OptionsCategory> entry = it.next(); |
Lines 107-117
Link Here
|
107 |
masterLookupTask.schedule(0); |
117 |
masterLookupTask.schedule(0); |
108 |
} |
118 |
} |
109 |
},true); |
119 |
},true); |
110 |
|
120 |
|
111 |
private CategoryModel() { |
121 |
private CategoryModel() { |
112 |
categoryTask.schedule(0); |
122 |
categoryTask.schedule(0); |
113 |
} |
123 |
} |
114 |
|
124 |
|
115 |
public static CategoryModel getInstance() { |
125 |
public static CategoryModel getInstance() { |
116 |
CategoryModel retval = INSTANCE.get(); |
126 |
CategoryModel retval = INSTANCE.get(); |
117 |
if (retval == null) { |
127 |
if (retval == null) { |
Lines 120-158
Link Here
|
120 |
} |
130 |
} |
121 |
return retval; |
131 |
return retval; |
122 |
} |
132 |
} |
123 |
|
133 |
|
124 |
boolean needsReinit() { |
134 |
boolean needsReinit() { |
125 |
synchronized(CategoryModel.class) { |
135 |
synchronized(CategoryModel.class) { |
126 |
return !categoriesValid; |
136 |
return !categoriesValid; |
127 |
} |
137 |
} |
128 |
} |
138 |
} |
129 |
|
139 |
|
130 |
boolean isInitialized() { |
140 |
boolean isInitialized() { |
131 |
return categoryTask.isFinished(); |
141 |
return categoryTask.isFinished(); |
132 |
} |
142 |
} |
133 |
|
143 |
|
134 |
boolean isLookupInitialized() { |
144 |
boolean isLookupInitialized() { |
135 |
return masterLookupTask.isFinished(); |
145 |
return masterLookupTask.isFinished(); |
136 |
} |
146 |
} |
137 |
|
147 |
|
138 |
|
148 |
|
139 |
void waitForInitialization() { |
149 |
void waitForInitialization() { |
140 |
categoryTask.waitFinished(); |
150 |
categoryTask.waitFinished(); |
141 |
} |
151 |
} |
142 |
|
152 |
|
143 |
public String getCurrentCategoryID() { |
153 |
public String getCurrentCategoryID() { |
144 |
return verifyCategoryID(currentCategoryID); |
154 |
return verifyCategoryID(currentCategoryID); |
145 |
} |
155 |
} |
146 |
|
156 |
|
147 |
public void setCurrentCategoryID(String categoryID) { |
157 |
public void setCurrentCategoryID(String categoryID) { |
148 |
currentCategoryID = verifyCategoryID(categoryID); |
158 |
currentCategoryID = verifyCategoryID(categoryID); |
149 |
} |
159 |
} |
150 |
|
160 |
|
151 |
|
161 |
|
152 |
String getHighlitedCategoryID() { |
162 |
String getHighlitedCategoryID() { |
153 |
return verifyCategoryID(highlitedCategoryID); |
163 |
return verifyCategoryID(highlitedCategoryID); |
154 |
} |
164 |
} |
155 |
|
165 |
|
156 |
private String verifyCategoryID(String categoryID) { |
166 |
private String verifyCategoryID(String categoryID) { |
157 |
String retval = findCurrentCategoryID(categoryID) != -1 ? categoryID : null; |
167 |
String retval = findCurrentCategoryID(categoryID) != -1 ? categoryID : null; |
158 |
if (retval == null) { |
168 |
if (retval == null) { |
Lines 163-184
Link Here
|
163 |
} |
173 |
} |
164 |
return retval; |
174 |
return retval; |
165 |
} |
175 |
} |
166 |
|
176 |
|
167 |
private int findCurrentCategoryID(String categoryID) { |
177 |
private int findCurrentCategoryID(String categoryID) { |
168 |
return categoryID == null ? -1 : Arrays.asList(getCategoryIDs()).indexOf(categoryID); |
178 |
return categoryID == null ? -1 : Arrays.asList(getCategoryIDs()).indexOf(categoryID); |
169 |
} |
179 |
} |
170 |
|
180 |
|
171 |
public String[] getCategoryIDs() { |
181 |
public String[] getCategoryIDs() { |
172 |
categoryTask.waitFinished(); |
182 |
categoryTask.waitFinished(); |
173 |
Set<String> keys = id2Category.keySet(); |
183 |
Set<String> keys = id2Category.keySet(); |
174 |
return keys.toArray(new String[keys.size()]); |
184 |
return keys.toArray(new String[keys.size()]); |
175 |
} |
185 |
} |
176 |
|
186 |
|
177 |
Category getCurrent() { |
187 |
Category getCurrent() { |
178 |
String categoryID = getCurrentCategoryID(); |
188 |
String categoryID = getCurrentCategoryID(); |
179 |
return (categoryID == null) ? null : getCategory(categoryID); |
189 |
return (categoryID == null) ? null : getCategory(categoryID); |
180 |
} |
190 |
} |
181 |
|
191 |
|
182 |
void setCurrent(Category item) { |
192 |
void setCurrent(Category item) { |
183 |
item.setCurrent(); |
193 |
item.setCurrent(); |
184 |
} |
194 |
} |
Lines 186-197
Link Here
|
186 |
void setHighlited(Category item,boolean highlited) { |
196 |
void setHighlited(Category item,boolean highlited) { |
187 |
item.setHighlited(highlited); |
197 |
item.setHighlited(highlited); |
188 |
} |
198 |
} |
189 |
|
199 |
|
190 |
HelpCtx getHelpCtx() { |
200 |
HelpCtx getHelpCtx() { |
191 |
final CategoryModel.Category category = getCurrent(); |
201 |
final CategoryModel.Category category = getCurrent(); |
192 |
return (category == null) ? null : category.getHelpCtx(); |
202 |
return (category == null) ? null : category.getHelpCtx(); |
193 |
} |
203 |
} |
194 |
|
204 |
|
195 |
void update(PropertyChangeListener l, boolean force) { |
205 |
void update(PropertyChangeListener l, boolean force) { |
196 |
String[] categoryIDs = getCategoryIDs(); |
206 |
String[] categoryIDs = getCategoryIDs(); |
197 |
for (int i = 0; i < categoryIDs.length; i++) { |
207 |
for (int i = 0; i < categoryIDs.length; i++) { |
Lines 199-205
Link Here
|
199 |
item.update(l, force); |
209 |
item.update(l, force); |
200 |
} |
210 |
} |
201 |
} |
211 |
} |
202 |
|
212 |
|
203 |
void save() { |
213 |
void save() { |
204 |
String[] categoryIDs = getCategoryIDs(); |
214 |
String[] categoryIDs = getCategoryIDs(); |
205 |
for (int i = 0; i < categoryIDs.length; i++) { |
215 |
for (int i = 0; i < categoryIDs.length; i++) { |
Lines 207-213
Link Here
|
207 |
item.applyChanges(); |
217 |
item.applyChanges(); |
208 |
} |
218 |
} |
209 |
} |
219 |
} |
210 |
|
220 |
|
211 |
void cancel() { |
221 |
void cancel() { |
212 |
String[] categoryIDs = getCategoryIDs(); |
222 |
String[] categoryIDs = getCategoryIDs(); |
213 |
for (int i = 0; i < categoryIDs.length; i++) { |
223 |
for (int i = 0; i < categoryIDs.length; i++) { |
Lines 215-221
Link Here
|
215 |
item.cancel(); |
225 |
item.cancel(); |
216 |
} |
226 |
} |
217 |
} |
227 |
} |
218 |
|
228 |
|
219 |
boolean dataValid() { |
229 |
boolean dataValid() { |
220 |
boolean retval = true; |
230 |
boolean retval = true; |
221 |
String[] categoryIDs = getCategoryIDs(); |
231 |
String[] categoryIDs = getCategoryIDs(); |
Lines 225-231
Link Here
|
225 |
} |
235 |
} |
226 |
return retval; |
236 |
return retval; |
227 |
} |
237 |
} |
228 |
|
238 |
|
229 |
boolean isChanged() { |
239 |
boolean isChanged() { |
230 |
boolean retval = false; |
240 |
boolean retval = false; |
231 |
String[] categoryIDs = getCategoryIDs(); |
241 |
String[] categoryIDs = getCategoryIDs(); |
Lines 235-242
Link Here
|
235 |
} |
245 |
} |
236 |
return retval; |
246 |
return retval; |
237 |
} |
247 |
} |
238 |
|
248 |
|
239 |
|
249 |
|
240 |
Category getNextCategory() { |
250 |
Category getNextCategory() { |
241 |
int idx = findCurrentCategoryID(getCurrentCategoryID()); |
251 |
int idx = findCurrentCategoryID(getCurrentCategoryID()); |
242 |
String[] categoryIDs = getCategoryIDs(); |
252 |
String[] categoryIDs = getCategoryIDs(); |
Lines 252-258
Link Here
|
252 |
} |
262 |
} |
253 |
return nextId != null ? getCategory(nextId) : null; |
263 |
return nextId != null ? getCategory(nextId) : null; |
254 |
} |
264 |
} |
255 |
|
265 |
|
256 |
Category getPreviousCategory() { |
266 |
Category getPreviousCategory() { |
257 |
int idx = findCurrentCategoryID(getCurrentCategoryID()); |
267 |
int idx = findCurrentCategoryID(getCurrentCategoryID()); |
258 |
String[] categoryIDs = getCategoryIDs(); |
268 |
String[] categoryIDs = getCategoryIDs(); |
Lines 268-287
Link Here
|
268 |
} |
278 |
} |
269 |
return previousId != null ? getCategory(previousId) : null; |
279 |
return previousId != null ? getCategory(previousId) : null; |
270 |
} |
280 |
} |
271 |
|
281 |
|
272 |
|
282 |
|
273 |
Category getCategory(String categoryID) { |
283 |
Category getCategory(String categoryID) { |
274 |
categoryTask.waitFinished(); |
284 |
categoryTask.waitFinished(); |
275 |
return id2Category.get(categoryID); |
285 |
return id2Category.get(categoryID); |
276 |
} |
286 |
} |
277 |
|
287 |
|
278 |
private MasterLookup getMasterLookup() { |
288 |
private MasterLookup getMasterLookup() { |
279 |
if (masterLookup == null) { |
289 |
if (masterLookup == null) { |
280 |
masterLookup = new MasterLookup(); |
290 |
masterLookup = new MasterLookup(); |
281 |
} |
291 |
} |
282 |
return masterLookup; |
292 |
return masterLookup; |
283 |
} |
293 |
} |
284 |
|
294 |
|
285 |
private Map<String, OptionsCategory> loadOptionsCategories() { |
295 |
private Map<String, OptionsCategory> loadOptionsCategories() { |
286 |
Lookup lookup = Lookups.forPath("OptionsDialog"); // NOI18N |
296 |
Lookup lookup = Lookups.forPath("OptionsDialog"); // NOI18N |
287 |
Lookup.Result<OptionsCategory> result = lookup.lookup(new Lookup.Template<OptionsCategory>(OptionsCategory.class)); |
297 |
Lookup.Result<OptionsCategory> result = lookup.lookup(new Lookup.Template<OptionsCategory>(OptionsCategory.class)); |
Lines 296-307
Link Here
|
296 |
|
306 |
|
297 |
public void resultChanged(LookupEvent ev) { |
307 |
public void resultChanged(LookupEvent ev) { |
298 |
synchronized(CategoryModel.class) { |
308 |
synchronized(CategoryModel.class) { |
299 |
categoriesValid = false; |
309 |
categoriesValid = false; |
300 |
OptionsDisplayerImpl.lookupListener.resultChanged(ev); |
310 |
OptionsDisplayerImpl.lookupListener.resultChanged(ev); |
301 |
INSTANCE = new WeakReference<CategoryModel>(new CategoryModel()); |
311 |
INSTANCE = new WeakReference<CategoryModel>(new CategoryModel()); |
302 |
} |
312 |
} |
303 |
} |
313 |
} |
304 |
|
314 |
|
305 |
final class Category { |
315 |
final class Category { |
306 |
private OptionsCategory category; |
316 |
private OptionsCategory category; |
307 |
private OptionsPanelController controller; |
317 |
private OptionsPanelController controller; |
Lines 310-329
Link Here
|
310 |
private JComponent component; |
320 |
private JComponent component; |
311 |
private Lookup lookup; |
321 |
private Lookup lookup; |
312 |
private final String id; |
322 |
private final String id; |
313 |
|
323 |
|
314 |
private Category(final String id, final OptionsCategory category) { |
324 |
private Category(final String id, final OptionsCategory category) { |
315 |
this.category = category; |
325 |
this.category = category; |
316 |
this.id = id; |
326 |
this.id = id; |
317 |
} |
327 |
} |
318 |
|
328 |
|
319 |
boolean isCurrent() { |
329 |
boolean isCurrent() { |
320 |
return getID().equals(getCurrentCategoryID()); |
330 |
return getID().equals(getCurrentCategoryID()); |
321 |
} |
331 |
} |
322 |
|
332 |
|
323 |
boolean isHighlited() { |
333 |
boolean isHighlited() { |
324 |
return getID().equals(getHighlitedCategoryID()); |
334 |
return getID().equals(getHighlitedCategoryID()); |
325 |
} |
335 |
} |
326 |
|
336 |
|
327 |
private void setCurrent() { |
337 |
private void setCurrent() { |
328 |
setCurrentCategoryID(getID()); |
338 |
setCurrentCategoryID(getID()); |
329 |
} |
339 |
} |
Lines 331-337
Link Here
|
331 |
public void setCurrentSubcategory(String subpath) { |
341 |
public void setCurrentSubcategory(String subpath) { |
332 |
OptionsPanelControllerAccessor.getDefault().setCurrentSubcategory(create(), subpath); |
342 |
OptionsPanelControllerAccessor.getDefault().setCurrentSubcategory(create(), subpath); |
333 |
} |
343 |
} |
334 |
|
344 |
|
335 |
private void setHighlited(boolean highlited) { |
345 |
private void setHighlited(boolean highlited) { |
336 |
if (highlited) { |
346 |
if (highlited) { |
337 |
highlitedCategoryID = getID(); |
347 |
highlitedCategoryID = getID(); |
Lines 339-345
Link Here
|
339 |
highlitedCategoryID = currentCategoryID; |
349 |
highlitedCategoryID = currentCategoryID; |
340 |
} |
350 |
} |
341 |
} |
351 |
} |
342 |
|
352 |
|
343 |
public Icon getIcon() { |
353 |
public Icon getIcon() { |
344 |
return category.getIcon(); |
354 |
return category.getIcon(); |
345 |
} |
355 |
} |
Lines 349-370
Link Here
|
349 |
public String getID() { |
359 |
public String getID() { |
350 |
return id; |
360 |
return id; |
351 |
} |
361 |
} |
352 |
|
362 |
|
353 |
public String getCategoryName() { |
363 |
public String getCategoryName() { |
354 |
return category.getCategoryName(); |
364 |
return category.getCategoryName(); |
355 |
} |
365 |
} |
356 |
|
366 |
|
357 |
public String getTitle() { |
367 |
public String getTitle() { |
358 |
return category.getTitle(); |
368 |
return category.getTitle(); |
359 |
} |
369 |
} |
360 |
|
370 |
|
361 |
private synchronized OptionsPanelController create() { |
371 |
private synchronized OptionsPanelController create() { |
362 |
if (controller == null) { |
372 |
if (controller == null) { |
363 |
controller = category.create(); |
373 |
controller = category.create(); |
364 |
} |
374 |
} |
365 |
return controller; |
375 |
return controller; |
366 |
} |
376 |
} |
367 |
|
377 |
|
|
|
378 |
public Map<String, Set<String>> getKeywords() { |
379 |
Map<String, Set<String>> kws = new HashMap<String, Set<String>>(); |
380 |
if(category != null && (category instanceof OptionsCategoryImpl)) { |
381 |
kws.putAll(((OptionsCategoryImpl) category).getKeywordsByCategory()); |
382 |
} |
383 |
|
384 |
//sub-panels keywords |
385 |
String path = "OptionsDialog/" + getID(); // NOI18N |
386 |
Lookup lkp = Lookups.forPath(path); |
387 |
Result<AdvancedOption> lkpResult = lkp.lookup(new Lookup.Template<AdvancedOption>(AdvancedOption.class)); |
388 |
for (Item<AdvancedOption> item : lkpResult.allItems()) { |
389 |
// don't lookup in subfolders |
390 |
if (item.getId().substring(0, item.getId().lastIndexOf('/')).equals(path)) { // NOI18N |
391 |
AdvancedOption option = item.getInstance(); |
392 |
if(option instanceof AdvancedOptionImpl) |
393 |
kws.putAll(((AdvancedOptionImpl) option).getKeywordsByCategory()); |
394 |
} |
395 |
} |
396 |
return kws; |
397 |
} |
398 |
|
368 |
final void update(PropertyChangeListener l, boolean forceUpdate) { |
399 |
final void update(PropertyChangeListener l, boolean forceUpdate) { |
369 |
if ((!isUpdated && !forceUpdate) || (isUpdated && forceUpdate)) { |
400 |
if ((!isUpdated && !forceUpdate) || (isUpdated && forceUpdate)) { |
370 |
isUpdated = true; |
401 |
isUpdated = true; |
Lines 375-395
Link Here
|
375 |
} |
406 |
} |
376 |
} |
407 |
} |
377 |
} |
408 |
} |
378 |
|
409 |
|
379 |
private void applyChanges() { |
410 |
private void applyChanges() { |
380 |
if (isUpdated) { |
411 |
if (isUpdated) { |
381 |
create().applyChanges(); |
412 |
create().applyChanges(); |
382 |
} |
413 |
} |
383 |
isUpdated = false; |
414 |
isUpdated = false; |
384 |
} |
415 |
} |
385 |
|
416 |
|
386 |
private void cancel() { |
417 |
private void cancel() { |
387 |
if (isUpdated) { |
418 |
if (isUpdated) { |
388 |
create().cancel(); |
419 |
create().cancel(); |
389 |
} |
420 |
} |
390 |
isUpdated = false; |
421 |
isUpdated = false; |
391 |
} |
422 |
} |
392 |
|
423 |
|
393 |
private boolean isValid() { |
424 |
private boolean isValid() { |
394 |
boolean retval = true; |
425 |
boolean retval = true; |
395 |
if (isUpdated) { |
426 |
if (isUpdated) { |
Lines 397-403
Link Here
|
397 |
} |
428 |
} |
398 |
return retval; |
429 |
return retval; |
399 |
} |
430 |
} |
400 |
|
431 |
|
401 |
private boolean isChanged() { |
432 |
private boolean isChanged() { |
402 |
boolean retval = false; |
433 |
boolean retval = false; |
403 |
if (isUpdated) { |
434 |
if (isUpdated) { |
Lines 405-423
Link Here
|
405 |
} |
436 |
} |
406 |
return retval; |
437 |
return retval; |
407 |
} |
438 |
} |
408 |
|
439 |
|
409 |
public JComponent getComponent() { |
440 |
public JComponent getComponent() { |
410 |
if (component == null) { |
441 |
if (component == null) { |
411 |
component = create().getComponent(getMasterLookup()); |
442 |
component = create().getComponent(getMasterLookup()); |
412 |
} |
443 |
} |
413 |
return component; |
444 |
return component; |
414 |
} |
445 |
} |
415 |
|
446 |
|
416 |
private HelpCtx getHelpCtx() { |
447 |
private HelpCtx getHelpCtx() { |
417 |
return create().getHelpCtx(); |
448 |
return create().getHelpCtx(); |
418 |
} |
449 |
} |
419 |
|
450 |
|
420 |
|
451 |
|
421 |
private Lookup getLookup() { |
452 |
private Lookup getLookup() { |
422 |
if (lookup == null) { |
453 |
if (lookup == null) { |
423 |
lookup = create().getLookup(); |
454 |
lookup = create().getLookup(); |
Lines 425-431
Link Here
|
425 |
return lookup; |
456 |
return lookup; |
426 |
} |
457 |
} |
427 |
} |
458 |
} |
428 |
|
459 |
|
429 |
private class MasterLookup extends ProxyLookup { |
460 |
private class MasterLookup extends ProxyLookup { |
430 |
private void setLookups(List<Lookup> lookups) { |
461 |
private void setLookups(List<Lookup> lookups) { |
431 |
setLookups(lookups.toArray(new Lookup[lookups.size()])); |
462 |
setLookups(lookups.toArray(new Lookup[lookups.size()])); |