Index: plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java	(revision 42986)
+++ plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java	(working copy)
@@ -51,6 +51,12 @@
 	public static String JBossRuntimeWizardFragment_DeleteConfigTitle;
 	public static String JBossRuntimeWizardFragment_MustSelectValidConfig;
 	public static String JBossRuntimeWizardFragment_OutputFolderExists;
+	public static String rwf_DownloadRuntime;
+	public static String rwf_InstallingRuntimeJob;
+	public static String rwf_DownloadAndInstallRuntimeWizard;
+	public static String rwf_DownloadingMayTakeLongTime;
+	public static String rwf_DownloadServerFileChooser;
+	public static String rwf_InstallingASTitle;
 	public static String rwf_CopyConfigLabel;
 	public static String rwf_DestinationLabel;
 	public static String rwf_JBossRuntime;
Index: plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties	(revision 42986)
+++ plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties	(working copy)
@@ -9,6 +9,12 @@
 wf_JRELabel=JRE
 wf_ExecEnvironmentLabel=Execution Environment
 wf_ConfigLabel=Configuration
+rwf_DownloadRuntime=Download and install runtime...
+rwf_InstallingRuntimeJob=Downloading and Installing {0}
+rwf_DownloadAndInstallRuntimeWizard=Download and Install JBoss Runtime
+rwf_DownloadingMayTakeLongTime=The application server is being downloaded and unzipped into {0}. This may take a significant amount of time. You may create a new runtime in this wizard after the installation job is complete. This wizard will now close.
+rwf_DownloadServerFileChooser=Please select the folder to install the application server into.
+rwf_InstallingASTitle=Installing JBoss Application Server 
 rwf_CopyConfigLabel=Copy configuration "{0}" to a new destination from "{1}".
 rwf_DestinationLabel=Destination
 rwf_JBossRuntime=JBoss Runtime
Index: plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java	(revision 42986)
+++ plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java	(working copy)
@@ -17,9 +17,14 @@
 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.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.jdt.launching.IVMInstall;
@@ -37,6 +42,8 @@
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
@@ -56,6 +63,7 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
@@ -66,16 +74,18 @@
 import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
 import org.eclipse.wst.server.core.ServerCore;
 import org.eclipse.wst.server.core.TaskModel;
+import org.eclipse.wst.server.core.internal.IInstallableRuntime;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
+import org.eclipse.wst.server.ui.internal.wizard.TaskWizard;
+import org.eclipse.wst.server.ui.internal.wizard.fragment.LicenseWizardFragment;
 import org.eclipse.wst.server.ui.wizard.IWizardHandle;
 import org.eclipse.wst.server.ui.wizard.WizardFragment;
 import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
 import org.jboss.ide.eclipse.as.core.server.bean.JBossServerType;
 import org.jboss.ide.eclipse.as.core.server.bean.ServerBeanLoader;
 import org.jboss.ide.eclipse.as.core.server.internal.AbstractLocalJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
 import org.jboss.ide.eclipse.as.core.util.FileUtil;
 import org.jboss.ide.eclipse.as.core.util.IConstants;
-import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
 import org.jboss.ide.eclipse.as.core.util.RuntimeUtils;
 import org.jboss.ide.eclipse.as.ui.IPreferenceKeys;
 import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
@@ -100,6 +110,7 @@
 	protected int jreComboIndex;
 	protected Button homeDirButton, jreButton;
 	protected Composite nameComposite, homeDirComposite, jreComposite;
+	protected Button downloadAndInstallButton;
 	protected String name, homeDir;
 
 	// Configuration stuff
@@ -334,6 +345,12 @@
 		homeDirButton = new Button(homeDirComposite, SWT.NONE);
 		homeDirButton.setText(Messages.browse);
 
+		downloadAndInstallButton = new Button(homeDirComposite, SWT.NONE);
+		downloadAndInstallButton.setText(Messages.rwf_DownloadRuntime);
+		downloadAndInstallButton.addSelectionListener(new DownloadAndInstallListener());
+		final IInstallableRuntime ir = ServerPlugin.findInstallableRuntime(getRuntimeType().getId());
+		downloadAndInstallButton.setEnabled(ir != null);
+		
 		// Add listeners
 		homeDirText.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
@@ -354,23 +371,84 @@
 		});
 
 		// Set Layout Data
-		FormData labelData = new FormData();
-		FormData textData = new FormData();
-		FormData buttonData = new FormData();
+		homeDirLabel.setLayoutData(UIUtil.createFormData2(null,0,homeDirText,-5,0,5,null,0));
+		homeDirText.setLayoutData(UIUtil.createFormData2(homeDirLabel,5,null,0,0,5,homeDirButton,-5));
+		homeDirButton.setLayoutData(UIUtil.createFormData2(homeDirLabel,5,null,0,null,0,100,0));
+		downloadAndInstallButton.setLayoutData(UIUtil.createFormData2(0,0,homeDirButton,-5,null,0,100,-5));
+	}
 
