|
Lines 32-37
Link Here
|
| 32 |
public final class ServerCore { |
32 |
public final class ServerCore { |
| 33 |
private static final String EXTENSION_SERVER_TYPE = "serverTypes"; |
33 |
private static final String EXTENSION_SERVER_TYPE = "serverTypes"; |
| 34 |
private static final String EXTENSION_RUNTIME_TYPE = "runtimeTypes"; |
34 |
private static final String EXTENSION_RUNTIME_TYPE = "runtimeTypes"; |
|
|
35 |
private static final String EXTENSION_RUNTIME_SUPPORTEDMODULE_TYPE = "runtimeSupportedModuleType"; |
| 35 |
|
36 |
|
| 36 |
// cached copy of all runtime types |
37 |
// cached copy of all runtime types |
| 37 |
private static List<IRuntimeType> runtimeTypes; |
38 |
private static List<IRuntimeType> runtimeTypes; |
|
Lines 190-195
Link Here
|
| 190 |
IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, EXTENSION_RUNTIME_TYPE); |
191 |
IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, EXTENSION_RUNTIME_TYPE); |
| 191 |
List<IRuntimeType> list = new ArrayList<IRuntimeType>(cf.length); |
192 |
List<IRuntimeType> list = new ArrayList<IRuntimeType>(cf.length); |
| 192 |
addRuntimeTypes(cf, list); |
193 |
addRuntimeTypes(cf, list); |
|
|
194 |
cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, EXTENSION_RUNTIME_SUPPORTEDMODULE_TYPE); |
| 195 |
addRuntimeSupportedModuleTypes(cf, list); |
| 193 |
addRegistryListener(); |
196 |
addRegistryListener(); |
| 194 |
runtimeTypes = list; |
197 |
runtimeTypes = list; |
| 195 |
|
198 |
|
|
Lines 197-202
Link Here
|
| 197 |
} |
200 |
} |
| 198 |
|
201 |
|
| 199 |
/** |
202 |
/** |
|
|
203 |
* Load the loose Module Types. |
| 204 |
*/ |
| 205 |
private static synchronized void addRuntimeSupportedModuleTypes(IConfigurationElement[] cf, List<IRuntimeType> runtimeTypesList) { |
| 206 |
if (runtimeTypesList == null){ |
| 207 |
Trace.trace(Trace.EXTENSION_POINT, " runtimeTypeList is null"); |
| 208 |
return; |
| 209 |
} |
| 210 |
|
| 211 |
for (IConfigurationElement ce : cf) { |
| 212 |
try { |
| 213 |
String [] looseModuleRuntimeIds = ServerPlugin.tokenize(ce.getAttribute("runtimeTypes"), ","); |
| 214 |
if (looseModuleRuntimeIds.length >= 0){ |
| 215 |
Trace.trace(Trace.EXTENSION_POINT, " runtimeTypes on extension point definition is empty"); |
| 216 |
return; |
| 217 |
} |
| 218 |
|
| 219 |
for (IRuntimeType runtimeType: runtimeTypesList){ |
| 220 |
ServerPlugin.contains(looseModuleRuntimeIds, runtimeType.getId()); |
| 221 |
((RuntimeType)runtimeType).addModuleType(ce); |
| 222 |
Trace.trace(Trace.EXTENSION_POINT, " Loaded Runtime supported ModuleType: " + ce.getAttribute("id")); |
| 223 |
} |
| 224 |
} catch (Throwable t) { |
| 225 |
Trace.trace(Trace.SEVERE, " Could not load Runtime supported ModuleType: " + ce.getAttribute("id"), t); |
| 226 |
} |
| 227 |
} |
| 228 |
} |
| 229 |
|
| 230 |
/** |
| 200 |
* Load the runtime types. |
231 |
* Load the runtime types. |
| 201 |
*/ |
232 |
*/ |
| 202 |
private static synchronized void addRuntimeTypes(IConfigurationElement[] cf, List<IRuntimeType> list) { |
233 |
private static synchronized void addRuntimeTypes(IConfigurationElement[] cf, List<IRuntimeType> list) { |