for (final ISymbol beanSymbol : beanSymbols)
{
scopeMap.put(beanSymbol.getName(), beanSymbol);
}
final DesignTimeApplicationManager manager = DesignTimeApplicationManager
.getInstance(_externalContextKey.getProject());
if (manager != null)
{
final IDTExternalContext externalContext = manager
.getFacesContext(_externalContextKey)
.getDTExternalContext(_externalContextKey);
scopeMap.putAll(externalContext.getMapForScope(_scopeMask));
DTUIViewRoot viewRoot = manager
.getFacesContext(_externalContextKey)
.getViewRootHandle().getCachedViewRoot();
if (viewRoot == null) {
viewRoot = manager
.getFacesContext(_externalContextKey)
.getViewRootHandle().updateViewRoot();
}
scopeMap.putAll(viewRoot.getViewMap());
}