use of org.rstudio.studio.client.workbench.views.edit.ui.EditDialog in project rstudio by rstudio.
the class TextEditingTargetWidget method debug_dumpContents.
@Override
public void debug_dumpContents() {
String dump = editor_.debug_getDocumentDump();
new EditDialog(dump, false, false, new ProgressOperationWithInput<String>() {
@Override
public void execute(String input, ProgressIndicator indicator) {
indicator.onCompleted();
}
}).showModal();
}
use of org.rstudio.studio.client.workbench.views.edit.ui.EditDialog in project rstudio by rstudio.
the class Presentation method onTutorialFeedback.
@Handler
void onTutorialFeedback() {
EditDialog editDialog = new EditDialog("Provide Feedback", "Submit", "", false, true, new Size(450, 300), new ProgressOperationWithInput<String>() {
@Override
public void execute(String input, ProgressIndicator indicator) {
if (input == null) {
indicator.onCompleted();
return;
}
indicator.onProgress("Saving feedback...");
server_.tutorialFeedback(input, new VoidServerRequestCallback(indicator));
}
});
editDialog.showModal();
}
use of org.rstudio.studio.client.workbench.views.edit.ui.EditDialog in project rstudio by rstudio.
the class TextEditingTargetWidget method debug_importDump.
@Override
public void debug_importDump() {
new EditDialog("", false, false, new ProgressOperationWithInput<String>() {
@Override
public void execute(String input, ProgressIndicator indicator) {
indicator.onCompleted();
if (input == null)
return;
input = input.replaceAll("[ \\r\\n]+", " ");
String[] chars = input.split(" ");
StringBuilder sb = new StringBuilder();
for (String s : chars) {
if (s.equals("."))
sb.append('\n');
else
sb.append((char) Integer.parseInt(s));
}
editor_.debug_setSessionValueDirectly(sb.toString());
}
}).showModal();
}
Aggregations