Search in sources :

Example 1 with EditDialog

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();
}
Also used : EditDialog(org.rstudio.studio.client.workbench.views.edit.ui.EditDialog)

Example 2 with EditDialog

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();
}
Also used : EditDialog(org.rstudio.studio.client.workbench.views.edit.ui.EditDialog) Size(org.rstudio.core.client.Size) ProgressIndicator(org.rstudio.core.client.widget.ProgressIndicator) VoidServerRequestCallback(org.rstudio.studio.client.server.VoidServerRequestCallback) JSONString(com.google.gwt.json.client.JSONString) Handler(org.rstudio.core.client.command.Handler)

Example 3 with EditDialog

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();
}
Also used : EditDialog(org.rstudio.studio.client.workbench.views.edit.ui.EditDialog)

Aggregations

EditDialog (org.rstudio.studio.client.workbench.views.edit.ui.EditDialog)3 JSONString (com.google.gwt.json.client.JSONString)1 Size (org.rstudio.core.client.Size)1 Handler (org.rstudio.core.client.command.Handler)1 ProgressIndicator (org.rstudio.core.client.widget.ProgressIndicator)1 VoidServerRequestCallback (org.rstudio.studio.client.server.VoidServerRequestCallback)1