### Eclipse Workspace Patch 1.0
#P org.jboss.tools.runtime.as.detector
Index: src/org/jboss/tools/runtime/as/detector/Messages.java
===================================================================
--- src/org/jboss/tools/runtime/as/detector/Messages.java	(revision 36752)
+++ src/org/jboss/tools/runtime/as/detector/Messages.java	(working copy)
@@ -27,6 +27,7 @@
 	public static String JBossRuntimeStartup_JBoss_Application_Server_5_1;
 	public static String JBossRuntimeStartup_JBoss_EAP_Server_4_3;
 	public static String JBossRuntimeStartup_JBoss_EAP_Server_5_0;
+	public static String JBossRuntimeStartup_JBoss_EAP_Server_6_0;
 	public static String JBossRuntimeStartup_Runtime;
 	public static String JBossRuntimeStartup_The_JBoss_AS_Hypersonic_embedded_database;
 	static {
Index: src/org/jboss/tools/runtime/handlers/JBossASHandler.java
===================================================================
--- src/org/jboss/tools/runtime/handlers/JBossASHandler.java	(revision 36752)
+++ src/org/jboss/tools/runtime/handlers/JBossASHandler.java	(working copy)
@@ -63,6 +63,7 @@
 	
 	private static final int JBOSS_AS70_INDEX = 8;
 	private static final int JBOSS_AS71_INDEX = 9;
+	private static final int JBOSS_EAP60_INDEX = 10;
 	private static String[] hasIncludedRuntimes = new String[] {SOA_P, EAP, EPP, EWP, SOA_P_STD};
 	private static final String DROOLS = "DROOLS"; // NON-NLS-1$
 	private static final String ESB = "ESB"; //$NON-NLS-1$
@@ -73,6 +74,10 @@
 		
 	private static File getLocation(ServerDefinition serverDefinition) {
 		String type = serverDefinition.getType();
+		String version = serverDefinition.getVersion();
+		if (EAP.equals(type) && version != null && version.startsWith("6") ) {
+			return serverDefinition.getLocation();
+		}
 		if (SOA_P.equals(type) || EAP.equals(type) || EPP.equals(type)) {
 			return new File(serverDefinition.getLocation(), "jboss-as");
 		}
@@ -103,7 +108,7 @@
 					|| EAP_STD.equals(type)) {
 				String name = serverDefinition.getName();
 				String runtimeName = name + " " + RUNTIME; //$NON-NLS-1$
-				int index = getJBossASVersion(asLocation);
+				int index = getJBossASVersion(asLocation, serverDefinition);
 				createJBossServer(asLocation, index, name, runtimeName);
 			} else if (AS.equals(type)){
 				String version = serverDefinition.getVersion();
@@ -131,9 +136,16 @@
 		}	
 	}
 
