Author: rob.stryker(a)jboss.com
Date: 2011-11-11 07:13:18 -0500 (Fri, 11 Nov 2011)
New Revision: 36297
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/OpenShiftRuntime.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/OpenshiftDelegatingStartLaunchConfiguration.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenshiftLaunchTabGroup.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviourDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressLaunchDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
Log:
JBIDE-9935 - openshift server standalone
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties 2011-11-11 10:34:03
UTC (rev 36296)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties 2011-11-11 12:13:18
UTC (rev 36297)
@@ -1,3 +1,5 @@
+Bundle-Vendor.0 = JBoss by Red Hat
+Bundle-Name.0 = JBoss AS Core Plug-in
pluginName=JBoss WTP Server Tools Core Plugin
providerName=JBoss Community
enterpriseProviderName=JBoss Enterprise Middleware
@@ -50,9 +52,6 @@
deploy.server.name=Deploy Only
deploy.server.description=A server which only provides a deploy folder for publishing.
-Bundle-Vendor.0 = JBoss by Red Hat
-Bundle-Name.0 = JBoss AS Core Plug-in
-
AllJBossRuntimeTypes=org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50,org.jboss.ide.eclipse.as.runtime.51,org.jboss.ide.eclipse.as.runtime.60,org.jboss.ide.eclipse.as.runtime.70,org.jboss.ide.eclipse.as.runtime.eap.43,org.jboss.ide.eclipse.as.runtime.eap.50,org.jboss.ide.eclipse.as.runtime.eap.60
AllJBossServerTypes=org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.70,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50,org.jboss.ide.eclipse.as.eap.60,
AllJBTServerTypes=org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.70,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50,org.jboss.ide.eclipse.as.eap.60,org.jboss.ide.eclipse.as.systemCopyServer
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-11-11
10:34:03 UTC (rev 36296)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-11-11
12:13:18 UTC (rev 36297)
@@ -27,7 +27,9 @@
org.eclipse.m2e.core.ui;bundle-version="1.0.100",
org.eclipse.wst.common.modulecore;bundle-version="1.2.100",
org.eclipse.team.ui;bundle-version="3.6.100",
- org.jboss.tools.openshift.egit.core;bundle-version="2.3.0"
+ org.jboss.tools.openshift.egit.core;bundle-version="2.3.0",
+ org.eclipse.jdt.launching;bundle-version="3.6.0",
+ org.eclipse.debug.ui;bundle-version="3.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
@@ -35,5 +37,5 @@
org.jboss.tools.common.ui.databinding,
org.jboss.tools.common.ui.preferencevalue,
org.jboss.tools.common.ui.ssh
-Bundle-Vendor: JBoss by Red Hat
+Bundle-Vendor: %Bundle-Vendor.0
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties 2011-11-11
12:13:18 UTC (rev 36297)
@@ -0,0 +1,8 @@
+Bundle-Vendor.0 = JBoss by Red Hat
+Bundle-Name.0 = OpenShift UI
+providerName=JBoss Community
+
+# Version Delegates
+openshift.express.name=OpenShift Express Runtime
+openshift.express.description=A server adapter for use interfacing with the OpenShift
Express Framework
+openshift.express.runtime.name=OpenShift Express Runtime
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2011-11-11
10:34:03 UTC (rev 36296)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2011-11-11
12:13:18 UTC (rev 36297)
@@ -2,6 +2,11 @@
<?eclipse version="3.4"?>
<plugin>
<extension
+ point="org.jboss.ide.eclipse.as.ui.DeployMethodUI">
+ <ui deployMethodId="openshift"
+
class="org.jboss.tools.openshift.express.internal.ui.behaviour.OpenShiftDeployUI"/>
+ </extension>
+ <extension
point="org.eclipse.ui.newWizards">
<category
id="org.jboss.ide.eclipse.as.openshift.express.ui.wizard.category"
@@ -15,22 +20,118 @@
name="OpenShift Express Application">
</wizard>
</extension>
+
<extension
+ point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ icon="$nl$/icons/openshift-logo-white-icon.png"
+
typeIds="org.jboss.tools.openshift.express.openshift.server.type,org.jboss.tools.openshift.express.internal.OpenShiftRuntime"
+ id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+
class="org.jboss.tools.openshift.express.internal.ui.behaviour.OpenshiftLaunchTabGroup"
+ description="OpenShift Launch"
+
id="org.jboss.tools.openshift.express.internal.ui.behaviour.OpenshiftLaunchTabGroup"
+
type="org.jboss.tools.openshift.express.internal.core.behaviour.launchType"/>
+ </extension>
+
+ <!-- Core Extensions, should be moved out one day -->
+ <extension
point="org.jboss.ide.eclipse.as.core.behaviourExtension">
<behaviour
behaviourDelegate="org.jboss.tools.openshift.express.internal.core.behaviour.ExpressBehaviourDelegate"
launchDelegate="org.jboss.tools.openshift.express.internal.core.behaviour.ExpressLaunchDelegate"
name="OpenShift Express"
publishMethod="org.jboss.tools.openshift.express.internal.core.behaviour.ExpressPublishMethod"
-
serverTypes="org.jboss.ide.eclipse.as.70,org.jboss.ide.eclipse.as.eap.60"
+
serverTypes="org.jboss.tools.openshift.express.openshift.server.type"
typeId="openshift">
</behaviour>
</extension>
+
<extension
- point="org.jboss.ide.eclipse.as.ui.DeployMethodUI">
- <ui
-
class="org.jboss.tools.openshift.express.internal.ui.behaviour.OpenShiftDeployUI"
- deployMethodId="openshift">
- </ui>
+ point="org.eclipse.wst.server.core.serverTypes">
+ <serverType
+
behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer"
+ name="%openshift.express.name"
+ description="%openshift.express.description"
+ hasConfiguration="false"
+ id="org.jboss.tools.openshift.express.openshift.server.type"
+ initialState="started"
+
launchConfigId="org.jboss.tools.openshift.express.internal.core.behaviour.launchType"
+ launchModes="run,debug,profile"
+ runtime="false"
+
runtimeTypeId="org.jboss.tools.openshift.express.internal.OpenShiftRuntime"
+ startBeforePublish="false"
+ startTimeout="450000"
+ stopTimeout="450000"
+ supportsRemoteHosts="true"/>
+ </extension>
+ <extension
+ point="org.eclipse.wst.server.core.runtimeTypes">
+ <runtimeType
+ vendor="%providerName"
+
class="org.jboss.tools.openshift.express.internal.core.behaviour.OpenShiftRuntime"
+ description="%openshift.express.runtime.name"
+ name="%openshift.express.runtime.name"
+ id="org.jboss.tools.openshift.express.internal.OpenShiftRuntime"
+ version="1.0">
+ <moduleType types="jst.appclient" versions="5.0,
6.0"/>
+ <moduleType types="wst.web"
versions="1.0,1.2,1.3,1.4"/>
+ <moduleType types="jst.web" versions="2.2, 2.3, 2.4, 2.5,
3.0"/>
+ <moduleType types="jst.ejb" versions="1.0, 1.1, 2.0, 2.1,
3.0, 3.1"/>
+ <moduleType types="jst.ear" versions="1.2, 1.3, 1.4, 5.0,
6.0"/>
+ <moduleType types="jst.connector" versions="1.0, 1.5,
1.6"/>
+ <moduleType types="jst.utility" versions="1.0"/>
+ <moduleType types="jboss.package" versions="1.0"/>
+ <moduleType types="jboss.singlefile"
versions="1.0"/>
+ <moduleType types="jst.jboss.esb"
versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9"/>
+ <moduleType types="jst.jboss.sar" versions="1.0"/>
+ <moduleType types="jbt.bpel.module" versions="1.1,
2.0"/>
+ <moduleType types="bpel.module" versions="1.1,
2.0"/>
+ <moduleType types="jboss.osgi" versions="1.0"/>
+ </runtimeType>
+ </extension>
+ <extension
+ point="org.eclipse.jst.server.core.runtimeFacetMappings">
+ <runtimeFacetMapping
+
runtimeTypeId="org.jboss.tools.openshift.express.internal.OpenShiftRuntime"
+
runtime-component="org.jboss.tools.openshift.express.internal.OpenShiftRuntime.component"
+ version="1.0"/>
+ </extension>
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type
id="org.jboss.tools.openshift.express.internal.OpenShiftRuntime.component"/>
+ <runtime-component-version
+
type="org.jboss.tools.openshift.express.internal.OpenShiftRuntime.component"
+ version="1.0"/>
+ <supported>
+ <runtime-component
+
id="org.jboss.tools.openshift.express.internal.OpenShiftRuntime.component"
+ version="1.0"/>
+ <facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
+ <facet id="jst.web" version="2.2,2.3,2.4,2.5,3.0"/>
+ <facet id="jst.java" version="5.0,6.0,1.7"/>
+ <facet id="jst.utility" version="1.0"/>
+ <facet id="jst.connector" version="1.0,1.5,1.6"/>
+ <facet id="jst.ejb" version="2.0,2.1,3.0,3.1"/>
+ <facet id="jst.ear" version="1.2,1.3,1.4,5.0,6.0"/>
+ <facet id="jst.appclient"
version="1.2,1.3,1.4,5.0,6.0"/>
+ <facet id="jst.webfragment" version="3.0"/>
+ </supported>
</extension>
+ <extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ category="JBoss"
+
delegate="org.jboss.tools.openshift.express.internal.core.behaviour.OpenshiftDelegatingStartLaunchConfiguration"
+
id="org.jboss.tools.openshift.express.internal.core.behaviour.launchType"
+ modes="run,debug,profile"
+ name="JBoss OpenShift Server Startup Configuration"
+ public="true"
+
sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
+
sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
+ </extension>
</plugin>
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviourDelegate.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviourDelegate.java 2011-11-11
10:34:03 UTC (rev 36296)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviourDelegate.java 2011-11-11
12:13:18 UTC (rev 36297)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat Inc..
+ * 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
import org.eclipse.core.runtime.CoreException;
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressLaunchDelegate.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressLaunchDelegate.java 2011-11-11
10:34:03 UTC (rev 36296)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressLaunchDelegate.java 2011-11-11
12:13:18 UTC (rev 36297)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat Inc..
+ * 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
import org.eclipse.core.runtime.CoreException;
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2011-11-11
10:34:03 UTC (rev 36296)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2011-11-11
12:13:18 UTC (rev 36297)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat Inc..
+ * 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
import java.util.ArrayList;
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java 2011-11-11
10:34:03 UTC (rev 36296)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java 2011-11-11
12:13:18 UTC (rev 36297)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat Inc..
+ * 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
import org.eclipse.core.runtime.CoreException;
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/OpenShiftRuntime.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/OpenShiftRuntime.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/OpenShiftRuntime.java 2011-11-11
12:13:18 UTC (rev 36297)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.behaviour;
+
+import org.eclipse.wst.server.core.model.RuntimeDelegate;
+
+public class OpenShiftRuntime extends RuntimeDelegate {
+
+ public OpenShiftRuntime() {
+ }
+}
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/OpenshiftDelegatingStartLaunchConfiguration.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/OpenshiftDelegatingStartLaunchConfiguration.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/OpenshiftDelegatingStartLaunchConfiguration.java 2011-11-11
12:13:18 UTC (rev 36297)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat Inc..
+ * 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.behaviour;
+
+import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
+import
org.jboss.ide.eclipse.as.core.server.internal.launch.DelegatingStartLaunchConfiguration;
+
+public class OpenshiftDelegatingStartLaunchConfiguration extends
+ DelegatingStartLaunchConfiguration implements
+ ILaunchConfigurationDelegate {
+
+}
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenshiftLaunchTabGroup.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenshiftLaunchTabGroup.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenshiftLaunchTabGroup.java 2011-11-11
12:13:18 UTC (rev 36297)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat Inc..
+ * 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.behaviour;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+public class OpenshiftLaunchTabGroup extends
+ AbstractLaunchConfigurationTabGroup {
+
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ setTabs(createTabs2(dialog, mode));
+ }
+
+ public ILaunchConfigurationTab[] createTabs2(ILaunchConfigurationDialog dialog, String
mode) {
+ return new ILaunchConfigurationTab[]{
+ new OpenshiftDefaultLaunchTab()
+ };
+ }
+
+
+ public class OpenshiftDefaultLaunchTab extends AbstractLaunchConfigurationTab {
+
+ public void createControl(Composite parent) {
+ Font font = parent.getFont();
+ Composite comp = SWTFactory.createComposite(parent, font, 1, 1, GridData.FILL_BOTH);
+ GridLayout layout = new GridLayout();
+ layout.verticalSpacing = 0;
+ comp.setLayout(layout);
+ Label l = new Label(comp, SWT.NONE);
+ l.setText("OpenShift launches are not currently supported");
+ setControl(comp);
+ }
+
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public String getName() {
+ return "OpenShift Launch";
+ }
+
+ }
+}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-11-11
10:34:03 UTC (rev 36296)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-11-11
12:13:18 UTC (rev 36297)
@@ -78,18 +78,12 @@
private Text gitUriValueText;
private AdapterWizardPageModel model;
- private Combo suitableRuntimesCombo;
private IServerType serverTypeToCreate;
- private IRuntime runtimeDelegate;
private Label domainValueLabel;
private Label modeValueLabel;
- private Link addRuntimeLink;
- private Label runtimeLabel;
private Button serverAdapterCheckbox;
private IObservableValue serverAdapterCheckboxObservable;
- private IObservableValue selectedRuntimeObservable;
- private IObservableList suitableRuntimesObservable;
public AdapterWizardPage(ImportProjectWizard wizard, ImportProjectWizardModel model) {
super(
@@ -128,7 +122,6 @@
gitUriValueText = new Text(cloneGroup, SWT.BORDER);
gitUriValueText.setEditable(false);
- // gitUriValueText.setBackground(cloneGroup.getBackground());
GridDataFactory
.fillDefaults().span(3, 1).align(SWT.FILL, SWT.CENTER).grab(true,
false).applyTo(gitUriValueText);
ValueBindingBuilder
@@ -289,9 +282,6 @@
}
protected void enableServerWidgets(boolean enabled) {
- suitableRuntimesCombo.setEnabled(enabled);
- runtimeLabel.setEnabled(enabled);
- addRuntimeLink.setEnabled(enabled);
domainValueLabel.setEnabled(enabled);
modeValueLabel.setEnabled(enabled);
}
@@ -313,13 +303,6 @@
}
});
- runtimeLabel = new Label(c, SWT.NONE);
- runtimeLabel.setText("Local Runtime");
-
- suitableRuntimesCombo = new Combo(c, SWT.READ_ONLY);
- addRuntimeLink = new Link(c, SWT.NONE);
- addRuntimeLink.setText("<a>" + Messages.addRuntime +
"</a>");
-
Label domainLabel = new Label(c, SWT.NONE);
domainLabel.setText("Host");
domainValueLabel = new Label(c, SWT.NONE);
@@ -333,115 +316,34 @@
modeLabel.setText("Mode");
modeValueLabel = new Label(c, SWT.NONE);
- suitableRuntimesCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateSelectedRuntimeDelegate();
- }
- });
- addRuntimeLink.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- IRuntimeType type = getValidRuntimeType();
- if (type != null)
- showRuntimeWizard(type);
- }
- });
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(domainLabel);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(modeLabel);
+ GridDataFactory.fillDefaults().span(2, 1).align(SWT.FILL, SWT.CENTER)
+ .grab(true, false).applyTo(domainValueLabel);
+ GridDataFactory.fillDefaults().span(3, 1).align(SWT.FILL, SWT.CENTER)
+ .grab(true, false).applyTo(serverAdapterCheckbox);
+ GridDataFactory.fillDefaults().span(2, 1).align(SWT.FILL, SWT.CENTER)
+ .grab(true, false).applyTo(modeValueLabel);
- GridDataFactory.fillDefaults()
- .span(3, 1).align(SWT.FILL, SWT.CENTER).grab(true,
false).applyTo(serverAdapterCheckbox);
- GridDataFactory.fillDefaults()
- .align(SWT.LEFT, SWT.CENTER).applyTo(runtimeLabel);
- GridDataFactory.fillDefaults()
- .align(SWT.LEFT, SWT.CENTER).applyTo(runtimeLabel);
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(suitableRuntimesCombo);
- GridDataFactory.fillDefaults()
- .align(SWT.LEFT, SWT.CENTER).applyTo(domainLabel);
- GridDataFactory.fillDefaults()
- .span(2, 1).align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(domainValueLabel);
- GridDataFactory.fillDefaults()
- .align(SWT.LEFT, SWT.CENTER).applyTo(modeLabel);
- GridDataFactory.fillDefaults()
- .span(2, 1).align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(modeValueLabel);
-
model.getParentModel().setProperty(AdapterWizardPageModel.CREATE_SERVER,
serverAdapterCheckbox.getSelection());
-
- this.selectedRuntimeObservable =
- WidgetProperties.singleSelectionIndex().observe(suitableRuntimesCombo);
- this.suitableRuntimesObservable =
- WidgetProperties.items().observe(suitableRuntimesCombo);
this.serverAdapterCheckboxObservable =
WidgetProperties.selection().observe(serverAdapterCheckbox);
SelectedRuntimeValidator selectedRuntimeValidator = new SelectedRuntimeValidator();
dbc.addValidationStatusProvider(selectedRuntimeValidator);
-
- // ControlDecorationSupport.create(selectedRuntimeValidator, SWT.TOP |
- // SWT.LEFT);
}
- private void updateSelectedRuntimeDelegate() {
- if (!(new Integer(-1).equals(selectedRuntimeObservable.getValue()))) {
- String selectedRuntimeName = (String) suitableRuntimesObservable.get((Integer)
selectedRuntimeObservable
- .getValue());
- runtimeDelegate = ServerCore.findRuntime(selectedRuntimeName);
- } else {
- runtimeDelegate = null;
- }
- model.getParentModel().setProperty(AdapterWizardPageModel.RUNTIME_DELEGATE,
runtimeDelegate);
- }
-
- private IRuntimeType getValidRuntimeType() {
- String cartridgeName = model.getParentModel().getApplicationCartridgeName();
- if (ICartridge.JBOSSAS_7.getName().equals(cartridgeName)) {
- return ServerCore.findRuntimeType(IJBossToolingConstants.AS_70);
- }
- return null;
- }
-
private IServerType getServerTypeToCreate() {
- String cartridgeName = model.getParentModel().getApplicationCartridgeName();
- if (ICartridge.JBOSSAS_7.getName().equals(cartridgeName)) {
- return ServerCore.findServerType(IJBossToolingConstants.SERVER_AS_70);
- }
- return null;
+ return
ServerCore.findServerType("org.jboss.tools.openshift.express.openshift.server.type");
}
- private IRuntime[] getRuntimesOfType(String type) {
- ArrayList<IRuntime> validRuntimes = new ArrayList<IRuntime>();
- IRuntime[] allRuntimes = ServerCore.getRuntimes();
- for (int i = 0; i < allRuntimes.length; i++) {
- if (allRuntimes[i].getRuntimeType().getId().equals(type))
- validRuntimes.add(allRuntimes[i]);
- }
- return validRuntimes.toArray(new IRuntime[validRuntimes.size()]);
- }
-
- private void fillRuntimeCombo(IRuntime[] runtimes) {
- suitableRuntimesObservable.clear();
- String[] names = new String[runtimes.length];
- for (int i = 0; i < runtimes.length; i++) {
- names[i] = runtimes[i].getName();
- suitableRuntimesObservable.add(runtimes[i].getName());
- }
- }
-
protected void onPageActivated(DataBindingContext dbc) {
model.resetRepositoryPath();
-
serverTypeToCreate = getServerTypeToCreate();
model.getParentModel().setProperty(AdapterWizardPageModel.SERVER_TYPE,
serverTypeToCreate);
- refreshValidRuntimes();
- if (suitableRuntimesObservable.size() > 0) {
- selectedRuntimeObservable.setValue(0);
- updateSelectedRuntimeDelegate();
- }
-
- IRuntimeType type = getValidRuntimeType();
- addRuntimeLink.setEnabled(type != null);
modeValueLabel.setText("Source");
model.getParentModel().setProperty(AdapterWizardPageModel.MODE,
AdapterWizardPageModel.MODE_SOURCE);
-
onPageActivatedBackground(dbc);
}
@@ -459,52 +361,6 @@
}.schedule();
}
- protected void refreshValidRuntimes() {
- IRuntimeType type = getValidRuntimeType();
- if (type != null) {
- IRuntime[] runtimes = getRuntimesOfType(type.getId());
- fillRuntimeCombo(runtimes);
- } else {
- // suitableRuntimesCombo.setItems(new String[0]);
- selectedRuntimeObservable.setValue(0);
- }
- }
-
- /* Stolen from NewManualServerComposite */
- protected int showRuntimeWizard(IRuntimeType runtimeType) {
- WizardFragment fragment = null;
- TaskModel taskModel = new TaskModel();
- final WizardFragment fragment2 =
ServerUIPlugin.getWizardFragment(runtimeType.getId());
- if (fragment2 == null)
- return Window.CANCEL;
-
- try {
- IRuntimeWorkingCopy runtimeWorkingCopy = runtimeType.createRuntime(null, null);
- taskModel.putObject(TaskModel.TASK_RUNTIME, runtimeWorkingCopy);
- } catch (CoreException ce) {
- OpenShiftUIActivator.getDefault().getLog().log(ce.getStatus());
- return Window.CANCEL;
- }
- fragment = new WizardFragment() {
- protected void createChildFragments(List<WizardFragment> list) {
- list.add(fragment2);
- list.add(WizardTaskUtil.SaveRuntimeFragment);
- }
- };
- TaskWizard wizard2 = new TaskWizard(Messages.wizNewRuntimeWizardTitle, fragment,
taskModel);
- wizard2.setForcePreviousAndNextButtons(true);
- WizardDialog dialog = new WizardDialog(getShell(), wizard2);
- int returnValue = dialog.open();
- refreshValidRuntimes();
- if (returnValue != Window.CANCEL) {
- IRuntime rt = (IRuntime) taskModel.getObject(TaskModel.TASK_RUNTIME);
- if (rt != null && rt.getName() != null &&
suitableRuntimesCombo.indexOf(rt.getName()) != -1) {
- suitableRuntimesCombo.select(suitableRuntimesCombo.indexOf(rt.getName()));
- }
- }
- return returnValue;
- }
-
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (ImportProjectWizardModel.APPLICATION.equals(evt.getPropertyName())) {
@@ -518,10 +374,8 @@
serverTypeToCreate = getServerTypeToCreate();
boolean canCreateServer = serverTypeToCreate != null;
serverAdapterCheckbox.setEnabled(canCreateServer);
- // serverAdapterCheckbox.setSelection(canCreateServer);
serverAdapterCheckboxObservable.setValue(canCreateServer);
enableServerWidgets(canCreateServer);
- refreshValidRuntimes();
model.getParentModel().setProperty(AdapterWizardPageModel.SERVER_TYPE,
serverTypeToCreate);
model.getParentModel().setProperty(AdapterWizardPageModel.CREATE_SERVER,
canCreateServer);
}
@@ -539,12 +393,6 @@
if (Boolean.FALSE.equals(serverAdapterCheckboxObservable.getValue())) {
return ValidationStatus.ok();
}
- if (new Integer(-1).equals(selectedRuntimeObservable.getValue())) {
- if (suitableRuntimesObservable.size() == 0) {
- return ValidationStatus.error("Please add a new valid runtime.");
- }
- return ValidationStatus.error("Please select a runtime");
- }
return ValidationStatus.ok();
}
}