[jbosstools-commits] JBoss Tools SVN: r43742 - in trunk: as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling and 15 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Sep 17 02:58:51 EDT 2012


Author: rob.stryker at jboss.com
Date: 2012-09-17 02:58:50 -0400 (Mon, 17 Sep 2012)
New Revision: 43742

Added:
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ModuleResourceUtil.java
Modified:
   trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/WebPortPoller.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServer.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/AbstractLaunchConfigurator.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management/AS7ManagementDetails.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ProgressMonitorUtil.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXUtil.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/SecurityFailureHandler.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBossStartLaunchDelegate.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/AbstractOpenBrowserServerAction.java
   trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInJMXConsoleActionProvider.java
   trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/utiltests/ConfigNameResolverTest.java
   trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java
   trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java
Log:
JBIDE-12613 introduction of ijbossserver interface

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -18,7 +18,6 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.QualifiedName;
 import org.eclipse.core.runtime.Status;
@@ -30,8 +29,8 @@
 import org.eclipse.wst.server.core.ServerCore;
 import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
 import org.jboss.ide.eclipse.as.classpath.core.Messages;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
 
 /**
@@ -47,7 +46,7 @@
          "org.jboss.ide.eclipse.ejb3.wizards.core.classpath", "jboss-ejb3-configuration"); //$NON-NLS-1$ //$NON-NLS-2$
 
    protected IJavaProject javaProject;
-   protected JBossServer jbossServer;
+   protected IJBossServer jbossServer;
    protected IPath path;
 
    protected IPath configPath = new Path(""); //$NON-NLS-1$
@@ -106,11 +105,11 @@
 	   return Messages.EJB3ClasspathContainer_ejb30_description;
    }
 
-   public JBossServer getJBossServer() {
+   public IJBossServer getJBossServer() {
       return jbossServer;
    }
 
-   public void setJBossServer(JBossServer jbossServer) {
+   public void setJBossServer(IJBossServer jbossServer) {
       this.jbossServer = jbossServer;
    }
 

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/WebPortPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/WebPortPoller.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/WebPortPoller.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -26,9 +26,9 @@
 import org.eclipse.wst.server.core.IServer;
 import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
 import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IServerStatePoller2;
 import org.jboss.ide.eclipse.as.core.server.IServerStatePollerType;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
 import org.jboss.ide.eclipse.as.core.util.ServerUtil;
 
@@ -78,7 +78,7 @@
 		// v6_safe
 		String host2 = ServerUtil.formatPossibleIpv6Address(server.getHost());
 		String url = "http://"+host2; //$NON-NLS-1$
-		JBossServer jbs = ServerConverter.getJBossServer(server);
+		IJBossServer jbs = ServerConverter.getJBossServer(server);
 		int port = jbs.getJBossWebPort();
 		url += ":" + port; //$NON-NLS-1$
 		return url;

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -12,26 +12,16 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.project.facet.core.util.internal.ProgressMonitorUtil;
 import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.internal.DeletedModule;
-import org.eclipse.wst.server.core.model.IModuleFile;
 import org.eclipse.wst.server.core.model.IModuleFolder;
 import org.eclipse.wst.server.core.model.IModuleResource;
-import org.eclipse.wst.server.core.model.IModuleResourceDelta;
-import org.eclipse.wst.server.core.model.ModuleDelegate;
 import org.eclipse.wst.server.core.util.ProjectModule;
 import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
 import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
@@ -45,22 +35,9 @@
 import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentTypePrefs;
 import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
 import org.jboss.ide.eclipse.as.core.util.IWTPConstants;
+import org.jboss.ide.eclipse.as.core.util.ModuleResourceUtil;
 
-public class PublishUtil {
-	public static int countChanges(IModuleResourceDelta[] deltas) {
-		IModuleResource res;
-		int count = 0;
-		if( deltas == null ) return 0;
-		for( int i = 0; i < deltas.length; i++ ) {
-			res = deltas[i].getModuleResource();
-			if( res != null && res instanceof IModuleFile)
-				count++;
-			count += countChanges(deltas[i].getAffectedChildren());
-		}
-		return count;
-	}
-
-
+public class PublishUtil extends ModuleResourceUtil {
 	/**
 	 * All preferences are stored in the "local" setting as it was decided
 	 * having to replicate deploy paths for each publish method was not good
@@ -159,50 +136,6 @@
 		return root;
 	}
 	
-	/*
-	 * This method is deprecated. Please use the following:
-	 * @see getDeployPath(IModule[] module, String folder, IDeployableServer server)
-	 * @param moduleTree
-	 * @param deployFolder
-	 * @return
-	 */
-	// @Deprecated 
-	//public static IPath getDeployPath(IModule[] moduleTree, String deployFolder);
-	
-	private static String getParentRelativeURI(IModule[] tree, int index, String defaultName) {
-		if( index != 0 ) {
-			IEnterpriseApplication parent = (IEnterpriseApplication)tree[index-1].loadAdapter(IEnterpriseApplication.class, null);
-			if( parent != null ) {
-				String uri = parent.getURI(tree[index]);
-				if(uri != null )
-					return uri;
-			}
-			// TODO if we make our own "enterprise app" interface, do that here
-		} 
-		// return name with extension
-		return defaultName;
-
-	}
-	
-	private static ArrayList<String> moduleCoreFactories = new ArrayList<String>();
-	static {
-		moduleCoreFactories.add("org.eclipse.jst.j2ee.server"); //$NON-NLS-1$
-		moduleCoreFactories.add("org.eclipse.jst.jee.server"); //$NON-NLS-1$
-	}
-	public static void addModuleCoreFactory(String s) {
-		if( !moduleCoreFactories.contains(s))
-			moduleCoreFactories.add(s);
-	}
-	public static boolean isModuleCoreProject(IModule[] module) {
-		IModule lastmod = module[module.length-1];
-		if( lastmod.getProject() == null && lastmod instanceof DeletedModule) {
-			int colon = lastmod.getId().indexOf(':');
-			String factory = lastmod.getId().substring(0,colon == -1 ? lastmod.getId().length() : colon);
-			return moduleCoreFactories.contains(factory);
-		}
-		return ModuleCoreNature.isFlexibleProject(lastmod.getProject());
-	}
-
 	public static IPath getDeployPath(IJBossServerPublishMethod method, IModule[] moduleTree, IDeployableServer server) {
 		String defaultFolder = method.getPublishDefaultRootFolder(server.getServer());
 		String folder = PublishUtil.getDeployRootFolder(
@@ -247,32 +180,7 @@
 		return suffix;
 	}
 	
-	public static IModuleResource[] getResources(IModule module, IProgressMonitor monitor) throws CoreException {
-		monitor.beginTask("Fetching Module Resources", 100); //$NON-NLS-1$
-		ModuleDelegate md = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, ProgressMonitorUtil.submon(monitor, 100));
-		if( md == null ) {
-			// Deleted Module, TODO handle this differently!
-			return new IModuleResource[]{};
-		}
-		IModuleResource[] members = md.members();
-		monitor.done();
-		return members;
-	}
 	
