long startTime = System.nanoTime();
Bundle hostedBundle = Platform.getBundle("com.google.gdt.eclipse.designer.hosted.2_2");
Class<?> hmsClass =
hostedBundle.loadClass("com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport");
Constructor<?> hmsConstructor = hmsClass.getConstructor(IModuleDescription.class);
IHostedModeSupport hms = (IHostedModeSupport) hmsConstructor.newInstance(module);
//
try {
ReflectionUtils.invokeMethod(
hms,
"createModuleSpaceHost(java.lang.String)",
"com.google.gwt.user.User");
} finally {
hms.dispose();
}
if (DEBUG) {
System.out.println("startup time: " + (System.nanoTime() - startTime) / 1000000.0);
}
}