diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-03-31 04:31:07 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-03-31 04:31:07 +0000 |
commit | b99e44c5374710b3dfe86800e8488baa425e1862 (patch) | |
tree | 6d9b9c512ba0f5c5e7b15ccdc40db2bf2dad9673 /java/src/IceGridGUI/Application/Root.java | |
parent | Added --server option to icegridadmin (diff) | |
download | ice-b99e44c5374710b3dfe86800e8488baa425e1862.tar.bz2 ice-b99e44c5374710b3dfe86800e8488baa425e1862.tar.xz ice-b99e44c5374710b3dfe86800e8488baa425e1862.zip |
Added ability to read XML file by execing icegridadmin
Diffstat (limited to 'java/src/IceGridGUI/Application/Root.java')
-rwxr-xr-x | java/src/IceGridGUI/Application/Root.java | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/java/src/IceGridGUI/Application/Root.java b/java/src/IceGridGUI/Application/Root.java index 8926b302cd3..95c91da706c 100755 --- a/java/src/IceGridGUI/Application/Root.java +++ b/java/src/IceGridGUI/Application/Root.java @@ -501,37 +501,41 @@ public class Root extends ListTreeNode public void discardUpdates()
{
+ ApplicationDescriptor desc = null;
+
if(_live)
{
- ApplicationDescriptor desc = _coordinator.getLiveDeploymentRoot().getApplicationDescriptor(_id);
- assert desc != null;
- desc = IceGridGUI.Application.Root.copyDescriptor(desc);
-
- Root newRoot = new Root(_coordinator, desc, true, null);
- ApplicationPane app = _coordinator.getMainPane().findApplication(this);
- assert app != null;
- app.setRoot(newRoot);
-
- TreeNode node = newRoot.findNodeLike(_tree.getSelectionPath(), false);
- if(node == null)
- {
- newRoot.setSelectedNode(newRoot);
- }
- else
- {
- newRoot.setSelectedNode(node);
- }
+ desc = _coordinator.getLiveDeploymentRoot().getApplicationDescriptor(_id);
+ assert desc != null;
+ desc = IceGridGUI.Application.Root.copyDescriptor(desc);
}
else if(_file != null)
{
- //
- // TODO: re-read file
- //
+ desc = _coordinator.parseFile(_file);
+ if(desc == null)
+ {
+ return;
+ }
}
else
{
assert false;
}
+
+ Root newRoot = new Root(_coordinator, desc, _live, _file);
+ ApplicationPane app = _coordinator.getMainPane().findApplication(this);
+ assert app != null;
+ app.setRoot(newRoot);
+
+ TreeNode node = newRoot.findNodeLike(_tree.getSelectionPath(), false);
+ if(node == null)
+ {
+ newRoot.setSelectedNode(newRoot);
+ }
+ else
+ {
+ newRoot.setSelectedNode(node);
+ }
_coordinator.getCurrentTab().selected();
}
@@ -950,7 +954,12 @@ public class Root extends ListTreeNode writer.writeStartTag("application", attributes);
+ if(_descriptor.description.length() > 0)
+ {
+ writer.writeElement("description", _descriptor.description);
+ }
writeVariables(writer, _descriptor.variables);
+ writeDistribution(writer, _descriptor.distrib);
_serviceTemplates.write(writer);
_serverTemplates.write(writer);
|