-	public static IModuleResource[] getResources(IModule[] tree) throws CoreException {
-		return getResources(tree[tree.length-1], new NullProgressMonitor());
-	}
-	
-	public static File getFile(IModuleResource resource) {
-		File source = (File)resource.getAdapter(File.class);
-		if( source == null ) {
-			IFile ifile = (IFile)resource.getAdapter(IFile.class);
-			if( ifile != null ) 
-				source = ifile.getLocation().toFile();
-		}
-		return source;
-	}
-	
 	public static boolean deployPackaged(IModule[] moduleTree) {
 		String moduleTypeId = moduleTree[moduleTree.length-1].getModuleType().getId(); 
 		if( moduleTypeId.equals(IWTPConstants.FACET_UTILITY)) {
@@ -289,13 +197,6 @@
 		}
 		return false;
 	}
-	public static java.io.File getFile(IModuleFile mf) {
-		return (IFile)mf.getAdapter(IFile.class) != null ? 
-					((IFile)mf.getAdapter(IFile.class)).getLocation().toFile() :
-						(java.io.File)mf.getAdapter(java.io.File.class);
-	}
-	
-	
 	/*
 	 * Just package into a jar raw.  Don't think about it, just do it
 	 */
@@ -374,12 +275,4 @@
 			}
 		}
 	}
