Author: rob.stryker(a)jboss.com
Date: 2009-06-18 06:18:13 -0400 (Thu, 18 Jun 2009)
New Revision: 16031
Modified:
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
Log:
JBIDE-4505
Modified:
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
===================================================================
---
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2009-06-18
09:46:49 UTC (rev 16030)
+++
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2009-06-18
10:18:13 UTC (rev 16031)
@@ -86,8 +86,10 @@
public static class JNDIPortEditorExtension extends PortEditorExtension {
public JNDIPortEditorExtension() {
- super(Messages.EditorJNDIPort, IJBossServerConstants.JNDI_PORT_DETECT_XPATH,
+ super(Messages.EditorJNDIPort,
+ IJBossServerConstants.JNDI_PORT_DETECT_XPATH,
IJBossServerConstants.JNDI_PORT_DETECT,
+ IJBossServerConstants.JNDI_PORT,
IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH);
}
public ServerCommand getCommand() {
@@ -108,8 +110,10 @@
public static class WebPortEditorExtension extends PortEditorExtension {
public WebPortEditorExtension() {
- super(Messages.EditorWebPort, IJBossServerConstants.WEB_PORT_DETECT_XPATH,
+ super(Messages.EditorWebPort,
+ IJBossServerConstants.WEB_PORT_DETECT_XPATH,
IJBossServerConstants.WEB_PORT_DETECT,
+ IJBossServerConstants.WEB_PORT,
IJBossServerConstants.WEB_PORT_DEFAULT_XPATH);
}
@@ -134,15 +138,17 @@
protected Text text;
protected Label label;
protected Link link;
- protected String labelText, currentXPathKey, detectXPathKey, defaultXPath;
+ protected String labelText, currentXPathKey, detectXPathKey, overrideValueKey,
defaultXPath;
protected String currentXPath;
protected ServerAttributeHelper helper;
protected Listener listener;
protected PortSection section;
- public PortEditorExtension(String labelText, String currentXPathKey, String
detectXPathKey, String defaultXPath) {
+ public PortEditorExtension(String labelText, String currentXPathKey,
+ String detectXPathKey, String overrideValueKey, String defaultXPath) {
this.labelText = labelText;
this.currentXPathKey = currentXPathKey;
this.detectXPathKey = detectXPathKey;
+ this.overrideValueKey = overrideValueKey;
this.defaultXPath = defaultXPath;
}
public void setServerAttributeHelper(ServerAttributeHelper helper) {
@@ -203,7 +209,7 @@
if( shouldDetect )
text.setText(findPort(helper.getServer(), new Path(currentXPath)));
else
- text.setText(helper.getAttribute(IJBossServerConstants.JNDI_PORT, ""));
+ text.setText(helper.getAttribute(overrideValueKey, ""));
}
protected void addListeners() {
listener = new Listener() {
Show replies by date