This commit was manufactured by cvs2svn to create tag
'Root_R3_0_maintenance'.
diff --git a/features/org.eclipse.wst.server_adapters.feature/feature.xml b/features/org.eclipse.wst.server_adapters.feature/feature.xml
index 54b49f7..34b0453 100644
--- a/features/org.eclipse.wst.server_adapters.feature/feature.xml
+++ b/features/org.eclipse.wst.server_adapters.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.wst.server_adapters.feature"
       label="%featureName"
-      version="3.0.0.qualifier"
+      version="3.0.1.qualifier"
       provider-name="%providerName">
 
    <description>
diff --git a/features/org.eclipse.wst.server_adapters.sdk.feature/feature.xml b/features/org.eclipse.wst.server_adapters.sdk.feature/feature.xml
index 265f23a..8282e93 100644
--- a/features/org.eclipse.wst.server_adapters.sdk.feature/feature.xml
+++ b/features/org.eclipse.wst.server_adapters.sdk.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.wst.server_adapters.sdk.feature"
       label="%featureName"
-      version="3.0.0.qualifier"
+      version="3.0.1.qualifier"
       provider-name="%providerName">
 
    <description>
diff --git a/features/org.eclipse.wst.server_core.feature/feature.xml b/features/org.eclipse.wst.server_core.feature/feature.xml
index c1f16f6..c212fe4 100644
--- a/features/org.eclipse.wst.server_core.feature/feature.xml
+++ b/features/org.eclipse.wst.server_core.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.wst.server_core.feature"
       label="%featureName"
-      version="3.0.0.qualifier"
+      version="3.0.1.qualifier"
       provider-name="%providerName">
 
    <description>
diff --git a/features/org.eclipse.wst.server_sdk.feature/feature.xml b/features/org.eclipse.wst.server_sdk.feature/feature.xml
index 0645e6b..90bc873 100644
--- a/features/org.eclipse.wst.server_sdk.feature/feature.xml
+++ b/features/org.eclipse.wst.server_sdk.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.wst.server_sdk.feature"
       label="%featureName"
-      version="3.0.0.qualifier"
+      version="3.0.1.qualifier"
       provider-name="%providerName">
 
    <description>
@@ -29,13 +29,4 @@
          id="org.eclipse.wst.server_ui.feature.source"
          version="0.0.0"/>
 
-<!--
-   <plugin
-         id="org.eclipse.server.doc.isv"
-         download-size="0"
-         install-size="0"
-         version="1.0.0"
-         unpack="false"/>
--->
-
 </feature>
diff --git a/features/org.eclipse.wst.server_ui.feature/feature.xml b/features/org.eclipse.wst.server_ui.feature/feature.xml
index 86b9a7b..ce2c6b6 100644
--- a/features/org.eclipse.wst.server_ui.feature/feature.xml
+++ b/features/org.eclipse.wst.server_ui.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.wst.server_ui.feature"
       label="%featureName"
-      version="3.0.0.qualifier"
+      version="3.0.1.qualifier"
       provider-name="%providerName">
 
    <description>
diff --git a/plugins/org.eclipse.jst.server.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.server.core/META-INF/MANIFEST.MF
index 7686f89..d51ba9e 100644
--- a/plugins/org.eclipse.jst.server.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jst.server.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.server.core; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.1.qualifier
 Bundle-Activator: org.eclipse.jst.server.core.internal.JavaServerPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/Trace.java b/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/Trace.java
index 8e9f0f6..fd470af 100644
--- a/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/Trace.java
+++ b/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/Trace.java
@@ -10,6 +10,9 @@
  *******************************************************************************/
 package org.eclipse.jst.server.core.internal;
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 /**
@@ -35,6 +38,8 @@
 
 	public static final byte PUBLISHING = 4;
 
+	private static Set<String> logged = new HashSet<String>();
+
 	/**
 	 * Trace constructor comment.
 	 */
@@ -60,8 +65,15 @@
 	 * @param t Throwable
 	 */
 	public static void trace(byte level, String s, Throwable t) {
-		if (level == SEVERE)
-			JavaServerPlugin.getInstance().getLog().log(new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, s, t));
+		if (s == null)
+			return;
+		
+		if (level == SEVERE) {
+			if (!logged.contains(s)) {
+				JavaServerPlugin.getInstance().getLog().log(new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, s, t));
+				logged.add(s);
+			}
+		}
 		
 		if (!JavaServerPlugin.getInstance().isDebugging())
 			return;
diff --git a/plugins/org.eclipse.jst.server.preview.adapter/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.server.preview.adapter/META-INF/MANIFEST.MF
index 3247593..5eccac1 100644
--- a/plugins/org.eclipse.jst.server.preview.adapter/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jst.server.preview.adapter/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.server.preview.adapter;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.101.qualifier
 Bundle-Activator: org.eclipse.jst.server.preview.adapter.internal.PreviewPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.jst.server.preview.adapter/src/org/eclipse/jst/server/preview/adapter/internal/core/PreviewServerBehaviour.java b/plugins/org.eclipse.jst.server.preview.adapter/src/org/eclipse/jst/server/preview/adapter/internal/core/PreviewServerBehaviour.java
index 3c4792b..5ef20cb 100644
--- a/plugins/org.eclipse.jst.server.preview.adapter/src/org/eclipse/jst/server/preview/adapter/internal/core/PreviewServerBehaviour.java
+++ b/plugins/org.eclipse.jst.server.preview.adapter/src/org/eclipse/jst/server/preview/adapter/internal/core/PreviewServerBehaviour.java
@@ -12,6 +12,7 @@
 
 import java.io.IOException;
 
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -38,6 +39,7 @@
 import org.eclipse.wst.server.core.model.IModuleResourceDelta;
 import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
 import org.eclipse.wst.server.core.util.IStaticWeb;
