diff options
-rwxr-xr-x | java/src/IceGridGUI/Application/Root.java | 7 | ||||
-rwxr-xr-x | java/src/IceGridGUI/Coordinator.java | 36 |
2 files changed, 25 insertions, 18 deletions
diff --git a/java/src/IceGridGUI/Application/Root.java b/java/src/IceGridGUI/Application/Root.java index 818706b2d3b..83bbee3e117 100755 --- a/java/src/IceGridGUI/Application/Root.java +++ b/java/src/IceGridGUI/Application/Root.java @@ -687,10 +687,7 @@ public class Root extends ListTreeNode if(confirm == JOptionPane.YES_OPTION)
{
- if(_coordinator.removeApplicationFromRegistry(_id))
- {
- _coordinator.getMainPane().removeApplication(this);
- }
+ _coordinator.removeApplicationFromRegistry(_id);
}
}
else
@@ -977,6 +974,8 @@ public class Root extends ListTreeNode void updated()
{
_updated = true;
+ _registryUpdatesEnabled = false; // can be true before that when updated() is called by destroy()
+
_concurrentUpdates.clear();
_coordinator.getSaveAction().setEnabled(_live || _file != null);
diff --git a/java/src/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/Coordinator.java index 6148fed29ed..13d4bc0dde6 100755 --- a/java/src/IceGridGUI/Coordinator.java +++ b/java/src/IceGridGUI/Coordinator.java @@ -519,7 +519,7 @@ public class Coordinator root.setSelectedNode(root);
}
- public boolean removeApplicationFromRegistry(String name)
+ public void removeApplicationFromRegistry(String name)
{
_mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
@@ -533,7 +533,6 @@ public class Coordinator catch(AccessDeniedException e)
{
accessDenied(e);
- return false;
}
catch(ApplicationNotExistException e)
{
@@ -549,9 +548,6 @@ public class Coordinator }
_mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
-
- _liveApplications.remove(name);
- return true;
}
public void acquireExclusiveWriteAccess(Runnable runnable)
@@ -1341,18 +1337,30 @@ public class Coordinator public void actionPerformed(ActionEvent e)
{
Object[] applicationNames = _liveDeploymentRoot.getApplicationNames();
-
- String appName = (String)JOptionPane.showInputDialog(
- _mainFrame, "Which Application do you want to open?", "Open Application from registry",
- JOptionPane.QUESTION_MESSAGE, null,
- applicationNames, applicationNames[0]);
- if(appName != null)
+ if(applicationNames.length == 0)
+ {
+ JOptionPane.showMessageDialog(
+ _mainFrame,
+ "The registry does not contain any application",
+ "Empty registry",
+ JOptionPane.INFORMATION_MESSAGE);
+ }
+ else
{
- IceGridGUI.Application.Root root = openLiveApplication(appName).getRoot();
- if(root.getSelectedNode() == null)
+ String appName = (String)JOptionPane.showInputDialog(
+ _mainFrame, "Which Application do you want to open?",
+ "Open Application from registry",
+ JOptionPane.QUESTION_MESSAGE, null,
+ applicationNames, applicationNames[0]);
+
+ if(appName != null)
{
- root.setSelectedNode(root);
+ IceGridGUI.Application.Root root = openLiveApplication(appName).getRoot();
+ if(root.getSelectedNode() == null)
+ {
+ root.setSelectedNode(root);
+ }
}
}
}
|