satyagraha / gfm_viewer

An Eclipse plugin providing an accurate view of GitHub Flavored Markdown (.md) files
95 stars 27 forks source link

Update Navigator folder view with generated HTML files #52

Open satyagraha opened 10 years ago

satyagraha commented 10 years ago

The plugin typically writes .filename.md.html files alongside the original filename.md files. However since it does not use the Eclipse Workspace API to write the HTML files, these files not appear in the Navigator folder view immediately after creation. The user needs to press F5 (or context menu Refresh) on the parent folder to see them. See also: http://wiki.eclipse.org/FAQ_When_should_I_use_refreshLocal%3F

Therefore, there are several possible approaches to this issue;

  1. Use the IFile.create() API to write the file
  2. Use the IFile.refreshLocal() API to refresh the parent folder
  3. Do nothing as at present as these files are really of little interest to most users

There are two major complications to a solution:

satyagraha commented 10 years ago

Some more background: http://cvalcarcel.wordpress.com/2011/01/01/help-i-programmatically-created-a-resource-in-my-project-but-my-code-doesnt-find-it/

paulvi commented 10 years ago

The user needs to press F5

In newest Eclipse there is option

General -> Workspace -> Refresh on access General -> Workspace -> Refresh using native hooks or polling (so that you don't need to press F5

https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/configuration.md#optional-general-eclipse-configuration

So if the file is really in folder I should see it after F5 or sometime, but in my experience it was not.

Just confirm that no other folders are used.

satyagraha commented 10 years ago

The HTML files are only visible in the Navigator view (by default) because the Project Explorer and similar views filter out files with a leading ".". The only other alternative is that you had the Use Temp folder option enabled, in which case the HTML files would never be visible under any circumstances.

BTW the point I mentioned about project rebuild overhead on refresh is very important.

paulvi commented 10 years ago

By default I have all files shown, and I encourage everyone to disable filters on project files.

Please reopen #51 that is user oriented. And see if more people ask for that.

satyagraha commented 10 years ago

I think our opinions on the HTML files are not the same! To me, they are simply by-products of the display process and what Eclipse does to hide them is quite right.

So I think I'll wait for any further comments. I will review the IFile options again when time permits.