+import org.eclipse.wst.server.core.util.ProjectModule;
 import org.eclipse.wst.server.core.util.PublishUtil;
 import org.eclipse.wst.server.core.util.SocketUtil;
 /**
@@ -173,7 +175,10 @@
 	 * Publishes the given module to the server.
 	 */
 	protected void publishModule(int kind, int deltaKind, IModule[] moduleTree, IProgressMonitor monitor) throws CoreException {
-		IModule module = moduleTree[moduleTree.length - 1]; 
+		IModule module = moduleTree[moduleTree.length - 1];
+		if (isSingleRootStructure(module))
+			return;
+		
 		IPath to = getModulePublishDirectory(module);
 		
 		if (kind == IServer.PUBLISH_CLEAN || deltaKind == ServerBehaviourDelegate.REMOVED) {
@@ -251,12 +256,48 @@
 	}
 
 	/**
+	 * Returns <code>true</code> if the module in the workspace has a single
+	 * root structure - i.e. matches the spec disk layout - and <code>false</code>
+	 * otherwise.
+	 * 
+	 * @return <code>true</code> if the module in the workspace has a single
+	 *    root structure - i.e. matches the spec disk layout - and
+	 *    <code>false</code> otherwise
+	 */
+	protected boolean isSingleRootStructure(IModule module) {
+		ProjectModule pm = (ProjectModule) module.loadAdapter(ProjectModule.class, null);
+		if (pm == null)
+			return false;
+		
+		return pm.isSingleRootStructure();
+	}
+
+	/**
 	 * Returns the module's publish path.
 	 * 
 	 * @param module a module
 	 * @return the publish directory for the module
 	 */
 	protected IPath getModulePublishDirectory(IModule module) {
+		if (isSingleRootStructure(module)) {
+			String type = module.getModuleType().getId();
+			if ("wst.web".equals(type)) {
+				IStaticWeb webModule = (IStaticWeb) module.loadAdapter(IStaticWeb.class, null);
+				if (webModule != null) {
+					//IContainer[] moduleFolder = webModule.getResourceFolders();
+					//if (moduleFolder != null && moduleFolder.length > 0)
+					//	return moduleFolder[0].getLocation();							
+				}
+			} else if ("jst.web".equals(type)) {
+				IWebModule webModule = (IWebModule) module.loadAdapter(IWebModule.class, null);
+				if (webModule != null) {
+					IContainer[] moduleFolder = webModule.getResourceFolders();
+					if (moduleFolder != null && moduleFolder.length > 0)
+						return moduleFolder[0].getLocation();							
+				}
+			}
+		}
+		
 		return getTempDirectory().append(module.getName());
 	}
 
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.server.tomcat.core/META-INF/MANIFEST.MF
index 483b539..05a23f6 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jst.server.tomcat.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.server.tomcat.core; singleton:=true
-Bundle-Version: 1.1.101.qualifier
+Bundle-Version: 1.1.102.qualifier
 Bundle-Activator: org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java
index 6e488b3..b296e35 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java
@@ -227,7 +227,8 @@
 	 */
 	public boolean isServeModulesWithoutPublish() {
 		// If feature is supported, return current setting
-		if (getTomcatVersionHandler().supportsServeModulesWithoutPublish())
+		ITomcatVersionHandler tvh = getTomcatVersionHandler();
+		if (tvh != null && tvh.supportsServeModulesWithoutPublish())
 			return getAttribute(PROPERTY_SERVE_MODULES_WITHOUT_PUBLISH, false);
 		return false;
 	}
@@ -240,7 +241,8 @@
 	 */
 	public boolean isSaveSeparateContextFiles() {
 		// If feature is supported, return current setting
-		if (getTomcatVersionHandler().supportsSeparateContextFiles())
+		ITomcatVersionHandler tvh = getTomcatVersionHandler();
+		if (tvh != null && tvh.supportsSeparateContextFiles())
 			return getAttribute(PROPERTY_SAVE_SEPARATE_CONTEXT_FILES, false);
 		return false;
 	}
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.server.tomcat.ui/META-INF/MANIFEST.MF
index 281a304..fb60e90 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.server.tomcat.ui; singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.101.qualifier
 Bundle-Activator: org.eclipse.jst.server.tomcat.ui.internal.TomcatUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java
index 1833854..da5372c 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java
@@ -230,7 +230,7 @@
 		updating = true;
 		ITomcatVersionHandler tvh = tomcatServer.getTomcatVersionHandler();
 		
-		boolean supported = tvh.supportsServeModulesWithoutPublish();
+		boolean supported = tvh != null && tvh.supportsServeModulesWithoutPublish();
 		String label = NLS.bind(Messages.serverEditorNoPublish,
 				supported ? "" : Messages.serverEditorNotSupported);
 		noPublish.setText(label);
@@ -240,7 +240,7 @@
 		else
 			noPublish.setEnabled(true);
 
-		supported = tvh.supportsSeparateContextFiles();
+		supported = tvh != null && tvh.supportsSeparateContextFiles();
 		label = NLS.bind(Messages.serverEditorSeparateContextFiles,
 				supported ? "" : Messages.serverEditorNotSupported);
 		separateContextFiles.setText(label);
@@ -252,7 +252,7 @@
 
 		secure.setSelection(tomcatServer.isSecure());
 		
-		supported = tvh.supportsDebugArgument();
+		supported = tvh != null && tvh.supportsDebugArgument();
 		label = NLS.bind(Messages.serverEditorDebugMode,
 				supported ? "" : Messages.serverEditorNotSupported);
 		debug.setText(label);
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerLocationEditorSection.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerLocationEditorSection.java
index 9a05182..d061897 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerLocationEditorSection.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerLocationEditorSection.java
@@ -449,18 +449,16 @@
 	protected void updateServerDirButtons() {
 		if (tomcatServer.getInstanceDirectory() == null) {
 			IPath path = tomcatServer.getRuntimeBaseDirectory();
-			if (path.equals(installDirPath)) {
+			if (path != null && path.equals(installDirPath)) {
 				serverDirInstall.setSelection(true);
 				serverDirMetadata.setSelection(false);
 				serverDirCustom.setSelection(false);
-			}
-			else {
+			} else {
 				serverDirMetadata.setSelection(true);
 				serverDirInstall.setSelection(false);
 				serverDirCustom.setSelection(false);
 			}
-		}
-		else {
+		} else {
 			serverDirCustom.setSelection(true);
 			serverDirMetadata.setSelection(false);
 			serverDirInstall.setSelection(false);
@@ -476,7 +474,9 @@
 	
 	protected void updateServerDir() {
 		IPath path = tomcatServer.getRuntimeBaseDirectory();
-		if (workspacePath.isPrefixOf(path)) {
+		if (path == null)
+			serverDir.setText("");
+		else if (workspacePath.isPrefixOf(path)) {
 			int cnt = path.matchingFirstSegments(workspacePath);
 			path = path.removeFirstSegments(cnt).setDevice(null);
 			serverDir.setText(path.toOSString());
@@ -485,8 +485,7 @@
 				if (tomcatServer.isTestEnvironment() && tomcatServer.getInstanceDirectory() == null)
 					tempDirPath = path;
 			}
-		}
-		else
+		} else
 			serverDir.setText(path.toOSString());
 	}
 	
@@ -581,7 +580,7 @@
 			else {
 				IPath path = tomcatServer.getRuntimeBaseDirectory();
 				// If non-custom instance dir is not the install and metadata isn't the selection, return error
-				if (!path.equals(installDirPath) && !serverDirMetadata.getSelection()) {
+				if (path != null && !path.equals(installDirPath) && !serverDirMetadata.getSelection()) {
 					setErrorMessage(NLS.bind(Messages.errorServerDirCustomNotMetadata, 
 							NLS.bind(Messages.serverEditorServerDirMetadata, "").trim()));
 				}
diff --git a/plugins/org.eclipse.jst.server.websphere.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.server.websphere.core/META-INF/MANIFEST.MF
index c5f0fc5..2b9e770 100644
--- a/plugins/org.eclipse.jst.server.websphere.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jst.server.websphere.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.server.websphere.core; singleton:=true
-Bundle-Version: 1.0.301.qualifier
+Bundle-Version: 1.0.302.qualifier
 Bundle-ClassPath: webspherecore.jar
 Bundle-Activator: org.eclipse.jst.server.websphere.core.CorePlugin
 Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.jst.server.websphere.core/serverdef/websphere.6.serverdef b/plugins/org.eclipse.jst.server.websphere.core/serverdef/websphere.6.serverdef
index 3a8dc3d..ce94861 100644
--- a/plugins/org.eclipse.jst.server.websphere.core/serverdef/websphere.6.serverdef
+++ b/plugins/org.eclipse.jst.server.websphere.core/serverdef/websphere.6.serverdef
@@ -178,7 +178,7 @@
 		<archive path="${wasHome}/lib/scheduler-client.jar"/>
 		<archive path="${wasHome}/lib/scheduler-service.jar"/>
 		<archive path="${wasHome}/lib/security.jar"/>
-		<archive path="${wasHome}/lib/securityImpl.jar"/>
+		<archive path="${wasHome}/lib/securityimpl.jar"/>
 		<archive path="${wasHome}/lib/servletevent.jar"/>
 		<archive path="${wasHome}/lib/sib.common.jar"/>
 		<archive path="${wasHome}/lib/sib.server.jar"/>
diff --git a/plugins/org.eclipse.wst.server.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.server.core/META-INF/MANIFEST.MF
index 9d3ae96..48472e4 100644
--- a/plugins/org.eclipse.wst.server.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.server.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.server.core; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.1.qualifier
 Bundle-Activator: org.eclipse.wst.server.core.internal.ServerPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd b/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd
index 11d6017..d927a6c 100644
--- a/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd
@@ -1,10 +1,10 @@
 <?xml version='1.0' encoding='UTF-8'?>

 <!-- Schema file written by PDE -->

-<schema targetNamespace="org.eclipse.wst.server.ui">

+<schema targetNamespace="org.eclipse.wst.server.core" xmlns="http://www.w3.org/2001/XMLSchema">

 <annotation>

-      <appInfo>

-         <meta.schema plugin="org.eclipse.wst.server.ui" id="moduleArtifactAdapters" name="Module Artifact Adapters"/>

-      </appInfo>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.wst.server.core" id="moduleArtifactAdapters" name="Module Artifact Adapters"/>

+      </appinfo>

       <documentation>

          

       </documentation>

@@ -13,6 +13,11 @@
    <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>

 

    <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

       <complexType>

          <sequence>

             <element ref="moduleArtifactAdapter" minOccurs="1" maxOccurs="unbounded"/>

@@ -43,9 +48,9 @@
 

    <element name="moduleArtifactAdapter">

       <annotation>

-         <appInfo>

+         <appinfo>

             <meta.element labelAttribute="id"/>

-         </appInfo>

+         </appinfo>

       </annotation>

       <complexType>

          <sequence>

@@ -63,9 +68,9 @@
                <documentation>

                   specifies the fully qualified name of the Java class that implements &lt;samp&gt;org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate&lt;/samp&gt;.

                </documentation>

-               <appInfo>

+               <appinfo>

                   <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate"/>

-               </appInfo>

+               </appinfo>

             </annotation>

          </attribute>

          <attribute name="priority" type="string">

@@ -79,18 +84,18 @@
    </element>

 

    <annotation>

-      <appInfo>

+      <appinfo>

          <meta.section type="since"/>

-      </appInfo>

+      </appinfo>

       <documentation>

          &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;

       </documentation>

    </annotation>

 

    <annotation>

-      <appInfo>

+      <appinfo>

          <meta.section type="examples"/>

-      </appInfo>

+      </appinfo>

       <documentation>

          The following is an example of a module object adapter extension point:

 

@@ -101,29 +106,21 @@
    </annotation>

 

    <annotation>

-      <appInfo>

+      <appinfo>

          <meta.section type="apiInfo"/>

-      </appInfo>

+      </appinfo>

       <documentation>

          Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;code&gt;org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate&lt;/code&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

-   <annotation>

-      <appInfo>

-         <meta.section type="implementation"/>

-      </appInfo>

-      <documentation>

-         

-      </documentation>

-   </annotation>

 

    <annotation>

-      <appInfo>

+      <appinfo>

          <meta.section type="copyright"/>

-      </appInfo>

+      </appinfo>

       <documentation>

-         Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;

+         Copyright (c) 2000, 2008 IBM Corporation and others.&lt;br&gt;

 All rights reserved. This program and the accompanying materials are made 

 available under the terms of the Eclipse Public License v1.0 which accompanies 

 this distribution, and is available at 

diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServer.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServer.java
index a59aaf7..0418174 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServer.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServer.java
@@ -465,7 +465,7 @@
 	public boolean getServerRestartState();
 
 	/**
-	 * Asynchronously restarts this server. This operation does
+	 * Synchronously restarts this server. This operation does
 	 * nothing if this server cannot be stopped ({@link #canRestart(String)}
 	 * returns <code>false</code>.
 	 * This method cannot be used to start the server from a stopped state.
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java
index cd60859..e8b3eff 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java
@@ -14,16 +14,12 @@
 
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.core.runtime.jobs.MultiRule;
+import org.eclipse.core.runtime.jobs.*;
 import org.eclipse.debug.core.*;
-
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.wst.server.core.*;
 import org.eclipse.wst.server.core.model.*;
+
 /**
  * 
  */
@@ -309,10 +305,12 @@
 			
 			IStatus stat = startImpl(launchMode, monitor);
 			
-			if (publish == PUBLISH_AFTER) {
-				IStatus status = publishImpl(IServer.PUBLISH_INCREMENTAL, null, null, monitor);
-				if (status != null && status.getSeverity() == IStatus.ERROR)
-					return status;
+			if ( IStatus.ERROR != stat.getSeverity() ) {
+				if (publish == PUBLISH_AFTER) {
+					IStatus status = publishImpl(IServer.PUBLISH_INCREMENTAL, null, null, monitor);
+					if (status != null && status.getSeverity() == IStatus.ERROR)
+						return status;
+				}
 			}
 			return stat;
 		}
@@ -2454,7 +2452,10 @@
 			
 			try {
 				addServerListener(curListener);
-				getBehaviourDelegate(null).restart(launchMode);
+				
+				// Synchroneous restart
+				restartImpl2(launchMode, monitor);
+				
 				return Status.OK_STATUS;
 			} catch (CoreException ce) {
 				removeServerListener(curListener);
@@ -2504,6 +2505,136 @@
 		return Status.OK_STATUS;
 	}
 
+	/**
+	 * Synchroneous restart. Throws a core exception in case the the adopter doesn't implement restart 
+	 * @param launchMode
+	 * @param monitor
+	 * @return IStatus 
+	 * @throws CoreException
+	 */
+	protected IStatus restartImpl2(String launchMode, IProgressMonitor monitor) throws CoreException{
+		final boolean[] notified = new boolean[1];
+		
+		// add listener to the server
+		IServerListener listener = new IServerListener() {
+			public void serverChanged(ServerEvent event) {
+				int eventKind = event.getKind();
+				IServer server = event.getServer();
+				if (eventKind == (ServerEvent.SERVER_CHANGE | ServerEvent.STATE_CHANGE)) {
+					int state = server.getServerState();
+					if (state == IServer.STATE_STARTED) {
+						// notify waiter
+						synchronized (notified) {
+							try {
+								Trace.trace(Trace.FINEST, "synchronousRestart notify");
+								notified[0] = true;
+								notified.notifyAll();
+							} catch (Exception e) {
+								Trace.trace(Trace.SEVERE, "Error notifying server restart", e);
+							}
+						}
+					}
+				}
+			}
+		};
+		addServerListener(listener);
+		
+		final int restartTimeout = (getStartTimeout() * 1000) + (getStopTimeout() * 1000);
+		class Timer {
+			boolean timeout;
+			boolean alreadyDone;
+		}
+		final Timer timer = new Timer();
+		
+		final IProgressMonitor monitor2 = monitor;
+		Thread thread = new Thread("Server Restart Timeout") {
+			public void run() {
+				try {
+					int totalTimeout = restartTimeout;
+					if (totalTimeout < 0)
+						totalTimeout = 1;
+					boolean userCancelled = false;
+					int retryPeriod = 2500;
+					while (!notified[0] && totalTimeout > 0 && !userCancelled && !timer.alreadyDone) {
+						Thread.sleep(retryPeriod);
+						if (restartTimeout > 0)
+							totalTimeout -= retryPeriod;
+						if (!notified[0] && !timer.alreadyDone && monitor2.isCanceled()) {
+							// user canceled - set the server state to stopped
+							userCancelled = true;
+							setServerState(IServer.STATE_STOPPED);
+							// notify waiter
+							synchronized (notified) {
+								Trace.trace(Trace.FINEST, "synchronousRestart user cancelled");
+								notified[0] = true;
+								notified.notifyAll();
+							}
+						}
+					}
+					if (!userCancelled && !timer.alreadyDone && !notified[0]) {
+						// notify waiter
+						synchronized (notified) {
+							Trace.trace(Trace.FINEST, "synchronousRestart notify timeout");
+							if (!timer.alreadyDone && totalTimeout <= 0)
+								timer.timeout = true;
+							notified[0] = true;
+							notified.notifyAll();
+						}
+					}
+				} catch (Exception e) {
+					Trace.trace(Trace.SEVERE, "Error notifying server restart timeout", e);
+				}
+			}
+		};
+		thread.setDaemon(true);
+		thread.start();
+	
+		Trace.trace(Trace.FINEST, "synchronousRestart 2");
+	
+		// call the delegate restart
+		try {
+			getBehaviourDelegate(null).restart(launchMode);
+		} catch (CoreException e) {
+			removeServerListener(listener);
+			timer.alreadyDone = true;
+			throw new CoreException(e.getStatus());
+		}
+		if (monitor.isCanceled()) {
+			removeServerListener(listener);
+			timer.alreadyDone = true;
+			return Status.CANCEL_STATUS;
+		}
+		
+		Trace.trace(Trace.FINEST, "synchronousRestart 3");
+		
+		// wait for it! wait for it! ...
+		synchronized (notified) {
+			try {
+				while (!notified[0] && !monitor.isCanceled() && !timer.timeout
+						&& !(getServerState() == IServer.STATE_STARTED)) {
+					notified.wait();
+				}
+			} catch (Exception e) {
+				Trace.trace(Trace.SEVERE, "Error waiting for server restart", e);
+			}
+			timer.alreadyDone = true;
+		}
+		removeServerListener(listener);
+		
+		if (timer.timeout) {
+			stop(false);
+			// TODO this message should be changed to restart time out
+			return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorRestartFailed, new String[] { getName(), (restartTimeout / 1000) + "" }), null);
+		}
+		
+		if (getServerState() == IServer.STATE_STOPPED)
+			// TODO this message should be changed to restart time out
+			return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorRestartFailed, getName()), null);
+		
+		Trace.trace(Trace.FINEST, "synchronousRestart 4");
+		return Status.OK_STATUS;
+	}
+	
 	protected IStatus startImpl(String launchMode, IProgressMonitor monitor) {
 		final boolean[] notified = new boolean[1];
 		
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Trace.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Trace.java
index 63a3887..ea2fd7f 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Trace.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Trace.java
@@ -12,6 +12,8 @@
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -39,6 +41,8 @@
 
 	private static final SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy HH:mm.ss.SSS");
 
+	private static Set<String> logged = new HashSet<String>();
+
 	/**
 	 * Trace constructor comment.
 	 */
@@ -67,8 +71,12 @@
 		if (s == null)
 			return;
 		
-		if (level == SEVERE)
-			ServerPlugin.log(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, s, t));
+		if (level == SEVERE) {
+			if (!logged.contains(s)) {
+				ServerPlugin.log(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, s, t));
+				logged.add(s);
+			}
+		}
 		
 		if (!ServerPlugin.getInstance().isDebugging())
 			return;
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PublishHelper.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PublishHelper.java
index 4548eb4..3b8d979 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PublishHelper.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PublishHelper.java
@@ -52,11 +52,11 @@
 	/**
 	 * Create a new PublishHelper.
 	 * 
-	 * @param tempDir a temporary directory to use during publishing, or <code>null</code>
+	 * @param tempDirectory a temporary directory to use during publishing, or <code>null</code>
 	 *    to use the default. If it does not exist, the folder will be created
 	 */
