use of org.rstudio.studio.client.workbench.views.presentation.events.SourceFileSaveCompletedEvent in project rstudio by rstudio.
the class TextEditingTarget method postSaveCommand.
private Command postSaveCommand() {
return new Command() {
public void execute() {
// fire source document saved event
FileSystemItem file = FileSystemItem.createFile(docUpdateSentinel_.getPath());
events_.fireEvent(new SourceFileSaveCompletedEvent(file, docUpdateSentinel_.getContents(), docDisplay_.getCursorPosition()));
// check for source on save
if (fileType_.canSourceOnSave() && docUpdateSentinel_.sourceOnSave()) {
if (fileType_.isRd()) {
previewRd();
} else if (fileType_.canPreviewFromR()) {
previewFromR();
} else {
if (docDisplay_.hasBreakpoints()) {
hideBreakpointWarningBar();
}
consoleDispatcher_.executeSourceCommand(docUpdateSentinel_.getPath(), fileType_, docUpdateSentinel_.getEncoding(), activeCodeIsAscii(), false, false, docDisplay_.hasBreakpoints());
}
}
}
};
}
Aggregations