1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

Bug 162489 - subsystem port number not being persisted

This commit is contained in:
David Dykstal 2006-11-02 21:22:51 +00:00
parent 641c5d348e
commit 0f47ce8874
6 changed files with 26 additions and 2 deletions

View file

@ -323,6 +323,7 @@ public class RSEDOMExporter implements IRSEDOMExporter {
// can't do this til connector service owns the properties (right now it's still subsystem)
node.addAttribute(IRSEDOMConstants.ATTRIBUTE_GROUP, connectorService.getName());
node.addAttribute(IRSEDOMConstants.ATTRIBUTE_USE_SSL, getBooleanString(connectorService.isUsingSSL()));
node.addAttribute(IRSEDOMConstants.ATTRIBUTE_PORT, Integer.toString(connectorService.getPort()));
}
// store the server launcher
// right now subsystem still owns the server launchers

View file

@ -172,6 +172,11 @@ public class RSEDOMImporter implements IRSEDOMImporter
// String type = connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue();
// String group = connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_GROUP).getValue();
boolean useSSL = getBooleanValue(connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_USE_SSL).getValue());
RSEDOMNodeAttribute att = connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_PORT);
int port = 0;
if (att != null) {
port = getIntegerValue(att.getValue());
}
// first restore subsystems (since right now we need subsystem to get at service
RSEDOMNode[] ssChildren = connectorServiceNode.getChildren(IRSEDOMConstants.TYPE_SUBSYSTEM);
@ -201,7 +206,7 @@ public class RSEDOMImporter implements IRSEDOMImporter
}
}
}
service.setPort(port);
service.setIsUsingSSL(useSSL);
}
}
@ -532,7 +537,14 @@ public class RSEDOMImporter implements IRSEDOMImporter
private int getIntegerValue(String integerString)
{
return Integer.parseInt(integerString);
int result = 0;
if (integerString != null) {
try {
result = Integer.parseInt(integerString);
} catch (NumberFormatException e) {
}
}
return result;
}
/**

View file

@ -223,6 +223,9 @@ public class SystemResources extends NLS
public static String RESID_CONNECTION_DEFAULTUSERID_TIP;
public static String RESID_CONNECTION_DEFAULTUSERID_INHERITBUTTON_TIP;
public static String RESID_CONNECTION_RUNNING_PORT_LABEL;
public static String RESID_CONNECTION_RUNNING_PORT_TIP;
public static String RESID_CONNECTION_PORT_LABEL;
public static String RESID_CONNECTION_PORT_TIP;

View file

@ -315,6 +315,9 @@ RESID_CONNECTION_DEFAULTUSERID_LABEL=Default User ID
RESID_CONNECTION_DEFAULTUSERID_TIP=Default user ID for subsystems that don't specify a user ID
RESID_CONNECTION_DEFAULTUSERID_INHERITBUTTON_TIP=Inherit from preferences, or set locally for this connection
RESID_CONNECTION_RUNNING_PORT_LABEL=Running Server Port
RESID_CONNECTION_RUNNING_PORT_TIP=Port number used by a running server
RESID_CONNECTION_PORT_LABEL=Port
RESID_CONNECTION_PORT_TIP=Port number used to do the connection

View file

@ -348,6 +348,7 @@ public class SystemSubSystemPropertyPageCoreForm extends AbstractSystemSubSystem
String userId = getUserId();
updateUserId(ss);
}
ss.commit();
}
return ok;
}

View file

@ -1487,6 +1487,10 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
{
connectorService.setPort(port);
}
if (connectorService.isDirty()) {
setDirty(true);
subsystem.setDirty(true);
}
}
else
{