diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-10-05 13:18:00 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-10-05 13:18:00 -0400 |
commit | 0ace9a91634271f30743792e9a57853485b1744e (patch) | |
tree | bf8926c60cc6666f3e3f82d8fcd264186b67053f /java/src/IceGridGUI/Application/Root.java | |
parent | Fixed bug 2506 (diff) | |
download | ice-0ace9a91634271f30743792e9a57853485b1744e.tar.bz2 ice-0ace9a91634271f30743792e9a57853485b1744e.tar.xz ice-0ace9a91634271f30743792e9a57853485b1744e.zip |
Fixed bug #2499
Diffstat (limited to 'java/src/IceGridGUI/Application/Root.java')
-rwxr-xr-x | java/src/IceGridGUI/Application/Root.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/java/src/IceGridGUI/Application/Root.java b/java/src/IceGridGUI/Application/Root.java index c1b9427e85e..cdb5a08bc71 100755 --- a/java/src/IceGridGUI/Application/Root.java +++ b/java/src/IceGridGUI/Application/Root.java @@ -1409,6 +1409,36 @@ public class Root extends ListTreeNode return _replicaGroups; } + boolean pasteIceBox(IceBoxDescriptor ibd) + { + // + // During paste, check that all service instances refer to existing services, + // and remove any extra template parameters + // + java.util.Iterator p = ibd.services.iterator(); + while(p.hasNext()) + { + ServiceInstanceDescriptor sid = (ServiceInstanceDescriptor)p.next(); + if(sid.template.length() > 0) + { + TemplateDescriptor td = findServiceTemplateDescriptor(sid.template); + + if(td == null) + { + JOptionPane.showMessageDialog( + _coordinator.getMainFrame(), + "Descriptor refers to undefined service template '" + sid.template + "'", + "Cannot paste", + JOptionPane.ERROR_MESSAGE); + return false; + } + + sid.parameterValues.keySet().retainAll(td.parameters); + } + } + return true; + } + public Root getRoot() { return this; |