Search in sources :

Example 21 with SessionInfo

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

the class Source method onNewRMarkdownDoc.

@Handler
public void onNewRMarkdownDoc() {
    SessionInfo sessionInfo = session_.getSessionInfo();
    boolean useRMarkdownV2 = sessionInfo.getRMarkdownPackageAvailable();
    if (useRMarkdownV2)
        newRMarkdownV2Doc();
    else
        newRMarkdownV1Doc();
}
Also used : SessionInfo(org.rstudio.studio.client.workbench.model.SessionInfo) NativePreviewHandler(com.google.gwt.user.client.Event.NativePreviewHandler) FileTypeChangedHandler(org.rstudio.studio.client.workbench.views.source.editors.text.events.FileTypeChangedHandler) Handler(org.rstudio.core.client.command.Handler) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) SelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler) CloseHandler(com.google.gwt.event.logical.shared.CloseHandler) ViewDataHandler(org.rstudio.studio.client.workbench.views.data.events.ViewDataHandler) SourceOnSaveChangedHandler(org.rstudio.studio.client.workbench.views.source.editors.text.events.SourceOnSaveChangedHandler) ChangeHandler(com.google.gwt.event.dom.client.ChangeHandler) OpenSourceFileHandler(org.rstudio.studio.client.common.filetypes.events.OpenSourceFileHandler)

Aggregations

SessionInfo (org.rstudio.studio.client.workbench.model.SessionInfo)21 FileSystemItem (org.rstudio.core.client.files.FileSystemItem)4 SessionInitEvent (org.rstudio.studio.client.workbench.events.SessionInitEvent)4 ScheduledCommand (com.google.gwt.core.client.Scheduler.ScheduledCommand)3 Timer (com.google.gwt.user.client.Timer)3 JsObject (org.rstudio.core.client.js.JsObject)3 JsArrayString (com.google.gwt.core.client.JsArrayString)2 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)2 Inject (com.google.inject.Inject)2 ImageResource2x (org.rstudio.core.client.resources.ImageResource2x)2 Operation (org.rstudio.core.client.widget.Operation)2 InvalidSessionInfo (org.rstudio.studio.client.application.model.InvalidSessionInfo)2 GlobalToolbar (org.rstudio.studio.client.application.ui.GlobalToolbar)2 ServerError (org.rstudio.studio.client.server.ServerError)2 VoidServerRequestCallback (org.rstudio.studio.client.server.VoidServerRequestCallback)2 SessionInitHandler (org.rstudio.studio.client.workbench.events.SessionInitHandler)2 ClientInitState (org.rstudio.studio.client.workbench.model.ClientInitState)2 JSObjectStateValue (org.rstudio.studio.client.workbench.model.helper.JSObjectStateValue)2 StringStateValue (org.rstudio.studio.client.workbench.model.helper.StringStateValue)2 PresentationState (org.rstudio.studio.client.workbench.views.presentation.model.PresentationState)2