Search in sources :

Example 1 with RenderRmdEvent

use of org.rstudio.studio.client.rmarkdown.events.RenderRmdEvent in project rstudio by rstudio.

the class RmdOutput method reRenderPreview.

private void reRenderPreview(String targetFile) {
    if (outputFrame_ == null)
        return;
    livePreviewRenderInProgress_ = true;
    RmdPreviewParams params = outputFrame_.getPreviewParams();
    if (targetFile == null)
        targetFile = params.getTargetFile();
    RenderRmdEvent renderEvent = new RenderRmdEvent(targetFile, 1, params.getResult().getFormatName(), params.getResult().getTargetEncoding(), null, false, RmdOutput.TYPE_STATIC, null, null, null);
    events_.fireEvent(renderEvent);
}
Also used : RmdPreviewParams(org.rstudio.studio.client.rmarkdown.model.RmdPreviewParams) RenderRmdEvent(org.rstudio.studio.client.rmarkdown.events.RenderRmdEvent)

Example 2 with RenderRmdEvent

use of org.rstudio.studio.client.rmarkdown.events.RenderRmdEvent in project rstudio by rstudio.

the class RmdOutput method onPreviewRmd.

@Override
public void onPreviewRmd(final PreviewRmdEvent event) {
    RenderRmdEvent renderEvent = new RenderRmdEvent(event.getSourceFile(), 1, null, event.getEncoding(), null, false, RmdOutput.TYPE_STATIC, event.getOutputFile(), null, null);
    events_.fireEvent(renderEvent);
}
Also used : RenderRmdEvent(org.rstudio.studio.client.rmarkdown.events.RenderRmdEvent)

Aggregations

RenderRmdEvent (org.rstudio.studio.client.rmarkdown.events.RenderRmdEvent)2 RmdPreviewParams (org.rstudio.studio.client.rmarkdown.model.RmdPreviewParams)1