-	public PublishHelper(File tempDir) {
-		this.tempDir = tempDir;
+	public PublishHelper(File tempDirectory) {
+		this.tempDir = tempDirectory;
 		if (tempDir == null)
 			tempDir = defaultTempDir;
 		else if (!tempDir.exists())
diff --git a/plugins/org.eclipse.wst.server.preview.adapter/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.server.preview.adapter/META-INF/MANIFEST.MF
index 075c186..487f18a 100644
--- a/plugins/org.eclipse.wst.server.preview.adapter/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.server.preview.adapter/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.server.preview.adapter;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.101.qualifier
 Bundle-Activator: org.eclipse.wst.server.preview.adapter.internal.core.PreviewPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.wst.server.preview.adapter/src/org/eclipse/wst/server/preview/adapter/internal/core/PreviewServerBehaviour.java b/plugins/org.eclipse.wst.server.preview.adapter/src/org/eclipse/wst/server/preview/adapter/internal/core/PreviewServerBehaviour.java
index 5b1419c..ea0f5ec 100644
--- a/plugins/org.eclipse.wst.server.preview.adapter/src/org/eclipse/wst/server/preview/adapter/internal/core/PreviewServerBehaviour.java
+++ b/plugins/org.eclipse.wst.server.preview.adapter/src/org/eclipse/wst/server/preview/adapter/internal/core/PreviewServerBehaviour.java
@@ -31,6 +31,7 @@
 import org.eclipse.wst.server.core.model.IModuleResourceDelta;
 import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
 import org.eclipse.wst.server.core.util.IStaticWeb;
+import org.eclipse.wst.server.core.util.ProjectModule;
 import org.eclipse.wst.server.core.util.PublishUtil;
 import org.eclipse.wst.server.core.util.SocketUtil;
 /**
@@ -100,7 +101,8 @@
 			String type = module.getModuleType().getId();
 			if ("wst.web".equals(type)) {
 				IStaticWeb staticWeb = (IStaticWeb) module.loadAdapter(IStaticWeb.class, null);
-				mod.putString("context", staticWeb.getContextRoot());
+				if (staticWeb != null)
+					mod.putString("context", staticWeb.getContextRoot());
 				mod.putString("type", "static");
 			}
 			mod.putString("path", getModulePublishDirectory(module).toPortableString());
@@ -160,7 +162,10 @@
 	 * Publishes the given module to the server.
 	 */
 	protected void publishModule(int kind, int deltaKind, IModule[] moduleTree, IProgressMonitor monitor) throws CoreException {
-		IModule module = moduleTree[moduleTree.length - 1]; 
+		IModule module = moduleTree[moduleTree.length - 1];
+		if (isSingleRootStructure(module))
+			return;
+		
 		IPath to = getModulePublishDirectory(module);
 		
 		if (kind == IServer.PUBLISH_CLEAN || deltaKind == ServerBehaviourDelegate.REMOVED) {
@@ -238,12 +243,38 @@
 	}
 
 	/**
+	 * Returns <code>true</code> if the module in the workspace has a single
+	 * root structure - i.e. matches the spec disk layout - and <code>false</code>
+	 * otherwise.
+	 * 
+	 * @return <code>true</code> if the module in the workspace has a single
+	 *    root structure - i.e. matches the spec disk layout - and
+	 *    <code>false</code> otherwise
+	 */
+	protected boolean isSingleRootStructure(IModule module) {
+		ProjectModule pm = (ProjectModule) module.loadAdapter(ProjectModule.class, null);
+		if (pm == null)
+			return false;
+		
+		return pm.isSingleRootStructure();
+	}
+
+	/**
 	 * Returns the module's publish path.
 	 * 
 	 * @param module a module
 	 * @return the publish directory for the module
 	 */
 	protected IPath getModulePublishDirectory(IModule module) {
+		if (isSingleRootStructure(module)) {
+			IStaticWeb webModule = (IStaticWeb) module.loadAdapter(IStaticWeb.class, null);
+			if (webModule != null) {
+				//IContainer[] moduleFolder = webModule.getResourceFolders();
+				//if (moduleFolder != null && moduleFolder.length > 0)
+				//	return moduleFolder[0].getLocation();							
+			}
+		}
+		
 		return getTempDirectory().append(module.getName());
 	}
 
diff --git a/plugins/org.eclipse.wst.server.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.server.ui/META-INF/MANIFEST.MF
index 7a0f756..8815a61 100644
--- a/plugins/org.eclipse.wst.server.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.server.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.server.ui; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.1.qualifier
 Bundle-Activator: org.eclipse.wst.server.ui.internal.ServerUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.wst.server.ui/serverAdapterSites.xml b/plugins/org.eclipse.wst.server.ui/serverAdapterSites.xml
index 22442fa..54ec5e0 100644
--- a/plugins/org.eclipse.wst.server.ui/serverAdapterSites.xml
+++ b/plugins/org.eclipse.wst.server.ui/serverAdapterSites.xml
@@ -3,7 +3,7 @@
     <site url="http://download.boulder.ibm.com/ibmdl/pub/software/websphere/wasce/updates/"/>
     <site url="http://www.pramati.com/downloads/eclipse/updates/"/>
     <site url="http://update.eclipse.org/updates/3.3/"/>
-    <site url="https://dev2devclub.bea.com/updates/wls-tools/ganymede/"/>
+    <site url="http://download.oracle.com/otn_software/oepe/ganymede/wls-adapter/"/>
     <site url="https://ajax.dev.java.net/eclipse"/>
     <site url="https://www.sdn.sap.com/downloads/updates/netweaver/nwds/sapnwserver/"/>
     <site url="http://www.webtide.com/eclipse"/>
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/GeneralToolTip.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/GeneralToolTip.java
index 40974d5..e73c37b 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/GeneralToolTip.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/GeneralToolTip.java
@@ -10,6 +10,7 @@
  **********************************************************************/
 package org.eclipse.wst.server.ui.internal;
 
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Text;
@@ -27,7 +28,7 @@
 		String s = "";
 		if (server.getRuntime() != null)
 			s += server.getRuntime().getName() + " - ";
-		s += server.getModules().length + " modules";
+		s += NLS.bind(Messages.modules, server.getModules().length + "");
 		text.setText(s);
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java
index 9193dc0..48a4403 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java
@@ -338,6 +338,7 @@
 	public static String clientDefaultDescription;
 	public static String moduleDecoratorProject;
 	public static String minutes;
+	public static String modules;
 
 	public static String errorStartingMonitor;
 	public static String audioPrefSelectFile;
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties
index ab5cf5b..f768261 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties
@@ -421,6 +421,7 @@
 
 # Used for displaying time (so far only used in tooltip)
 minutes={0} minutes 
+modules={0} modules
 
 # --------------- Editor support ---------------
 
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerPropertyPage.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerPropertyPage.java
index f19bfdc..53a7147 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerPropertyPage.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerPropertyPage.java
@@ -123,6 +123,7 @@
 			Button switchLocation = new Button(composite, SWT.PUSH);
 			switchLocation.setText(Messages.actionSwitchServerLocation);
 			switchLocation.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+			switchLocation.setEnabled(!server.isReadOnly());
 			switchLocation.addSelectionListener(new SelectionAdapter() {
 				public void widgetSelected(SelectionEvent e) {
 					try {
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerToolTip.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerToolTip.java
index 7e973a7..83501e1 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerToolTip.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerToolTip.java
@@ -16,38 +16,20 @@
 import java.util.Hashtable;
 import java.util.Iterator;
 
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.*;
 import org.eclipse.jface.internal.text.html.HTML2TextReader;
 import org.eclipse.jface.text.TextPresentation;
 import org.eclipse.jface.window.ToolTip;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.StyleRange;
 import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerType;
-import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.wst.server.core.*;
 import org.eclipse.wst.server.core.internal.Trace;
 import org.eclipse.wst.server.ui.IServerModule;
 import org.eclipse.wst.server.ui.internal.provisional.IServerToolTip;
@@ -75,14 +57,18 @@
 		tree.addKeyListener(new KeyListener() {
 			public void keyPressed(KeyEvent  e) {
 				if (e.keyCode == SWT.ESC) {
-					CURRENT_TOOLTIP.setVisible(false);
-					CURRENT_TOOLTIP.dispose();
+					if (CURRENT_TOOLTIP != null) {
+						CURRENT_TOOLTIP.dispose();
+						CURRENT_TOOLTIP = null;
+					}
 					activate();
 				}
 				if (e.keyCode == SWT.F6) {
-					deactivate();
-					hide();
-					createFocusedTooltip(tree);					
+					if (CURRENT_TOOLTIP == null) {
+						deactivate();
+						hide();
+						createFocusedTooltip(tree);
+					}
 				}
 			}
 			public void keyReleased(KeyEvent e){
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Trace.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Trace.java
index 8912f4b..c8513f7 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Trace.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Trace.java
@@ -12,6 +12,8 @@
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -33,6 +35,8 @@
 
 	private static final SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy HH:mm.ss.SSS");
 
+	private static Set<String> logged = new HashSet<String>();
+
 	/**
 	 * Trace constructor comment.
 	 */
@@ -58,8 +62,15 @@
 	 * @param t a throwable
 	 */
 	public static void trace(byte level, String s, Throwable t) {
-		if (level == SEVERE)
-			ServerUIPlugin.getInstance().getLog().log(new Status(IStatus.ERROR, ServerUIPlugin.PLUGIN_ID, s, t));
+		if (s == null)
+			return;
+		
+		if (level == SEVERE) {
+			if (!logged.contains(s)) {
+				ServerUIPlugin.getInstance().getLog().log(new Status(IStatus.ERROR, ServerUIPlugin.PLUGIN_ID, s, t));
+				logged.add(s);
+			}
+		}
 		
 		if (!ServerUIPlugin.getInstance().isDebugging())
 			return;
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java
index 6bd3a89..29539cf 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java
@@ -393,7 +393,7 @@
 		// runtime
 		if (server != null && server.getServerType() != null && server.getServerType().hasRuntime()) {
 			final IRuntime runtime = server.getRuntime();
-			if (ServerUIPlugin.hasWizardFragment(runtime.getRuntimeType().getId())) {
+			if (runtime != null && ServerUIPlugin.hasWizardFragment(runtime.getRuntimeType().getId())) {
 				Hyperlink link = toolkit.createHyperlink(composite, Messages.serverEditorOverviewRuntime, SWT.NONE);
 				link.addHyperlinkListener(new HyperlinkAdapter() {
 					public void linkActivated(HyperlinkEvent e) {
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/DeleteAction.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/DeleteAction.java
index 6c866f1..43bf11e 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/DeleteAction.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/DeleteAction.java
@@ -50,6 +50,9 @@
 		
 		int size = servers.length;
 		for (int i = 0; i < size; i++) {
+			if (servers[i].isReadOnly())
+				return false;
+			
 			if (servers[i].getServerConfiguration() != null)
 				list.add(servers[i].getServerConfiguration());
 		}
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/ServersView.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/ServersView.java
index 4c879c2..5d754ad 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/ServersView.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/ServersView.java
@@ -306,9 +306,11 @@
 		monitorPropertiesAction = new PropertiesAction(shell, "org.eclipse.wst.server.ui.properties.monitor", provider);
 		
 		// add toolbar buttons
-		IContributionManager cm = getViewSite().getActionBars().getToolBarManager();
+		IContributionManager cm = actionBars.getToolBarManager();
 		for (int i = 0; i < actions.length - 1; i++)
 			cm.add(actions[i]);
+		
+		cm.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
 	}
 
 	private static void fillNewContextMenu(Shell shell, ISelection selection, IMenuManager menu) {
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/AbstractTreeContentProvider.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/AbstractTreeContentProvider.java
index 0a833c8..3e5e096 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/AbstractTreeContentProvider.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/AbstractTreeContentProvider.java
@@ -10,11 +10,9 @@
  *******************************************************************************/
 package org.eclipse.wst.server.ui.internal.viewers;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
+import org.eclipse.core.resources.IProject;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
@@ -199,4 +197,12 @@
 		}
 		return initialSelection;
 	}
+	
+	public Object getInitialSelection(IProject project){
+		if (initialSelection == null) {
+			InitialSelectionProvider isp = ServerUIPlugin.getInitialSelectionProvider();
+			initialSelection = isp.getInitialSelection(getAllObjects(),project);
+		}
+		return initialSelection;
+	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/InitialSelectionProvider.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/InitialSelectionProvider.java
index f6917cf..248fad9 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/InitialSelectionProvider.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/InitialSelectionProvider.java
@@ -10,12 +10,16 @@
  *******************************************************************************/
 package org.eclipse.wst.server.ui.internal.viewers;
 
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerType;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.*;
+import org.eclipse.wst.server.core.internal.ResourceManager;
+import org.eclipse.wst.server.core.internal.facets.FacetUtil;
 import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
+import org.eclipse.wst.server.ui.internal.Trace;
 /**
  * Class used to sort categories, runtime types, and server types in the
  * New wizards.
@@ -76,10 +80,47 @@
 	 * @return the initial selection
 	 */
 	public IServer getInitialSelection(IServer[] servers) {
+		return getInitialSelection(servers,null);
+	}
+	
+	/**
+	 * Allows adopters to provide an initial selection out of a list of items.
+	 * <p>
+	 * The <code>IProject</code> can be null, in cases where a project selection was not available (ie: New Server Wizard)
+	 * </p><p>
+	 * Returning <code>null</code> means no object is applicable to be selected. 
+	 * </p>
+	 * 
+	 * @param servers
+	 * @param project
+	 * @return
+	 */
+	public IServer getInitialSelection(IServer[] servers, IProject project){
 		if (servers == null)
 			return null;
 		
-		return servers[0];
+		IServer rval = servers[0];
+		
+		if (project != null){
+			try{
+				// check for the targeted runtime of the project
+				IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+				if (facetedProject != null){
+					org.eclipse.wst.common.project.facet.core.runtime.IRuntime facetedRuntime = facetedProject.getPrimaryRuntime();
+						if (facetedRuntime != null){
+							IRuntime runtime = FacetUtil.getRuntime(facetedRuntime);
+							IServer server = findServerFromRuntime(runtime.getId());
+							if (server != null){
+								rval = server;
+							}
+						}
+					}
+				}
+				catch (CoreException ce){
+					Trace.trace(Trace.WARNING,"Could not create a faceted project",ce);
+				}
+			}
+		return rval;
 	}
 
 	/**
@@ -155,4 +196,69 @@
 		}
 		return first;
 	}
+	
+	/**
+	 * Allows adopters to provide an initial selection out of a list of items.
+	 * <p>
+	 * The <code>IProject</code> can be null, in cases where a project selection was not available (ie: New Server Wizard)
+	 * </p><p>
+	 * Returning <code>null</code> means no object is applicable to be selected. 
+	 * </p>
+	 * 
+	 * @param obj Contains an array of all the possible object to be selected. 
+	 * @param project
+	 * @return The object to be selected from the <code>obj[]</code> 
+	 */
+	public Object getInitialSelection(Object [] obj, IProject project){
+		if (obj == null || obj.length == 0)
+			return null;
+		
+		if (obj[0] instanceof IRuntimeType) {
+			int size = obj.length;
+			IRuntimeType[] rt = new IRuntimeType[size];
+			for (int i = 0; i < size; i++)
+				rt[i] = (IRuntimeType) obj[i];
+			return getInitialSelection(rt);
+		}
+		
+		if (obj[0] instanceof IServerType) {
+			int size = obj.length;
+			IServerType[] st = new IServerType[size];
+			for (int i = 0; i < size; i++)
+				st[i] = (IServerType) obj[i];
+			return getInitialSelection(st);
+		}
+		
+		if (obj[0] instanceof IServer) {
+			int size = obj.length;
+			IServer[] st = new IServer[size];
+			for (int i = 0; i < size; i++)
+				st[i] = (IServer) obj[i];
+			return getInitialSelection(st,project);
+		}
+		
+		return null;		
+	}
+	
+	/**
+	 * Returns the server with the given runtime id, or <code>null</code> 
+	 * if none. This convenience method searches the list of registered servers
+	 * for the matching runtime id. The id may not be null.
+	 * 
+	 * @param runtimeId
+	 * @return
+	 */
+	private static IServer findServerFromRuntime(String runtimeId){
+		if (runtimeId == null)
+			throw new IllegalArgumentException();
+			
+		IServer [] servers = ResourceManager.getInstance().getServers();
+		for (IServer server:servers){
+			if (runtimeId == server.getRuntime().getId()){
+				return server;
+			}
+		}
+		return null;
+	}
+	
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/ServerComposite.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/ServerComposite.java
index 7e24661..2588b10 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/ServerComposite.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/ServerComposite.java
@@ -156,8 +156,8 @@
 				Display.getDefault().asyncExec(new Runnable() {
 					public void run() {
 						try {
-							if (contentProvider.getInitialSelection() != null)
-								treeViewer.setSelection(new StructuredSelection(contentProvider.getInitialSelection()), true);
+							if (contentProvider.getInitialSelection(module.getProject()) != null)
+								treeViewer.setSelection(new StructuredSelection(contentProvider.getInitialSelection(module.getProject())), true);
 						} catch (Exception e) {
 							// ignore - wizard has already been closed
 						}
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/fragment/TasksWizardFragment.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/fragment/TasksWizardFragment.java
index 996ebd4..5bc5f47 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/fragment/TasksWizardFragment.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/fragment/TasksWizardFragment.java
@@ -105,7 +105,7 @@
 		}
 	}
 
-	protected List tasks;
+	protected List<TaskInfo> tasks;
 	protected boolean hasOptionalTasks;
 	protected boolean hasPreferredTasks;
 
@@ -241,21 +241,60 @@
 			wc = (ServerWorkingCopy)server.createWorkingCopy();
 			createdWC = true;
 		}
-		wc.resetPreferredPublishOperations();
-		wc.resetOptionalPublishOperations();
 		
+		// compare lists
+		List<String> disabled = new ArrayList<String>();
+		List<String> enabled = new ArrayList<String>();
 		Iterator iterator = tasks.iterator();
 		while (iterator.hasNext()) {
 			TaskInfo task = (TaskInfo)iterator.next();
 			if (PublishOperation.REQUIRED == task.kind)
 				continue;
 			
+			String id = wc.getPublishOperationId(task.task2);
 			if (PublishOperation.PREFERRED == task.kind) {
 				if (!task.isSelected())
-					wc.disablePreferredPublishOperations(task.task2);
+					disabled.add(id);
 			} else if (PublishOperation.OPTIONAL == task.kind) {
 				if (task.isSelected())
-					wc.enableOptionalPublishOperations(task.task2);
+					enabled.add(id);
+			}
+		}
+		
+		List<String> curDisabled = wc.getDisabledPreferredPublishOperationIds();
+		List<String> curEnabled = wc.getEnabledOptionalPublishOperationIds();
+		
+		boolean different = false;
+		if (curEnabled.size() != enabled.size() || curDisabled.size() != disabled.size()) {
+			different = true;
+		} else {
+			for (String id : curDisabled) {
+				if (!disabled.contains(id))
+					different = true;
+			}
+			for (String id : curEnabled) {
+				if (!enabled.contains(id))
+					different = true;
+			}
+		}
+		
+		if (different) {
+			wc.resetPreferredPublishOperations();
+			wc.resetOptionalPublishOperations();
+			
+			Iterator<TaskInfo> iterator2 = tasks.iterator();
+			while (iterator2.hasNext()) {
+				TaskInfo task = iterator2.next();
+				if (PublishOperation.REQUIRED == task.kind)
+					continue;
+				
+				if (PublishOperation.PREFERRED == task.kind) {
+					if (!task.isSelected())
+						wc.disablePreferredPublishOperations(task.task2);
+				} else if (PublishOperation.OPTIONAL == task.kind) {
+					if (task.isSelected())
+						wc.enableOptionalPublishOperations(task.task2);
+				}
 			}
 		}
 		
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/ModifyModulesComposite.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/ModifyModulesComposite.java
index 1c9889c..0b56d11 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/ModifyModulesComposite.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/ModifyModulesComposite.java
@@ -10,46 +10,23 @@
  *******************************************************************************/
 package org.eclipse.wst.server.ui.internal.wizard.page;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
+import java.util.*;
 import java.util.List;
-import java.util.Map;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.viewers.*;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.wst.server.core.*;
 import org.eclipse.wst.server.ui.ServerUICore;
@@ -713,20 +690,34 @@
 		if (ms == null ||  ms.length == 0) {
 			add.setEnabled(false);
 		} else {
-			boolean enabled = true;
+			boolean enabled = false;
+			// iterate through selection, if we find at least ONE module that can't be added, exit the loop
 			for (int i = 0; i < ms.length; i++) {
 				IModule module = getModule(ms[i]);
 				if (module != null) {
 					try {
 						IStatus status = errorMap.get(module);
-						if (modules.contains(module) && status != null) {
-							if (status.getSeverity() == IStatus.ERROR) {
+						if (modules.contains(module)) {
+							if (status == null )
+								enabled = true;
+							else if (status.getSeverity() == IStatus.ERROR) {
+								// this module can't be added because has errors, exit the loop
 								enabled = false;
 								wizard.setMessage(status.getMessage(), IMessageProvider.ERROR);
-							} else if (status.getSeverity() == IStatus.WARNING)
+								break;
+							} else if (status.getSeverity() == IStatus.WARNING){
+								enabled = true;
 								wizard.setMessage(status.getMessage(), IMessageProvider.WARNING);
-							else if (status.getSeverity() == IStatus.INFO)
+							}
+							else if (status.getSeverity() == IStatus.INFO){
+								enabled = true;
 								wizard.setMessage(status.getMessage(), IMessageProvider.INFORMATION);
+							}
+						}
+						else{
+							// at least ONE module from the selection can't be added, exit the loop   
+							enabled = false;
+							break;
 						}
 					} catch (Exception e) {
 						Trace.trace(Trace.INFO,"Unable to handle error map for module:" + module); 
@@ -741,16 +732,29 @@
 		if (ms == null ||  ms.length == 0) {
 			remove.setEnabled(false);
 		} else {
-			boolean enabled = true;
+			boolean enabled = false;
+			// iterate through selection, if we find at least ONE module that can't be added, exit the loop
 			for (int i = 0; i < ms.length; i++) {
 				IModule module = getModule(ms[i]);
 				if (module != null && deployed.contains(module)) {
 					// provide error about removing required single module
-					if (requiredModules != null && requiredModules.length == 1 &&
-							requiredModules[0].equals(module)) {
-						wizard.setMessage(NLS.bind(Messages.wizModuleRequiredModule, module.getName()), IMessageProvider.ERROR);
-						enabled = false;
+					// required modules can't be removed
+					if (requiredModules != null){
+						if (requiredModules.length == 1 && requiredModules[0].equals(module)) {
+							// this is a required module and can't be removed, exit the loop
+							wizard.setMessage(NLS.bind(Messages.wizModuleRequiredModule, module.getName()), IMessageProvider.ERROR);
+							enabled = false;
+							break;
+						}
 					}
+					else 
+						enabled = true;
+				}
+				else{
+					// this module is not found in the 'deployed' array, the module might be a child
+					// at least ONE module from the selection can't be removed, exit the loop
+					enabled = false;
+					break;
 				}
 			}
 			remove.setEnabled(enabled);
@@ -823,9 +827,6 @@
 				deployedTreeViewer.remove(ms);
 			}
 		}
-		
-		//availableTreeViewer.refresh();
-		//deployedTreeViewer.refresh();
 
 		setEnablement();
 	}
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewManualServerComposite.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewManualServerComposite.java
index a59abf0..6372668 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewManualServerComposite.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewManualServerComposite.java
@@ -465,10 +465,10 @@
 				}
 				if (sel < 0) {
 					sel = 0;
-					setRuntime(runtimes[0]);
 				}
 				
 				runtimeCombo.select(sel);
+				setRuntime(runtimes[0]);
 			}
 			
 			IRuntimeType runtimeType = serverType.getRuntimeType();