public class SuperDevModeGenerator extends Generator{
@Override
public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {
// get the property oracle
PropertyOracle propertyOracle = context.getPropertyOracle();
ConfigurationProperty property = null;
try {
// get mgwt.superdevmode variable
property = propertyOracle.getConfigurationProperty("mgwt.superdevmode");
} catch (BadPropertyValueException e) {
// if we can`t find it die
logger.log(TreeLogger.ERROR, "can not resolve mgwt.superdevmode variable", e);
throw new UnableToCompleteException();
}
ConfigurationProperty superDevModeServer = null;
try {
// get mgwt.superdevmode variable
superDevModeServer = propertyOracle.getConfigurationProperty("mgwt.superdevmode_host");
} catch (BadPropertyValueException e) {
// if we can`t find it die
logger.log(TreeLogger.INFO, "can not resolve mgwt.superdevmode_host variable - using default - http://<server>:9876", e);
}