-	private static int getJBossASVersion(File asLocation) {
+	private static int getJBossASVersion(File asLocation, ServerDefinition serverDefinition) {
 		int index = -1;
-		String fullVersion = new ServerBeanLoader().getFullServerVersion(new File(asLocation, JBossServerType.AS.getSystemJarPath()));
+		String type = serverDefinition.getType();
+		String ver = serverDefinition.getVersion();
+		String fullVersion;
+		if (EAP.equals(type) && "6.0".equals(ver)) {
+			fullVersion = new ServerBeanLoader().getFullServerVersion(new File(asLocation, JBossServerType.EAP6.getSystemJarPath()));
+		} else {
+			fullVersion = new ServerBeanLoader().getFullServerVersion(new File(asLocation, JBossServerType.AS.getSystemJarPath()));
+		}
 		if(fullVersion != null ) {
 			String version = fullVersion.substring(0, 3);
 			if ("4.3".equals(version)) { //$NON-NLS-1$
@@ -146,6 +158,9 @@
 			} else if ("5.2".equals(version)) { //$NON-NLS-1$
 				// SOA-P 5.2
 				index = 7;
+			} else if ("6.0".equals(version)) { //$NON-NLS-1$
+				// EAP 6.0
+				index = 10;
 			}
 		}
 		return index;
@@ -252,7 +267,7 @@
 			// Don't create the driver a few times
 			return;
 		}
-		if (index == JBOSS_AS70_INDEX || index == JBOSS_AS71_INDEX) {
+		if (index == JBOSS_AS70_INDEX || index == JBOSS_AS71_INDEX || index == JBOSS_EAP60_INDEX) {
 			// AS 7
 			return;
 		}
Index: src/org/jboss/tools/runtime/as/detector/messages.properties
===================================================================
--- src/org/jboss/tools/runtime/as/detector/messages.properties	(revision 36752)
+++ src/org/jboss/tools/runtime/as/detector/messages.properties	(working copy)
@@ -11,5 +11,6 @@
 JBossRuntimeStartup_JBoss_Application_Server_7_1=JBoss Application Server 7.1
 JBossRuntimeStartup_JBoss_EAP_Server_4_3=JBoss EAP Server 4.3
 JBossRuntimeStartup_JBoss_EAP_Server_5_0=JBoss EAP Server 5.0
+JBossRuntimeStartup_JBoss_EAP_Server_6_0=JBoss EAP Server 6.0
 JBossRuntimeStartup_Runtime=Runtime
 JBossRuntimeStartup_The_JBoss_AS_Hypersonic_embedded_database=The JBoss AS Hypersonic embedded database
Index: src/org/jboss/tools/runtime/as/detector/IJBossRuntimePluginConstants.java
===================================================================
--- src/org/jboss/tools/runtime/as/detector/IJBossRuntimePluginConstants.java	(revision 36752)
+++ src/org/jboss/tools/runtime/as/detector/IJBossRuntimePluginConstants.java	(working copy)
@@ -38,7 +38,8 @@
 		"org.jboss.ide.eclipse.as.runtime.eap.43", //$NON-NLS-1$
 		"org.jboss.ide.eclipse.as.runtime.eap.50", //$NON-NLS-1$
 		"org.jboss.ide.eclipse.as.runtime.70", //$NON-NLS-1$
-		"org.jboss.ide.eclipse.as.runtime.71" //$NON-NLS-1$
+		"org.jboss.ide.eclipse.as.runtime.71", //$NON-NLS-1$
+		"org.jboss.ide.eclipse.as.runtime.eap.60"  //$NON-NLS-1$
 		};
 	
 	public static final String HSQLDB_DRIVER_JAR_NAME = "hsqldb.jar"; //$NON-NLS-1$
@@ -69,7 +70,8 @@
 		"org.jboss.ide.eclipse.as.eap.43", //$NON-NLS-1$
 		"org.jboss.ide.eclipse.as.eap.50", //$NON-NLS-1$
 		"org.jboss.ide.eclipse.as.70", //$NON-NLS-1$
-		"org.jboss.ide.eclipse.as.71" //$NON-NLS-1$
+		"org.jboss.ide.eclipse.as.71", //$NON-NLS-1$
+		"org.jboss.ide.eclipse.as.eap.60" //$NON-NLS-1$
 		};
 	
 	public static final String JBOSS_AS_NAME[] = {
@@ -82,7 +84,8 @@
 		Messages.JBossRuntimeStartup_JBoss_EAP_Server_4_3,
 		Messages.JBossRuntimeStartup_JBoss_EAP_Server_5_0,
 		Messages.JBossRuntimeStartup_JBoss_Application_Server_7_0,
-		Messages.JBossRuntimeStartup_JBoss_Application_Server_7_1
+		Messages.JBossRuntimeStartup_JBoss_Application_Server_7_1,
+		Messages.JBossRuntimeStartup_JBoss_EAP_Server_6_0
 		};
 	
 	public static final String JBOSS_AS_HOST = "localhost"; //$NON-NLS-1$
#P org.jboss.ide.eclipse.as.ui
Index: jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java	(revision 36706)
+++ jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java	(working copy)
@@ -683,7 +683,7 @@
 		if( !isEAP() && v.startsWith("7."))
 			v = "7.";
 		if( isEAP() && v.startsWith("6."))
