Search in sources :

Example 1 with ImportFileSettingsDialog

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();
}
Also used : ImportFileSettingsDialogResult(org.rstudio.studio.client.workbench.views.environment.dataimport.ImportFileSettingsDialogResult) ImportFileSettingsDialog(org.rstudio.studio.client.workbench.views.environment.dataimport.ImportFileSettingsDialog) SendToConsoleEvent(org.rstudio.studio.client.workbench.views.console.events.SendToConsoleEvent) ImportFileSettings(org.rstudio.studio.client.workbench.views.environment.dataimport.ImportFileSettings) JsArrayString(com.google.gwt.core.client.JsArrayString)

Aggregations

JsArrayString (com.google.gwt.core.client.JsArrayString)1 SendToConsoleEvent (org.rstudio.studio.client.workbench.views.console.events.SendToConsoleEvent)1 ImportFileSettings (org.rstudio.studio.client.workbench.views.environment.dataimport.ImportFileSettings)1 ImportFileSettingsDialog (org.rstudio.studio.client.workbench.views.environment.dataimport.ImportFileSettingsDialog)1 ImportFileSettingsDialogResult (org.rstudio.studio.client.workbench.views.environment.dataimport.ImportFileSettingsDialogResult)1