use of org.rstudio.studio.client.workbench.views.source.editors.text.events.ChunkSatelliteCacheEditorStyleEvent in project rstudio by rstudio.
the class TextEditingTargetNotebook method onEditorThemeStyleChanged.
// Event handlers ----------------------------------------------------------
@Override
public void onEditorThemeStyleChanged(EditorThemeStyleChangedEvent event) {
// update cached style
editorStyle_ = event.getStyle();
ChunkOutputWidget.cacheEditorStyle(editorStyle_.getColor(), editorStyle_.getBackgroundColor(), DomUtils.extractCssValue("ace_editor", "color"));
for (ChunkOutputUi output : outputs_.values()) {
output.getOutputWidget().applyCachedEditorStyle();
}
events_.fireEvent(new ChunkSatelliteCacheEditorStyleEvent(docUpdateSentinel_.getId(), editorStyle_.getColor(), editorStyle_.getBackgroundColor(), DomUtils.extractCssValue("ace_editor", "color")));
// update if currently executing
if (queue_.isExecuting()) {
NotebookQueueUnit unit = queue_.executingUnit();
if (unit != null) {
setChunkExecuting(unit.getChunkId(), unit.getExecMode(), unit.getExecScope());
}
}
}
use of org.rstudio.studio.client.workbench.views.source.editors.text.events.ChunkSatelliteCacheEditorStyleEvent in project rstudio by rstudio.
the class TextEditingTargetNotebook method onChunkSatelliteWindowOpened.
@Override
public void onChunkSatelliteWindowOpened(ChunkSatelliteWindowOpenedEvent event) {
String docId = event.getDocId();
String chunkId = event.getChunkId();
if (docId != docUpdateSentinel_.getId())
return;
events_.fireEvent(new ChunkSatelliteCacheEditorStyleEvent(docId, editorStyle_.getColor(), editorStyle_.getBackgroundColor(), DomUtils.extractCssValue("ace_editor", "color")));
refreshSatelliteChunk(chunkId);
}
Aggregations