-			v = "7.";
+			v = "6.";
 		if( !isEAP() && v.startsWith("7."))
 			v = "7.";
 
Index: jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeLocator.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeLocator.java	(revision 37360)
+++ jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeLocator.java	(working copy)
@@ -164,9 +164,11 @@
 		String runtimeTypeId = null;
 		if( version.compareTo("5.0") < 0 ) //$NON-NLS-1$
 			runtimeTypeId=IJBossToolingConstants.EAP_43;
-		else 
+		else if( version.compareTo("6.0") < 0 ) //$NON-NLS-1$
 			runtimeTypeId=IJBossToolingConstants.EAP_50;
-		
+		else
+			runtimeTypeId=IJBossToolingConstants.EAP_60
+			;
 		IPath path2 = path.append(IJBossRuntimeResourceConstants.JBOSS_AS_EAP_DIRECTORY);
 		if( runtimeTypeId != null ) {
 			try {
Index: jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7RuntimeWizardFragment.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7RuntimeWizardFragment.java	(revision 37360)
+++ jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7RuntimeWizardFragment.java	(working copy)
@@ -220,11 +220,11 @@
 				TaskModel.TASK_RUNTIME);
 		String adapterVersion = rt.getRuntimeType().getVersion();
 		
-		if(!isEAP() && (adapterVersion.equals("7.0") && !version.startsWith("7.0."))
-				|| (adapterVersion.equals("7.1") && version.startsWith("7.0."))) {
+		if(!isEAP() && ((adapterVersion.equals("7.0") && !version.startsWith("7.0."))
+				|| (adapterVersion.equals("7.1") && version.startsWith("7.0."))) ) {
 			return NLS.bind(Messages.rwf_homeIncorrectVersionError, adapterVersion, version);
 		}
-		if( isEAP() && (adapterVersion.equals("6.0") && !version.startsWith("7.")))
+		if( isEAP() && !adapterVersion.equals("6.0") )
 				return NLS.bind(Messages.rwf_homeIncorrectVersionError, adapterVersion, version);
 		
 		return null;
#P org.jboss.ide.eclipse.as.core
Index: jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java
===================================================================
--- jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java	(revision 37360)
+++ jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java	(working copy)
@@ -34,6 +34,7 @@
 		runtimeServerTypeMap.put(IJBossToolingConstants.AS_70, IJBossToolingConstants.SERVER_AS_70);
 		runtimeServerTypeMap.put(IJBossToolingConstants.EAP_43, IJBossToolingConstants.SERVER_EAP_43);
 		runtimeServerTypeMap.put(IJBossToolingConstants.EAP_50, IJBossToolingConstants.SERVER_EAP_50);
+		runtimeServerTypeMap.put(IJBossToolingConstants.EAP_60, IJBossToolingConstants.SERVER_EAP_60);
 		// NEW_SERVER_ADAPTER Add the server / runtime mapping here 
 	}
 	
Index: jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java
===================================================================
--- jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java	(revision 37360)
+++ jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java	(working copy)
@@ -91,6 +91,10 @@
 				ZipEntry manifest = jar.getEntry("META-INF/MANIFEST.MF");//$NON-NLS-1$
 				Properties props = new Properties();
 				props.load(jar.getInputStream(manifest));
+				version = props.getProperty("JBossEAP-Release-Version"); //$NON-NLS-1$
+				if (version != null) {
+					return version;
+				}
 				version = (String)props.get("Specification-Version");//$NON-NLS-1$
 			} catch (IOException e) {
 				// version = ""
#P org.jboss.ide.eclipse.as.classpath.core
Index: src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java
===================================================================
--- src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java	(revision 37323)
+++ src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java	(working copy)
@@ -100,6 +100,8 @@
 			return getDefaultAS70Entries();
 		if(AS_71.equals(type.getId()))
 			return getDefaultAS71Entries();
+		if(EAP_60.equals(type.getId()))
+			return getDefaultAS71Entries();
 		
 		// NEW_SERVER_ADAPTER add logic for new adapter here
 		return new IDefaultPathProvider[]{};