-	
-	public static IModule[] combine(IModule[] module, IModule newMod) {
-		IModule[] retval = new IModule[module.length + 1];
-		for( int i = 0; i < module.length; i++ )
-			retval[i]=module[i];
-		retval[retval.length-1] = newMod;
-		return retval;
-	}	
 }

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServer.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServer.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -1,5 +1,10 @@
 package org.jboss.ide.eclipse.as.core.server;
 
 public interface IJBossServer extends IDeployableServer {
+	public String getHost();
+	public String getUsername();
+	public String getPassword();
+	public int getJNDIPort();
+	public int getJBossWebPort();
 	public IJBossServerRuntime getRuntime();
 }

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/AbstractLaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/AbstractLaunchConfigurator.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/AbstractLaunchConfigurator.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -15,6 +15,7 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
 import org.jboss.ide.eclipse.as.core.server.ILaunchConfigConfigurator;
 import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -27,7 +28,7 @@
 
 	private static final String DEFAULTS_SET = "DEFAULTS_SET"; //$NON-NLS-1$
 
-	private JBossServer jbossServer;
+	private IJBossServer jbossServer;
 	private IJBossServerRuntime jbossRuntime;
 
 	public AbstractLaunchConfigurator(IServer server) throws CoreException {
@@ -38,11 +39,11 @@
 	@Override
 	public void configure(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
 		if (!areDefaultsSet(launchConfig)) {
-			doConfigure(launchConfig, jbossServer, jbossRuntime);
+			doConfigure(launchConfig, (JBossServer)jbossServer, jbossRuntime);
 			setDefaultsSet(launchConfig);
 		} 
 		if( shouldUpdateLaunch(launchConfig)){
-			doOverrides(launchConfig, jbossServer, jbossRuntime);
+			doOverrides(launchConfig, (JBossServer)jbossServer, jbossRuntime);
 		}
 	}
 
@@ -67,7 +68,7 @@
 		return false;
 	}
 
