Author: rob.stryker(a)jboss.com
Date: 2008-11-25 22:43:01 -0500 (Tue, 25 Nov 2008)
New Revision: 12061
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Log:
JBIDE-2627 - allowing any value set in the editor to be automatically added to the
deployment scanner before each publish. Also, separated out into metadata the default
deploy location, giving each server its own folder.
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-11-26
02:58:48 UTC (rev 12060)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-11-26
03:43:01 UTC (rev 12061)
@@ -337,12 +337,15 @@
oldDir = deployText.getText();
oldTemp = tempDeployText.getText();
+ String type;
+
if( newSelection == metadataRadio ) {
newDir = IJBossServerConstants.PLUGIN_LOCATION.append(name).
append(IJBossServerConstants.DEPLOY).makeAbsolute().toString();
newTemp = IJBossServerConstants.PLUGIN_LOCATION.append(name).
append(IJBossServerConstants.TEMP_DEPLOY).makeAbsolute().toString();
+ type = IDeployableServer.DEPLOY_METADATA;
new File(newDir).mkdirs();
new File(newTemp).mkdirs();
} else if( newSelection == serverRadio ) {
@@ -355,9 +358,11 @@
newTemp = new Path(IJBossServerConstants.SERVER).append(config)
.append(IJBossServerConstants.TMP)
.append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
+ type = IDeployableServer.DEPLOY_SERVER;
} else {
newDir = lastCustomDeploy;
newTemp = lastCustomTemp;
+ type = IDeployableServer.DEPLOY_CUSTOM;
}
newDir = newDir == null ? oldDir : newDir;
@@ -372,6 +377,8 @@
helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, newTemp);
tempDeployText.setText(newTemp);
tempDeployText.addModifyListener(tempDeployListener);
+
+ helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, type);
getSaveStatus();
}
public void undo() {
@@ -388,6 +395,11 @@
oldSelection.removeSelectionListener(radioListener);
oldSelection.setSelection(true);
oldSelection.addSelectionListener(radioListener);
+
+ String oldType = oldSelection == customRadio ? IDeployableServer.DEPLOY_CUSTOM :
+ oldSelection == serverRadio ? IDeployableServer.DEPLOY_SERVER :
+ IDeployableServer.DEPLOY_METADATA;
+ helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, oldType);
getSaveStatus();
}
}
Show replies by date