summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/Application/Root.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-04-04 22:07:48 +0000
committerBernard Normier <bernard@zeroc.com>2006-04-04 22:07:48 +0000
commitf1a3aa72aac8d42e6ffb5be17e4469f145673a9e (patch)
tree4d823755a5c29660ea2bfe18760fb8901a0efb45 /java/src/IceGridGUI/Application/Root.java
parentTru64 port (diff)
downloadice-f1a3aa72aac8d42e6ffb5be17e4469f145673a9e.tar.bz2
ice-f1a3aa72aac8d42e6ffb5be17e4469f145673a9e.tar.xz
ice-f1a3aa72aac8d42e6ffb5be17e4469f145673a9e.zip
Bug fixes
Diffstat (limited to 'java/src/IceGridGUI/Application/Root.java')
-rwxr-xr-xjava/src/IceGridGUI/Application/Root.java63
1 files changed, 29 insertions, 34 deletions
diff --git a/java/src/IceGridGUI/Application/Root.java b/java/src/IceGridGUI/Application/Root.java
index 95c91da706c..818706b2d3b 100755
--- a/java/src/IceGridGUI/Application/Root.java
+++ b/java/src/IceGridGUI/Application/Root.java
@@ -34,7 +34,6 @@ public class Root extends ListTreeNode
boolean live, File file)
{
super(false, null, desc.name);
- _ephemeral = false;
_coordinator = coordinator;
_descriptor = desc;
@@ -55,33 +54,31 @@ public class Root extends ListTreeNode
}
//
- // Construct a new, ephemeral Application
+ // Construct a new Application
//
public Root(Coordinator coordinator, ApplicationDescriptor desc)
{
- super(false, null, desc.name);
- _ephemeral = true;
+ super(true, null, desc.name);
_coordinator = coordinator;
_descriptor = desc;
- _tree = new JTree(this, true);
- _treeModel = (DefaultTreeModel)_tree.getModel();
- }
-
- //
- // Contruct a brand-new Application from an ephemeral Application
- //
- Root(Root root) throws UpdateFailedException
- {
- super(true, null, root._descriptor.name);
- _ephemeral = false;
- _coordinator = root._coordinator;
- _descriptor = root._descriptor;
-
- assert root._ephemeral;
- init();
+ _file = null;
+ _live = false;
+
+ try
+ {
+ init();
+ }
+ catch(UpdateFailedException e)
+ {
+ //
+ // Impossible
+ //
+ assert false;
+ }
}
+
private void init() throws UpdateFailedException
{
_resolver = new Utils.Resolver(_descriptor.variables);
@@ -280,16 +277,15 @@ public class Root extends ListTreeNode
{
actions[PASTE] = descriptor instanceof ApplicationDescriptor;
}
- if(!_ephemeral)
- {
- actions[SHOW_VARS] = true;
- actions[SUBSTITUTE_VARS] = true;
- actions[NEW_NODE] = true;
- actions[NEW_REPLICA_GROUP] = true;
- actions[NEW_TEMPLATE_SERVER] = true;
- actions[NEW_TEMPLATE_SERVER_ICEBOX] = true;
- actions[NEW_TEMPLATE_SERVICE] = true;
- }
+
+ actions[SHOW_VARS] = true;
+ actions[SUBSTITUTE_VARS] = true;
+ actions[NEW_NODE] = true;
+ actions[NEW_REPLICA_GROUP] = true;
+ actions[NEW_TEMPLATE_SERVER] = true;
+ actions[NEW_TEMPLATE_SERVER_ICEBOX] = true;
+ actions[NEW_TEMPLATE_SERVICE] = true;
+
return actions;
}
@@ -671,12 +667,12 @@ public class Root extends ListTreeNode
public boolean isEphemeral()
{
- return _ephemeral;
+ return false;
}
public void destroy()
{
- if(_ephemeral || (!_live && _file == null))
+ if(!_live && _file == null)
{
_coordinator.getMainPane().removeApplication(this);
}
@@ -1126,7 +1122,6 @@ public class Root extends ListTreeNode
//
private JTree _tree;
private DefaultTreeModel _treeModel;
- private final boolean _ephemeral;
private Utils.Resolver _resolver;
private boolean _live;
@@ -1148,7 +1143,7 @@ public class Root extends ListTreeNode
//
// When this application (and children) is being updated, we
- // no longer apply updates from the Registry. Only meaningful when
+ // no longer apply updates from the registry. Only meaningful when
// _live == true
//
private boolean _registryUpdatesEnabled = true;