-	protected JBossServer getJbossServer() {
+	protected IJBossServer getJbossServer() {
 		return jbossServer;
 	}
 

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -25,6 +25,7 @@
 import org.jboss.ide.eclipse.as.core.Messages;
 import org.jboss.ide.eclipse.as.core.Trace;
 import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
 import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties;
@@ -141,7 +142,7 @@
 	}
 	
 	protected String[] getDeployLocationFolders(IServer server) {
-		JBossServer ds = ServerConverter.getJBossServer(server);
+		JBossServer ds = (JBossServer)ServerConverter.getJBossServer(server);
 		ArrayList<String> folders = new ArrayList<String>();
 		// add the server folder deploy loc. first
 		String insideServer = ds.getDeployFolder(JBossServer.DEPLOY_SERVER);

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management/AS7ManagementDetails.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management/AS7ManagementDetails.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management/AS7ManagementDetails.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -16,8 +16,8 @@
 
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IServerProvider;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7Server;
 import org.jboss.ide.eclipse.as.core.util.PollThreadUtils;
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
@@ -52,7 +52,7 @@
 	public String[] handleCallbacks(String[] prompts) throws UnsupportedOperationException {
 		ArrayList<String> requiredProperties = new ArrayList<String>();
 		requiredProperties.addAll(Arrays.asList(prompts));
-		JBossServer jbs = ServerConverter.getJBossServer(server);
+		IJBossServer jbs = ServerConverter.getJBossServer(server);
 		boolean emptyCreds = 
 				(jbs.getUsername() == null || jbs.getUsername().equals("")) //$NON-NLS-1$
 				&& (jbs.getPassword() == null || jbs.getPassword().equals("")); //$NON-NLS-1$

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -160,7 +160,6 @@
 	
 	public static IServer checkedGetServer(ILaunchConfiguration launchConfig) throws CoreException {
 		String serverId = new JBossLaunchConfigProperties().getServerId(launchConfig);
-		JBossServer server = ServerConverter.checkedFindJBossServer(serverId);
-		return server.getServer();
+		return ServerConverter.findServer(serverId);
 	}
 }

Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ModuleResourceUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ModuleResourceUtil.java	                        (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ModuleResourceUtil.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -0,0 +1,87 @@
+package org.jboss.ide.eclipse.as.core.util;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jst.server.core.IEnterpriseApplication;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.model.IModuleFile;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+
+public class ModuleResourceUtil {
+	public static int countChanges(IModuleResourceDelta[] deltas) {
+		IModuleResource res;
+		int count = 0;
+		if( deltas == null ) return 0;
+		for( int i = 0; i < deltas.length; i++ ) {
+			res = deltas[i].getModuleResource();
+			if( res != null && res instanceof IModuleFile)
+				count++;
+			count += countChanges(deltas[i].getAffectedChildren());
+		}
+		return count;
+	}
+	
+	public static String getParentRelativeURI(IModule[] tree, int index, String defaultName) {
+		if( index != 0 ) {
+			IEnterpriseApplication parent = (IEnterpriseApplication)tree[index-1].loadAdapter(IEnterpriseApplication.class, null);
+			if( parent != null ) {
+				String uri = parent.getURI(tree[index]);
+				if(uri != null )
+					return uri;
+			}
+			// TODO if we make our own "enterprise app" interface, do that here
+		} 
+		// return name with extension
+		return defaultName;
+
+	}
+	
+
+	public static IModuleResource[] getResources(IModule module, IProgressMonitor monitor) throws CoreException {
+		monitor.beginTask("Fetching Module Resources", 100); //$NON-NLS-1$
+		ModuleDelegate md = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, 
+				ProgressMonitorUtil.submon(monitor, 100));
+		if( md == null ) {
+			// Deleted Module, TODO handle this differently!
+			return new IModuleResource[]{};
+		}
+		IModuleResource[] members = md.members();
+		monitor.done();
+		return members;
+	}
+	
+	public static IModuleResource[] getResources(IModule[] tree) throws CoreException {
+		return getResources(tree[tree.length-1], new NullProgressMonitor());
+	}
+	
+	public static File getFile(IModuleResource resource) {
+		File source = (File)resource.getAdapter(File.class);
+		if( source == null ) {
+			IFile ifile = (IFile)resource.getAdapter(IFile.class);
+			if( ifile != null ) 
+				source = ifile.getLocation().toFile();
+		}
+		return source;
+	}
+
+	public static java.io.File getFile(IModuleFile mf) {
+		return (IFile)mf.getAdapter(IFile.class) != null ? 
+					((IFile)mf.getAdapter(IFile.class)).getLocation().toFile() :
+						(java.io.File)mf.getAdapter(java.io.File.class);
+	}
+	
+	
+	public static IModule[] combine(IModule[] module, IModule newMod) {
+		IModule[] retval = new IModule[module.length + 1];
+		for( int i = 0; i < module.length; i++ )
+			retval[i]=module[i];
+		retval[retval.length-1] = newMod;
+		return retval;
+	}	
+}

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -19,6 +19,7 @@
 import org.jboss.ide.eclipse.as.core.Trace;
 import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
 import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.INeedCredentials;
 import org.jboss.ide.eclipse.as.core.server.IPollResultListener;
 import org.jboss.ide.eclipse.as.core.server.IProvideCredentials;
@@ -26,7 +27,6 @@
 import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
 import org.jboss.ide.eclipse.as.core.server.IServerStatePoller2;
 import org.jboss.ide.eclipse.as.core.server.IServerStatePollerType;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
 import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
 
@@ -45,7 +45,7 @@
 	 * @return
 	 */
 	public static String getPollerId(boolean expectedState, IServer server) {
-		JBossServer s = ServerConverter.getJBossServer(server);
+		IJBossServer s = ServerConverter.getJBossServer(server);
 		ServerAttributeHelper helper = s.getAttributeHelper();
 		String key = expectedState == IServerStatePoller.SERVER_UP ?
 				IJBossToolingConstants.STARTUP_POLLER_KEY

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ProgressMonitorUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ProgressMonitorUtil.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ProgressMonitorUtil.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -26,4 +26,29 @@
 			return new NullProgressMonitor();
 		return monitor;
 	}
-}
+	
+	   
+    public static IProgressMonitor submon( final IProgressMonitor parent,
+                                           final int ticks ) {
+        return submon( parent, ticks, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL );
+    }
+
+    public static IProgressMonitor submon( final IProgressMonitor parent,
+                                           final int ticks, final int style ) {
+        return ( parent == null ? new NullProgressMonitor() : new SubProgressMonitor( parent, ticks, style ) );
+    }
+    
+    public static void subTask( final IProgressMonitor monitor,
+                                final String taskName ) {
+        if( monitor != null ) {
+            monitor.subTask( taskName );
+        }
+    }
+    
+    public static void checkIfCanceled( final IProgressMonitor monitor )
+        throws InterruptedException  {
+        if( monitor != null && monitor.isCanceled() ) {
+            throw new InterruptedException();
+        }
+    }
+}
\ No newline at end of file

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -26,6 +26,7 @@
 import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
 import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
 import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.v7.DelegatingJBoss7ServerBehavior;
 
