winterstein / Eclipse-Markdown-Editor-Plugin

Adds Markdown text editing support to Eclipse
Eclipse Public License 1.0
297 stars 73 forks source link

markdown/editors: Update preview when the file is saved #48

Closed oliviermartin closed 9 years ago

oliviermartin commented 9 years ago

This change refresh the Markdown HTML Preview view when the editor is saved.

This change solves the issue #11 .

paulvi commented 9 years ago

will it save energy, when View is hidden ?

oliviermartin commented 9 years ago

It could be added as a future change.

I wanted to fix the major issue of updating the preview View. Without this change the user has to use a workaround to update the preview View such as switching to another source file and coming back on the .md file.

While with this change, the user only needs to save his/her .md file to update the preview.

winterstein commented 9 years ago

A few people have raised this issue, so glad to have it fixed.

@oliviermartin Have you tested it for if the preview view isn't present? Possibility for a NullPointerException here. Maybe wrap that update call in a try--catch block?

oliviermartin commented 9 years ago

@winterstein good catch! I have just updated the patch to check if MarkdownPreview.preview is null.

paulvi commented 9 years ago

It could be added as a future change.

well, i'd like to do just one 1.2 release #52