*/
oldActivations = (Collection) registeredWindows.get(null);
if (oldActivations != null) {
final Iterator oldActivationItr = oldActivations.iterator();
while (oldActivationItr.hasNext()) {
final IContextActivation activation = (IContextActivation) oldActivationItr
.next();
deactivateContext(activation);
}
}
}
/*
* If the new active shell is recognized as a dialog by default, then
* create some submissions, remember them, and submit them for
* processing.
*/
if ((newShell != null) && (!newShell.isDisposed())) {
final Collection newActivations;
if ((newShell.getParent() != null)
&& (registeredWindows.get(newShell) == null)) {
// This is a dialog by default.
newActivations = new ArrayList();
final Expression expression = new ActiveShellExpression(
newShell);
final IContextActivation dialogWindowActivation = new ContextActivation(
IContextService.CONTEXT_ID_DIALOG_AND_WINDOW,
expression, contextService);
activateContext(dialogWindowActivation);
newActivations.add(dialogWindowActivation);
final IContextActivation dialogActivation = new ContextActivation(
IContextService.CONTEXT_ID_DIALOG, expression,
contextService);
activateContext(dialogActivation);
newActivations.add(dialogActivation);
registeredWindows.put(null, newActivations);