@@ -36,9 +37,15 @@
  */
 public class ServerConverter {
 
-	public static JBossServer findJBossServer(String serverId) throws CoreException {
+	public static IServer findServer(String serverId) {
 		if (serverId == null)
 			return null;
+		return ServerCore.findServer(serverId);
+	}
+	
+	public static IJBossServer findJBossServer(String serverId) throws CoreException {
+		if (serverId == null)
+			return null;
 
 		IServer s = ServerCore.findServer(serverId);
 		if (s == null)
@@ -46,8 +53,8 @@
 		return getJBossServer(s);
 	}
 
-	public static JBossServer checkedFindJBossServer(String serverId) throws CoreException {
-		JBossServer server = findJBossServer(serverId);
+	public static IJBossServer checkedFindJBossServer(String serverId) throws CoreException {
+		IJBossServer server = findJBossServer(serverId);
 		if (server == null) {
 			throw new CoreException(
 					new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
@@ -80,15 +87,15 @@
 		return adaptedServer;
 	}
 	
-	public static JBossServer getJBossServer(IServer server) {
+	public static IJBossServer getJBossServer(IServer server) {
 		return convertServer(server, JBossServer.class);
 	}
 
-	public static JBossServer checkedGetJBossServer(IServer server) throws CoreException {
+	public static IJBossServer checkedGetJBossServer(IServer server) throws CoreException {
 		return checkedConvertServer(server, JBossServer.class);
 	}
 
-	public static JBossServer getJBossServer(IServerWorkingCopy server) {
+	public static IJBossServer getJBossServer(IServerWorkingCopy server) {
 		return convertServer(server, JBossServer.class);
 	}
 
@@ -113,7 +120,7 @@
 	 * @return
 	 */
 	public static JBossServer[] getAllJBossServers() {
-		ArrayList<JBossServer> servers = new ArrayList<JBossServer>();
+		ArrayList<IJBossServer> servers = new ArrayList<IJBossServer>();
 		IServer[] iservers = ServerCore.getServers();
 		for (int i = 0; i < iservers.length; i++) {
 			if (getJBossServer(iservers[i]) != null) {

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXUtil.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXUtil.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -17,8 +17,8 @@
 import java.util.Properties;
 
 import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
 
 /**
@@ -105,7 +105,7 @@
 	}
 
 	public static Properties getDefaultProperties(IServer server) {
-		JBossServer jbs = ServerConverter.getJBossServer(server);
+		IJBossServer jbs = ServerConverter.getJBossServer(server);
 		Properties props = new Properties();
 		if( jbs != null ) {
 			

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/SecurityFailureHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/SecurityFailureHandler.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/SecurityFailureHandler.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -13,9 +13,9 @@
 import java.util.List;
 
 import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IProvideCredentials;
 import org.jboss.ide.eclipse.as.core.server.IServerProvider;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
 import org.jboss.ide.eclipse.as.ui.launch.UserPassCredentialProvider;
 
@@ -32,7 +32,7 @@
 		if( requiredProperties.size() > 2)
 			return false;
 		IServer s = serverProvider.getServer();
-		JBossServer jbs = ServerConverter.getJBossServer(s);
+		IJBossServer jbs = ServerConverter.getJBossServer(s);
 		if( jbs != null && jbs.hasJMXProvider())
 			return true;
 		return false;

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -17,6 +17,7 @@
 import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.IServerType;
 import org.eclipse.wst.server.core.internal.Base;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
 import org.jboss.ide.eclipse.as.core.server.ILaunchConfigConfigurator;
 import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -34,7 +35,7 @@
  */
 public class RSEJBoss7LaunchConfigurator implements ILaunchConfigConfigurator {
 
-	private JBossServer jbossServer;
+	private IJBossServer jbossServer;
 	private IJBossServerRuntime jbossRuntime;
 
 	public RSEJBoss7LaunchConfigurator(IServer server) throws CoreException {
@@ -47,7 +48,7 @@
 
 		boolean detectStartupCommand = RSELaunchConfigProperties.isDetectStartupCommand(launchConfig, true);
 		String currentStartupCmd = RSELaunchConfigProperties.getStartupCommand(launchConfig);
-		String defaultStartup = getLaunchCommand(jbossServer, jbossRuntime);
+		String defaultStartup = getLaunchCommand((JBossServer)jbossServer, jbossRuntime);
 		if( detectStartupCommand || !isSet(currentStartupCmd)) {
 			RSELaunchConfigProperties.setStartupCommand(defaultStartup, launchConfig);
 		}
@@ -55,7 +56,7 @@
 		
 		boolean detectShutdownCommand = RSELaunchConfigProperties.isDetectShutdownCommand(launchConfig, true);
 		String currentShutdownCmd = RSELaunchConfigProperties.getShutdownCommand(launchConfig);
-		String defaultShutdownCommand = getShutdownCommand(jbossServer, jbossRuntime);
+		String defaultShutdownCommand = getShutdownCommand((JBossServer)jbossServer, jbossRuntime);
 		if( detectShutdownCommand || !isSet(currentShutdownCmd)) {
 			RSELaunchConfigProperties.setShutdownCommand(defaultShutdownCommand, launchConfig);
 		}

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBossStartLaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBossStartLaunchDelegate.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBossStartLaunchDelegate.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -24,8 +24,8 @@
 import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
 import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
 import org.jboss.ide.eclipse.as.core.server.IJBossBehaviourDelegate;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties;
 import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
 import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
@@ -99,7 +99,7 @@
 
 	private String getDefaultLaunchCommand(ILaunchConfiguration config) throws CoreException {
 		String serverId = new JBossLaunchConfigProperties().getServerId(config);
-		JBossServer jbossServer = ServerConverter.checkedFindJBossServer(serverId);
+		IJBossServer jbossServer = ServerConverter.checkedFindJBossServer(serverId);
 		String rseHome = jbossServer.getServer().getAttribute(RSEUtils.RSE_SERVER_HOME_DIR, "");
 		// initialize startup command to something reasonable
 		String currentArgs = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -64,9 +64,9 @@
 import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
 import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
 import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7ManagerServicePoller;
 import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
 import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
@@ -135,7 +135,7 @@
 		RSEDeploymentPreferenceComposite composite = null;
 		
 		IServerWorkingCopy cServer = callback.getServer();
-		JBossServer jbs = cServer.getOriginal() == null ? 
+		IJBossServer jbs = cServer.getOriginal() == null ? 
 				ServerConverter.getJBossServer(cServer) :
 					ServerConverter.getJBossServer(cServer.getOriginal());
 		if( jbs == null )

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -64,9 +64,9 @@
 import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
 import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
 import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
 import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties;
 import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentModulePrefs;
@@ -454,7 +454,7 @@
 		
 		
 		if(showTempAndDeployTexts()) {
-			JBossServer jbs = ServerConverter.getJBossServer(page.getServer().getOriginal());
+			IJBossServer jbs = ServerConverter.getJBossServer(page.getServer().getOriginal());
 			String newDir = getHelper().getAttribute(IDeployableServer.DEPLOY_DIRECTORY, 
 					jbs == null ? "" : jbs.getDeployFolder()); //$NON-NLS-1$
 			String newTemp = getHelper().getAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, 

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -132,7 +132,7 @@
 	 * @param monitor the progress monitor for the save operation.
 	 */
 	public void doSave(IProgressMonitor monitor) {
-		JBossServer jbs = ServerConverter.getJBossServer(server.getOriginal());
+		JBossServer jbs = (JBossServer)ServerConverter.getJBossServer(server.getOriginal());
 		jbs.setPassword(passwordString);
 		monitor.worked(100);
 	}

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -19,6 +19,7 @@
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.INeedCredentials;
 import org.jboss.ide.eclipse.as.core.server.IProvideCredentials;
 import org.jboss.ide.eclipse.as.core.server.IServerProvider;
@@ -40,7 +41,7 @@
 		if( requiredProperties.size() > 2)
 			return false;
 		IServer s = serverProvider.getServer();
-		JBossServer jbs = ServerConverter.getJBossServer(s);
+		IJBossServer jbs = ServerConverter.getJBossServer(s);
 		if( jbs != null && !jbs.hasJMXProvider())
 			return true;
 		return false;
@@ -57,7 +58,7 @@
 			public void run() {
 				IServer server = inNeed.getServer();
 				IServerWorkingCopy copy = server.createWorkingCopy();
-				JBossServer jbs = ServerConverter.getJBossServer(copy);
+				JBossServer jbs = (JBossServer)ServerConverter.getJBossServer(copy);
 				String initialUser = jbs.getUsername();
 				String initialPass = jbs.getPassword();
 				RequiredCredentialsDialog d = new RequiredCredentialsDialog(

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/AbstractOpenBrowserServerAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/AbstractOpenBrowserServerAction.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/AbstractOpenBrowserServerAction.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -25,7 +25,6 @@
 import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
 import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.ui.internal.view.servers.AbstractServerAction;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
 import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
 import org.jboss.ide.eclipse.as.ui.Messages;
@@ -54,12 +53,7 @@
 	
 	protected boolean shouldAddForSelection(IStructuredSelection sel) {
 		IServer server = getSingleServer(sel);
-		if( server != null ) {
-			JBossServer jbs = ServerConverter.getJBossServer(server);
-			if( jbs != null )
-				return true;
-		}
-		return false;
+		return server != null && ServerConverter.getJBossServer(server) != null; 
 	}
 	
 	protected IServer getSingleServer(IStructuredSelection sel) {

Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInJMXConsoleActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInJMXConsoleActionProvider.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInJMXConsoleActionProvider.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -13,6 +13,7 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
 import org.jboss.ide.eclipse.as.core.util.ServerUtil;
@@ -28,7 +29,7 @@
 	protected boolean shouldAddForSelection(IStructuredSelection sel) {
 		IServer server = getSingleServer(sel);
 		if( server != null ) {
-			JBossServer jbs = ServerConverter.getJBossServer(server);
+			IJBossServer jbs = ServerConverter.getJBossServer(server);
 			if( jbs != null ) {
 				// TODO fix this so anything BELOW 7 works
 				// need new util methods

Modified: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/utiltests/ConfigNameResolverTest.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/utiltests/ConfigNameResolverTest.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/utiltests/ConfigNameResolverTest.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -7,7 +7,7 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.wst.server.core.IServer;
 import org.jboss.ide.eclipse.as.core.resolvers.ConfigNameResolver;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServer;
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
 import org.jboss.ide.eclipse.as.core.util.ServerUtil;
 import org.jboss.tools.as.test.core.internal.utils.ServerCreationTestUtils;
@@ -55,7 +55,7 @@
 		for( int i = 0; i < vars.length; i++ ) {
 			String var = ConfigNameResolver.getVariablePattern(vars[i]);
 			String result = new ConfigNameResolver().performSubstitutions(var, server.getName());
-			JBossServer jbs = ServerConverter.getJBossServer(server);
+			IJBossServer jbs = ServerConverter.getJBossServer(server);
 			if( jbs == null ) {
 				assertEquals("", result);
 			} else  if( vars[i].equals(ConfigNameResolver.JBOSS_CONFIG))

Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -17,7 +17,6 @@
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.wst.common.componentcore.internal.util.VirtualReferenceUtilities;
-import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
 import org.jboss.tools.esb.core.runtime.JBossRuntimeManager;
 import org.osgi.framework.BundleContext;
 
@@ -47,7 +46,6 @@
 		super.start(context);
 		plugin = this;
 		JBossRuntimeManager.loadParsers();
-		PublishUtil.addModuleCoreFactory("org.jboss.tools.esb.project.core.moduleFactory");
 		Job job = new Job("ESB Facet Framework Initialization") { //$NON-NLS-1$
 			protected IStatus run(IProgressMonitor monitor) {
 				VirtualReferenceUtilities.INSTANCE.addDefaultExtension(ESBProjectConstant.ESB_PROJECT_FACET, ESBProjectConstant.ESB_EXTENSION);

Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java	2012-09-17 05:10:25 UTC (rev 43741)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java	2012-09-17 06:58:50 UTC (rev 43742)
@@ -21,7 +21,7 @@
 import org.eclipse.wst.server.core.IServerWorkingCopy;
 import org.eclipse.wst.server.core.ServerUtil;
 import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
 import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
 import org.jboss.ide.eclipse.as.test.ASTest;
 import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
@@ -97,11 +97,11 @@
 	
 	public IStatus publishWebProject(IProject project) throws CoreException {
 		IModule mod = ServerUtil.getModule(project);
-		JBossServer ds = (JBossServer)currentServer.loadAdapter(JBossServer.class, new NullProgressMonitor());
+		IDeployableServer ds = (IDeployableServer)currentServer.loadAdapter(IDeployableServer.class, new NullProgressMonitor());
 		IServerWorkingCopy copy = currentServer.createWorkingCopy();
 		copy.modifyModules(new IModule[]{mod}, new IModule[0], new NullProgressMonitor());
 		currentServer = copy.save(true, new NullProgressMonitor());
-		ds = (JBossServer)currentServer.loadAdapter(JBossServer.class, new NullProgressMonitor());
+		ds = (IDeployableServer)currentServer.loadAdapter(IDeployableServer.class, new NullProgressMonitor());
 		ds.setDeployLocationType("server");
 		IStatus status = ServerRuntimeUtils.publish(IServer.PUBLISH_INCREMENTAL,currentServer);
 		return status;



More information about the jbosstools-commits mailing list