Author: rob.stryker(a)jboss.com
Date: 2010-10-26 07:01:32 -0400 (Tue, 26 Oct 2010)
New Revision: 26063
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.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/plugin.xml
Log:
JBIDE-7412 - rse support for deploy only server
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2010-10-26
10:40:19 UTC (rev 26062)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2010-10-26
11:01:32 UTC (rev 26063)
@@ -105,6 +105,7 @@
* @return
*/
protected IPath getDeployPath(IModule[] moduleTree, IDeployableServer server) {
+ String s = publishMethod.getPublishDefaultRootFolder(server.getServer());
String folder = PublishUtil.getDeployRootFolder(
moduleTree, server,
publishMethod.getPublishDefaultRootFolder(server.getServer()),
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-10-26
10:40:19 UTC (rev 26062)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-10-26
11:01:32 UTC (rev 26063)
@@ -136,8 +136,8 @@
protected void loadRemoteDeploymentDetails() throws CoreException{
String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
- JBossServer jbs = ServerConverter.getJBossServer(behaviour.getServer());
- this.remoteRootFolder = new Path(RSEUtils.getDeployRootFolder(jbs));
+ IDeployableServer ds = ServerConverter.getDeployableServer(behaviour.getServer());
+ this.remoteRootFolder = new Path(RSEUtils.getDeployRootFolder(ds));
IHost host = RSEUtils.findHost(connectionName);
if( host != null ) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-10-26
10:40:19 UTC (rev 26062)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-10-26
11:01:32 UTC (rev 26063)
@@ -17,6 +17,7 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerAttributes;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -47,7 +48,7 @@
return server.getAttribute(RSEUtils.RSE_SERVER_CONFIG,
runtime.getJBossConfiguration());
}
- public static String getDeployRootFolder(JBossServer server) {
+ public static String getDeployRootFolder(IDeployableServer server) {
return getDeployRootFolder(server.getServer(), server.getDeployLocationType());
}
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 2010-10-26
10:40:19 UTC (rev 26062)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-10-26
11:01:32 UTC (rev 26063)
@@ -54,8 +54,10 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.IProgressService;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.IConstants;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.rse.core.RSEPublishMethod;
import org.jboss.ide.eclipse.as.rse.core.RSEUtils;
import org.jboss.ide.eclipse.as.ui.UIUtil;
@@ -101,52 +103,56 @@
};
combo.getCombo().addModifyListener(comboMListener);
- Label serverHomeLabel = new Label(this, SWT.NONE);
- serverHomeLabel.setText("Remote Server Home: ");
- rseBrowse = new Button(this, SWT.DEFAULT);
- rseBrowse.setText("Browse...");
- rseBrowse.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, null, 0, 100, -5));
- rseBrowse.addSelectionListener(new SelectionListener(){
- public void widgetSelected(SelectionEvent e) {
- browseClicked();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- browseClicked();
- }
- });
- rseServerHome = new Text(this, SWT.SINGLE | SWT.BORDER);
- serverHomeLabel.setLayoutData(UIUtil.createFormData2(child, 7, null, 0, 0, 10, null,
0));
- rseServerHome.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, serverHomeLabel,
5, rseBrowse, -5));
- rseServerHome.setText(callback.getServer().getAttribute(RSEUtils.RSE_SERVER_HOME_DIR,
- getRuntime().getRuntime().getLocation().toString()));
- rseServerHome.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- serverHomeChanged();
- }});
+ IServer original = callback.getServer().getOriginal();
+ if( original != null && ServerConverter.getJBossServer(original) != null ) {
- Label serverConfigLabel = new Label(this, SWT.NONE);
- serverConfigLabel.setText("Remote Server Configuration: ");
- rseServerConfig= new Text(this, SWT.SINGLE | SWT.BORDER);
- serverConfigLabel.setLayoutData(UIUtil.createFormData2(rseServerHome, 7, null, 0, 0,
10, null, 0));
- rseServerConfig.setText(callback.getServer().getAttribute(RSEUtils.RSE_SERVER_CONFIG,
- getRuntime().getJBossConfiguration()));
- rseServerConfig.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- serverConfigChanged();
- }});
- callback.getServer().addPropertyChangeListener(this);
-
- rseTest = new Button(this, SWT.NONE);
- rseTest.setText("Test...");
- rseTest.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0, null, 0, 100,
-5));
- rseServerConfig.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0,
serverConfigLabel, 5, rseTest, -5));
- rseTest.addSelectionListener(new SelectionListener(){
- public void widgetSelected(SelectionEvent e) {
- testPressed();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
+ Label serverHomeLabel = new Label(this, SWT.NONE);
+ serverHomeLabel.setText("Remote Server Home: ");
+ rseBrowse = new Button(this, SWT.DEFAULT);
+ rseBrowse.setText("Browse...");
+ rseBrowse.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, null, 0, 100,
-5));
+ rseBrowse.addSelectionListener(new SelectionListener(){
+ public void widgetSelected(SelectionEvent e) {
+ browseClicked();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ browseClicked();
+ }
+ });
+ rseServerHome = new Text(this, SWT.SINGLE | SWT.BORDER);
+ serverHomeLabel.setLayoutData(UIUtil.createFormData2(child, 7, null, 0, 0, 10, null,
0));
+ rseServerHome.setLayoutData(UIUtil.createFormData2(child, 5, null, 0,
serverHomeLabel, 5, rseBrowse, -5));
+ rseServerHome.setText(callback.getServer().getAttribute(RSEUtils.RSE_SERVER_HOME_DIR,
+ getRuntime() == null ? "" :
getRuntime().getRuntime().getLocation().toString()));
+ rseServerHome.addModifyListener(new ModifyListener(){
+ public void modifyText(ModifyEvent e) {
+ serverHomeChanged();
+ }});
+
+ Label serverConfigLabel = new Label(this, SWT.NONE);
+ serverConfigLabel.setText("Remote Server Configuration: ");
+ rseServerConfig= new Text(this, SWT.SINGLE | SWT.BORDER);
+ serverConfigLabel.setLayoutData(UIUtil.createFormData2(rseServerHome, 7, null, 0, 0,
10, null, 0));
+ rseServerConfig.setText(callback.getServer().getAttribute(RSEUtils.RSE_SERVER_CONFIG,
+ getRuntime() == null ? "" : getRuntime().getJBossConfiguration()));
+ rseServerConfig.addModifyListener(new ModifyListener(){
+ public void modifyText(ModifyEvent e) {
+ serverConfigChanged();
+ }});
+ callback.getServer().addPropertyChangeListener(this);
+
+ rseTest = new Button(this, SWT.NONE);
+ rseTest.setText("Test...");
+ rseTest.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0, null, 0, 100,
-5));
+ rseServerConfig.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0,
serverConfigLabel, 5, rseTest, -5));
+ rseTest.addSelectionListener(new SelectionListener(){
+ public void widgetSelected(SelectionEvent e) {
+ testPressed();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
}
private void testPressed(){
@@ -319,7 +325,8 @@
protected void serverHomeChanged() {
if( !updatingFromModelChange) {
callback.execute(new ChangeServerPropertyCommand(
- callback.getServer(), RSEUtils.RSE_SERVER_HOME_DIR, rseServerHome.getText(),
getRuntime().getRuntime().getLocation().toString(),
+ callback.getServer(), RSEUtils.RSE_SERVER_HOME_DIR, rseServerHome.getText(),
+ getRuntime() == null ? "" :
getRuntime().getRuntime().getLocation().toString(),
"Change RSE Server's Home Directory"));
}
}
@@ -327,7 +334,8 @@
protected void serverConfigChanged() {
if( !updatingFromModelChange ) {
callback.execute(new ChangeServerPropertyCommand(
- callback.getServer(), RSEUtils.RSE_SERVER_CONFIG, rseServerConfig.getText(),
getRuntime().getJBossConfiguration(),
+ callback.getServer(), RSEUtils.RSE_SERVER_CONFIG, rseServerConfig.getText(),
+ getRuntime() == null ? "" : getRuntime().getJBossConfiguration(),
"Change RSE Server's Configuration"));
}
}
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 2010-10-26
10:40:19 UTC (rev 26062)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-10-26
11:01:32 UTC (rev 26063)
@@ -754,9 +754,11 @@
public void updateListeners() {
// server has been saved. Remove property change listener from last wc and add to
newest
- lastWC.removePropertyChangeListener(this);
+ if( lastWC != null )
+ lastWC.removePropertyChangeListener(this);
lastWC = page.getServer();
- lastWC.addPropertyChangeListener(this);
+ if( lastWC != null )
+ lastWC.addPropertyChangeListener(this);
}
public void propertyChange(PropertyChangeEvent evt) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-10-26 10:40:19 UTC (rev
26062)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-10-26 11:01:32 UTC (rev
26063)
@@ -169,7 +169,7 @@
id="org.jboss.ide.eclipse.as.ui.editor.serverModeSection"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="9"
- typeIds="%AllJBossServerTypes"/>
+ typeIds="%AllJBTServerTypes"/>
</extension>