state.activate();
return state.getClassLoader();
}
}
// prepare module
ModuleDescription moduleDescription = Utils.getSingleModule(modelUnit);
if (moduleDescription == null) {
throw new DesignerException(IExceptionConstants.NO_MODULE_FILE);
}
// always include standard D2 ClassLoader's
CompositeClassLoader parentClassLoader;
{
parentClassLoader = createClassLoader_parent(editor);
initializeClassLoader_parent(editor, parentClassLoader);
// add ClassLoader to use only for loading resources
{
ClassLoader resourcesClassLoader = moduleDescription.getClassLoader();
parentClassLoader.add(resourcesClassLoader, ImmutableList.<String>of(), null);
}
}
// initialize GWTState
final GwtState state = new GwtState(parentClassLoader, moduleDescription);