|
Lines 10-21
Link Here
|
| 10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
| 11 |
package org.eclipse.wst.server.core.internal; |
11 |
package org.eclipse.wst.server.core.internal; |
| 12 |
|
12 |
|
| 13 |
import java.io.*; |
13 |
import java.io.File; |
| 14 |
import java.util.*; |
|
|
| 15 |
import java.text.DateFormat; |
14 |
import java.text.DateFormat; |
|
|
15 |
import java.util.ArrayList; |
| 16 |
import java.util.HashMap; |
| 17 |
import java.util.Iterator; |
| 18 |
import java.util.List; |
| 19 |
import java.util.Map; |
| 20 |
import java.util.StringTokenizer; |
| 16 |
|
21 |
|
| 17 |
import org.eclipse.core.resources.IProject; |
22 |
import org.eclipse.core.resources.IProject; |
| 18 |
import org.eclipse.core.runtime.*; |
23 |
import org.eclipse.core.runtime.CoreException; |
|
|
24 |
import org.eclipse.core.runtime.IConfigurationElement; |
| 25 |
import org.eclipse.core.runtime.IExtensionRegistry; |
| 26 |
import org.eclipse.core.runtime.IPath; |
| 27 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 28 |
import org.eclipse.core.runtime.IRegistryChangeListener; |
| 29 |
import org.eclipse.core.runtime.IStatus; |
| 30 |
import org.eclipse.core.runtime.Platform; |
| 31 |
import org.eclipse.core.runtime.Plugin; |
| 32 |
import org.eclipse.core.runtime.Status; |
| 19 |
import org.eclipse.core.runtime.jobs.Job; |
33 |
import org.eclipse.core.runtime.jobs.Job; |
| 20 |
import org.eclipse.osgi.util.NLS; |
34 |
import org.eclipse.osgi.util.NLS; |
| 21 |
import org.eclipse.wst.server.core.IModuleArtifact; |
35 |
import org.eclipse.wst.server.core.IModuleArtifact; |
|
Lines 35-40
Link Here
|
| 35 |
public class ServerPlugin extends Plugin { |
49 |
public class ServerPlugin extends Plugin { |
| 36 |
public static final String PROJECT_PREF_FILE = ".serverPreference"; |
50 |
public static final String PROJECT_PREF_FILE = ".serverPreference"; |
| 37 |
public static final String EXCLUDE_SERVER_ADAPTERS = "excludeServerAdapters"; |
51 |
public static final String EXCLUDE_SERVER_ADAPTERS = "excludeServerAdapters"; |
|
|
52 |
private static final String EXTENSION_RUNTIME_MODULE_TYPE = "runtimeModuleType"; |
| 38 |
|
53 |
|
| 39 |
private static final String SHUTDOWN_JOB_FAMILY = "org.eclipse.wst.server.core.family"; |
54 |
private static final String SHUTDOWN_JOB_FAMILY = "org.eclipse.wst.server.core.family"; |
| 40 |
//public static final String REGISTRY_JOB_FAMILY = "org.eclipse.wst.server.registry.family"; |
55 |
//public static final String REGISTRY_JOB_FAMILY = "org.eclipse.wst.server.registry.family"; |
|
Lines 406-411
Link Here
|
| 406 |
return s; |
421 |
return s; |
| 407 |
} |
422 |
} |
| 408 |
|
423 |
|
|
|
424 |
/** |
| 425 |
* Load the Loose Module Types. |
| 426 |
*/ |
| 427 |
protected static synchronized void loadRuntimeModuleTypes(IRuntimeType runtimeType) { |
| 428 |
IExtensionRegistry registry = Platform.getExtensionRegistry(); |
| 429 |
IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, EXTENSION_RUNTIME_MODULE_TYPE); |
| 430 |
for (IConfigurationElement ce : cf) { |
| 431 |
try { |
| 432 |
String [] looseModuleRuntimeIds = ServerPlugin.tokenize(ce.getAttribute("runtimeTypes"), ","); |
| 433 |
if (looseModuleRuntimeIds.length < 0){ |
| 434 |
Trace.trace(Trace.EXTENSION_POINT, " runtimeTypes on extension point definition is empty"); |
| 435 |
return; |
| 436 |
} |
| 437 |
|
| 438 |
if (ServerPlugin.contains(looseModuleRuntimeIds, runtimeType.getId())){ |
| 439 |
((RuntimeType)runtimeType).addModuleType(ce); |
| 440 |
Trace.trace(Trace.EXTENSION_POINT, " Loaded Runtime supported ModuleType: " + ce.getAttribute("id")); |
| 441 |
} |
| 442 |
} catch (Throwable t) { |
| 443 |
Trace.trace(Trace.SEVERE, " Could not load Runtime supported ModuleType: " + ce.getAttribute("id"), t); |
| 444 |
} |
| 445 |
} |
| 446 |
} |
| 447 |
|
| 409 |
protected static List<org.eclipse.wst.server.core.IModuleType> getModuleTypes(IConfigurationElement[] elements) { |
448 |
protected static List<org.eclipse.wst.server.core.IModuleType> getModuleTypes(IConfigurationElement[] elements) { |
| 410 |
List<IModuleType> list = new ArrayList<IModuleType>(); |
449 |
List<IModuleType> list = new ArrayList<IModuleType>(); |
| 411 |
if (elements == null) |
450 |
if (elements == null) |