use of org.rstudio.studio.client.workbench.views.environment.dataimport.ImportFileSettingsDialog in project rstudio by rstudio.
the class EnvironmentPresenter method showImportFileDialog.
private void showImportFileDialog(FileSystemItem input, String varname) {
ImportFileSettingsDialog dialog = new ImportFileSettingsDialog(server_, sourceServer_, input, varname, "Import Dataset", new OperationWithInput<ImportFileSettingsDialogResult>() {
public void execute(ImportFileSettingsDialogResult result) {
ImportFileSettings input = result.getSettings();
String var = StringUtil.toRSymbolName(input.getVarname());
String code = var + " <- " + makeCommand(input, result.getDefaultStringsAsFactors()) + "\n View(" + var + ")";
eventBus_.fireEvent(new SendToConsoleEvent(code, true));
}
}, globalDisplay_);
dialog.showModal();
}
Aggregations