Author: rob.stryker(a)jboss.com
Date: 2011-11-11 05:34:03 -0500 (Fri, 11 Nov 2011)
New Revision: 36296
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenShiftDeployUI.java
Log:
Added copyright, and a *possible* fix for JBIDE-10117 ?? Either way, it's cleaner.
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java 2011-11-11
01:32:40 UTC (rev 36295)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java 2011-11-11
10:34:03 UTC (rev 36296)
@@ -95,7 +95,8 @@
String current = null;
if( ds != null ) {
Behaviour b =
BehaviourModel.getModel().getBehaviour(callback.getServer().getOriginal().getServerType().getId());
- String behaviourType =
DeploymentPreferenceLoader.getCurrentDeploymentMethodTypeId(callback.getServer().getOriginal());
+ String behaviourType = DeploymentPreferenceLoader.getCurrentDeploymentMethodTypeId(
+ callback.getServer().getOriginal(), getDefaultServerMode());
current = b.getImpl(behaviourType).getName();
} else {
String host = callback.getServer().getHost();
@@ -103,10 +104,10 @@
BehaviourImpl impl = null;
String serverTypeId = callback.getServer().getServerType().getId();
if( SocketUtil.isLocalhost(host)) {
- impl =
BehaviourModel.getModel().getBehaviour(serverTypeId).getImpl(LocalPublishMethod.LOCAL_PUBLISH_METHOD);
+ impl =
BehaviourModel.getModel().getBehaviour(serverTypeId).getImpl(getDefaultLocalServerMode());
} else {
// socket is not localhost, hard code this for now
- impl =
BehaviourModel.getModel().getBehaviour(serverTypeId).getImpl("rse");
+ impl =
BehaviourModel.getModel().getBehaviour(serverTypeId).getImpl(getDefaultRemoteServerMode());
}
current = impl.getName();
callback.execute(new ChangeServerPropertyCommand(
@@ -125,6 +126,16 @@
deployTypeChanged(false);
}
+ protected String getDefaultServerMode() {
+ return LocalPublishMethod.LOCAL_PUBLISH_METHOD;
+ }
+ protected String getDefaultLocalServerMode() {
+ return LocalPublishMethod.LOCAL_PUBLISH_METHOD;
+ }
+ protected String getDefaultRemoteServerMode() {
+ return "rse"; //$NON-NLS-1$
+ }
+
protected boolean showExecuteShellCheckbox() {
return true;
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenShiftDeployUI.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenShiftDeployUI.java 2011-11-11
01:32:40 UTC (rev 36295)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenShiftDeployUI.java 2011-11-11
10:34:03 UTC (rev 36296)
@@ -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.ui.behaviour;
import org.eclipse.swt.SWT;