Search in sources :

Example 1 with ConsoleAction

use of org.rstudio.studio.client.workbench.model.ConsoleAction in project rstudio by rstudio.

the class Shell method sessionInit.

private void sessionInit(Session session) {
    SessionInfo sessionInfo = session.getSessionInfo();
    ClientInitState clientState = sessionInfo.getClientState();
    new StringStateValue(GROUP_CONSOLE, STATE_INPUT, ClientState.TEMPORARY, clientState) {

        @Override
        protected void onInit(String value) {
            initialInput_ = value;
        }

        @Override
        protected String getValue() {
            return view_.getInputEditorDisplay().getText();
        }
    };
    JsArrayString history = sessionInfo.getConsoleHistory();
    if (history != null)
        setHistory(history);
    RpcObjectList<ConsoleAction> actions = sessionInfo.getConsoleActions();
    if (actions != null) {
        view_.playbackActions(actions);
    }
    if (sessionInfo.getResumed()) {
    // no special UI for this (resuming session with all console
    // history and other UI state preserved deemed adequate feedback) 
    }
}
Also used : ConsoleAction(org.rstudio.studio.client.workbench.model.ConsoleAction) SessionInfo(org.rstudio.studio.client.workbench.model.SessionInfo) StringStateValue(org.rstudio.studio.client.workbench.model.helper.StringStateValue) JsArrayString(com.google.gwt.core.client.JsArrayString) JsArrayString(com.google.gwt.core.client.JsArrayString) ClientInitState(org.rstudio.studio.client.workbench.model.ClientInitState)

Aggregations

JsArrayString (com.google.gwt.core.client.JsArrayString)1 ClientInitState (org.rstudio.studio.client.workbench.model.ClientInitState)1 ConsoleAction (org.rstudio.studio.client.workbench.model.ConsoleAction)1 SessionInfo (org.rstudio.studio.client.workbench.model.SessionInfo)1 StringStateValue (org.rstudio.studio.client.workbench.model.helper.StringStateValue)1