|
Lines 41-49
Link Here
|
| 41 |
|
41 |
|
| 42 |
private static IRegistryChangeListener registryListener; |
42 |
private static IRegistryChangeListener registryListener; |
| 43 |
|
43 |
|
| 44 |
static { |
44 |
private static boolean initialized = false; |
| 45 |
executeStartups(); |
|
|
| 46 |
} |
| 47 |
|
45 |
|
| 48 |
private static class RegistryChangeListener implements IRegistryChangeListener { |
46 |
private static class RegistryChangeListener implements IRegistryChangeListener { |
| 49 |
public void registryChanged(IRegistryChangeEvent event) { |
47 |
public void registryChanged(IRegistryChangeEvent event) { |
|
Lines 238-243
Link Here
|
| 238 |
Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .startup extension point -<-"); |
236 |
Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .startup extension point -<-"); |
| 239 |
} |
237 |
} |
| 240 |
|
238 |
|
|
|
239 |
private static synchronized void initialize() { |
| 240 |
if (initialized) |
| 241 |
return; |
| 242 |
|
| 243 |
initialized = true; |
| 244 |
executeStartups(); |
| 245 |
} |
| 246 |
|
| 241 |
/** |
247 |
/** |
| 242 |
* Load the runtime types. |
248 |
* Load the runtime types. |
| 243 |
*/ |
249 |
*/ |
|
Lines 314-319
Link Here
|
| 314 |
* with the given id |
320 |
* with the given id |
| 315 |
*/ |
321 |
*/ |
| 316 |
public static IRuntime findRuntime(String id) { |
322 |
public static IRuntime findRuntime(String id) { |
|
|
323 |
if (!initialized) |
| 324 |
initialize(); |
| 317 |
return getResourceManager().getRuntime(id); |
325 |
return getResourceManager().getRuntime(id); |
| 318 |
} |
326 |
} |
| 319 |
|
327 |
|
|
Lines 327-332
Link Here
|
| 327 |
* @return a possibly-empty array of runtime instances {@link IRuntime} |
335 |
* @return a possibly-empty array of runtime instances {@link IRuntime} |
| 328 |
*/ |
336 |
*/ |
| 329 |
public static IRuntime[] getRuntimes() { |
337 |
public static IRuntime[] getRuntimes() { |
|
|
338 |
if (!initialized) |
| 339 |
initialize(); |
| 330 |
return getResourceManager().getRuntimes(); |
340 |
return getResourceManager().getRuntimes(); |
| 331 |
} |
341 |
} |
| 332 |
|
342 |
|
|
Lines 341-346
Link Here
|
| 341 |
* with the given id |
351 |
* with the given id |
| 342 |
*/ |
352 |
*/ |
| 343 |
public static IServer findServer(String id) { |
353 |
public static IServer findServer(String id) { |
|
|
354 |
if (!initialized) |
| 355 |
initialize(); |
| 344 |
return getResourceManager().getServer(id); |
356 |
return getResourceManager().getServer(id); |
| 345 |
} |
357 |
} |
| 346 |
|
358 |
|
|
Lines 354-359
Link Here
|
| 354 |
* @return a possibly-empty array of server instances {@link IServer} |
366 |
* @return a possibly-empty array of server instances {@link IServer} |
| 355 |
*/ |
367 |
*/ |
| 356 |
public static IServer[] getServers() { |
368 |
public static IServer[] getServers() { |
|
|
369 |
if (!initialized) |
| 370 |
initialize(); |
| 357 |
return getResourceManager().getServers(); |
371 |
return getResourceManager().getServers(); |
| 358 |
} |
372 |
} |
| 359 |
|
373 |
|
|
Lines 412-417
Link Here
|
| 412 |
* default server |
426 |
* default server |
| 413 |
*/ |
427 |
*/ |
| 414 |
public static IServer getDefaultServer(IModule module) { |
428 |
public static IServer getDefaultServer(IModule module) { |
|
|
429 |
if (!initialized) |
| 430 |
initialize(); |
| 415 |
return ModuleProperties.getInstance().getDefaultServer(module); |
431 |
return ModuleProperties.getInstance().getDefaultServer(module); |
| 416 |
} |
432 |
} |
| 417 |
|
433 |
|
|
Lines 428-433
Link Here
|
| 428 |
* @throws CoreException if there is a problem setting the default server |
444 |
* @throws CoreException if there is a problem setting the default server |
| 429 |
*/ |
445 |
*/ |
| 430 |
public static void setDefaultServer(IModule module, IServer server, IProgressMonitor monitor) throws CoreException { |
446 |
public static void setDefaultServer(IModule module, IServer server, IProgressMonitor monitor) throws CoreException { |
|
|
447 |
if (!initialized) |
| 448 |
initialize(); |
| 431 |
ModuleProperties.getInstance().setDefaultServer(module, server, monitor); |
449 |
ModuleProperties.getInstance().setDefaultServer(module, server, monitor); |
| 432 |
} |
450 |
} |
| 433 |
|
451 |
|