List of usage examples for com.google.gwt.eclipse.core.runtime GWTRuntime getFactory
public static SdkFactory<GWTRuntime> getFactory()
From source file:com.google.gwt.eclipse.testing.GwtRuntimeTestUtilities.java
License:Open Source License
/** * Adds a default GWT runtime to the {@link GWTPreferences}. Uses the {@code GWT_HOME} environment * variable if it is set, otherwise extracts a GWT SDK from this testing bundle and sets * {@code GWT_HOME} to the location where it is extracted. *///from w w w.ja v a2 s . c om public static void addDefaultRuntime() throws Exception { String gwtHomePath = getGwtTestSdkPath(); TestEnvironmentUtil.updateEnvironmentVariable("GWT_HOME", gwtHomePath); System.out.println("SETTING: GWT_HOME=" + gwtHomePath); SdkSet<GWTRuntime> sdkSet = GWTPreferences.getSdks(); if (sdkSet.getDefault() == null) { assert (sdkSet.size() == 0); GWTRuntime sdk = GWTRuntime.getFactory().newInstance("Default GWT SDK", new Path(gwtHomePath)); IStatus status = sdk.validate(); if (!status.isOK()) { throw new CoreException(status); } sdkSet.add(sdk); GWTPreferences.setSdks(sdkSet); } }