-		labelData.left = new FormAttachment(0, 0);
-		homeDirLabel.setLayoutData(labelData);
-
-		textData.left = new FormAttachment(0, 5);
-		textData.right = new FormAttachment(homeDirButton, -5);
-		textData.top = new FormAttachment(homeDirLabel, 5);
-		homeDirText.setLayoutData(textData);
-
-		buttonData.top = new FormAttachment(homeDirLabel, 5);
-		buttonData.right = new FormAttachment(100, 0);
-		homeDirButton.setLayoutData(buttonData);
+	protected class DownloadAndInstallListener extends SelectionAdapter {
+		public void widgetSelected(SelectionEvent se) {
+			downloadAndInstallButton.setEnabled(false);
+			String license = null;
+			final IInstallableRuntime ir = ServerPlugin.findInstallableRuntime(getRuntimeType().getId());
+			
+			try {
+				license = ir.getLicense(new NullProgressMonitor());
+			} catch (CoreException e) {
+			}
+			TaskModel taskModel = new TaskModel();
+			taskModel.putObject(LicenseWizardFragment.LICENSE, license);
+			TaskWizard wizard2 = new TaskWizard(Messages.rwf_DownloadAndInstallRuntimeWizard, new WizardFragment() {
+				protected void createChildFragments(List list) {
+					list.add(new LicenseWizardFragment());
+				}
+			}, taskModel);
+			
+			WizardDialog dialog2 = new WizardDialog(downloadAndInstallButton.getShell(), wizard2);
+			if (dialog2.open() == Window.CANCEL) {
+				downloadAndInstallButton.setEnabled(true);
+				return;
+			}
+			DirectoryDialog dialog = new DirectoryDialog(downloadAndInstallButton.getShell());
+			dialog.setMessage(Messages.rwf_DownloadServerFileChooser);
+			dialog.setFilterPath(homeDirText.getText());
+			String selectedDirectory = dialog.open();
+			if (selectedDirectory == null) {
+				downloadAndInstallButton.setEnabled(false);
+			} else {
+//				ir.install(new Path(selectedDirectory));
+				final IPath installPath = new Path(selectedDirectory);
+				final Job installRuntimeJob = new Job(
+						NLS.bind(Messages.rwf_InstallingRuntimeJob, getRuntimeType().getName())) {
+					public boolean belongsTo(Object family) {
+						return ServerPlugin.PLUGIN_ID.equals(family);
+					}
+					
+					protected IStatus run(IProgressMonitor monitor) {
+						try {
+							ir.install(installPath, monitor);
+						} catch (CoreException ce) {
+							return ce.getStatus();
+						}
+						
+						return Status.OK_STATUS;
+					}
+				};
+				
+				homeDirText.setText(selectedDirectory);
+				JobChangeAdapter jobListener = new JobChangeAdapter() {
+					public void done(IJobChangeEvent event) {
+						installRuntimeJob.removeJobChangeListener(this);
+						Display.getDefault().asyncExec(new Runnable() {
+							public void run() {
+								if( !downloadAndInstallButton.isDisposed())
+									downloadAndInstallButton.setEnabled(true);
+							}
+				        });
+					}
+				};
+				installRuntimeJob.addJobChangeListener(jobListener);
+				installRuntimeJob.schedule();
+				handle.setMessage(Messages.rwf_DownloadingMayTakeLongTime, IMessageProvider.WARNING);
+				MessageDialog.openWarning(downloadAndInstallButton.getShell(), Messages.rwf_InstallingASTitle, 
+						NLS.bind(Messages.rwf_DownloadingMayTakeLongTime, selectedDirectory));
+				((TitleAreaDialog)((IWizardPage)handle).getWizard().getContainer()).close();
+			}
+		}
 	}
-
+	
+	
 	protected void createJREComposite(Composite main) {
 		// Create our composite
 		jreComposite = new Composite(main, SWT.NONE);
Index: plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- plugins/org.jboss.ide.eclipse.as.core/plugin.xml	(revision 42986)
+++ plugins/org.jboss.ide.eclipse.as.core/plugin.xml	(working copy)
@@ -1218,4 +1218,52 @@
       </factory>
    </extension>
    
+   
+      
+   
+   
+   
+   <!-- Another set of hugely verbose and unnecessary xml for downloading remote jboss-as installations -->
+	<extension point="org.eclipse.wst.server.core.installableRuntimes">
+       <runtime
+          id="org.jboss.ide.eclipse.as.runtime.32"
+          licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+          archiveUrl="http://repository.jboss.org/sourceforge/jboss-3.2.8.SP1.zip"
+          archivePath="jboss-3.2.8.SP1.zip"/>
+       <runtime
+          id="org.jboss.ide.eclipse.as.runtime.40"
+          licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+          archiveUrl="http://repository.jboss.org/sourceforge/jboss-4.0.5.GA.zip"
+          archivePath="jboss-4.0.5.GA"/>
+       <runtime
+          id="org.jboss.ide.eclipse.as.runtime.42"
+          licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+          archiveUrl="http://repository.jboss.org/sourceforge/jboss-4.2.3.GA.zip"
+          archivePath="jboss-4.2.3.GA"/>
+       <runtime
+          id="org.jboss.ide.eclipse.as.runtime.50"
+          licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+          archiveUrl="http://repository.jboss.org/sourceforge/jboss-5.0.1.GA.zip"
+          archivePath="jboss-5.0.1.GA"/>
+       <runtime
+          id="org.jboss.ide.eclipse.as.runtime.51"
+          licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+          archiveUrl="http://repository.jboss.org/sourceforge/jboss-5.1.0.GA.zip"
+          archivePath="jboss-5.1.0.GA"/>
+       <runtime
+          id="org.jboss.ide.eclipse.as.runtime.60"
+          licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+          archiveUrl="http://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.zip"
+          archivePath="jboss-6.1.0.Final"/>
+       <runtime
+          id="org.jboss.ide.eclipse.as.runtime.70"
+          licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+          archiveUrl="http://download.jboss.org/jbossas/7.0/jboss-as-7.0.2.Final/jboss-as-web-7.0.2.Final.zip"
+          archivePath="jboss-as-7.0.2.Final"/>
+       <runtime
+          id="org.jboss.ide.eclipse.as.runtime.71"
+          licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+          archiveUrl="http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip"
+          archivePath="jboss-as-7.1.1.Final"/>
+	</extension>
 </plugin>
Index: tests/org.jboss.tools.as.test.core/pom.xml
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/xml
