Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[statet-users] document preview with internal Eclipse viewer does not reflect most recent changes


I am using StatET 4.1.0 to render R Markdown documents as HTML. For the most part, the process works well. But the final stage -- document preview -- does not work well. The problem is that changes that I make to the Rmd file are not automatically reflected in the previewed HTML document. Is there a solution to this problem?

To elaborate: I am using the "Auto YAML using R:RMarkdown, single-step" configuration that comes with StatET. When I first create an Rmd document and use this configuration to produce and preview my HTML output, there is no problem. But when I change the Rmd document (for example, by adding text) and then produce and preview my HTML output a second time, the preview doesn't reflect the changes to the document. In Eclipse, focus changes to the "preview" view, but I see a HTML version of the old document, not the updated one.

In a sense, the problem seems clear. A new version of the HTML document is created outside of Eclipse (by rmarkdown::render()). Eclipse doesn't realize that the HTML document has changed, and as a result, its internal browser does not refresh.

There are workarounds. If I set the "Preview Operation" to be done with an external tool (like an external web browser), the latest changes to my document are always reflected. If I keep the default Preview Operation setting, "Open file using Eclipse" -- but hit refresh (F5) every time that focus switches to the preview tab -- the new changes are also reflected. But neither of these workarounds is completely satisfactory.

Other things that don't work:
* Setting "Auto-refresh local changes" in the preview tab.
* Enabling "Refresh using native hooks or polling" in Preferences > General > Workspace.

Thank you for any help that you can offer.


Back to the top