compilerName.setWidth("200px");
compilerName.setValue("latex");
addField(compilerName, "Compiler name:");
submit.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
SystemApplyCompilerSettingsCommand cmd;
if (useDefault.getValue()) {
cmd = new SystemApplyCompilerSettingsCommand();
} else {
if (useCustom.getValue() &&
(clsiServiceUrl.getValue().equals("") ||
clsiServiceToken.getValue().equals("") ||
clsiAsyncPath.getValue().equals("") ||
compilerName.getValue().equals(""))) {
Window.alert("All fields are required.");
return;
} else {
SystemApplyCompilerSettingsCommand.Compiler compiler =
SystemApplyCompilerSettingsCommand.Compiler.REMOTE_DEFAULT_COMPILER;
if (useMikTex.getValue()) {
compiler =
SystemApplyCompilerSettingsCommand.Compiler.LOCAL_MIKTEX_COMPILER;
} else if (useTexLive.getValue()) {
compiler =
SystemApplyCompilerSettingsCommand.Compiler.LOCAL_TEXLIVE_COMPILER;
} else if (useCustom.getValue()) {
compiler =
SystemApplyCompilerSettingsCommand.Compiler.REMOTE_CUSTOM_COMPILER;
}
cmd = new SystemApplyCompilerSettingsCommand(compiler,
clsiServiceUrl.getValue(),
clsiServiceToken.getValue(),
clsiAsyncPath.getValue(),
compilerName.getValue());
}
}
cmd.setContinueCommand(continueCommand);
DynamicCompilerSettingsDialog.this.hide();
CommandEvent.fire(cmd);
}
});
cancel.addClickHandler(new ClickHandler(){