refresh editor [message #18073] |
Thu, 28 August 2008 15:32  |
Eclipse User |
|
|
|
If I have an open editor and make changes to the file that is associated to
it, how can I get the editor to refresh iteself?
|
|
|
Re: refresh editor [message #18086 is a reply to message #18073] |
Thu, 28 August 2008 16:44  |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Jay Simpson wrote:
> If I have an open editor and make changes to the file that is associated to
> it, how can I get the editor to refresh iteself?
>
>
Your editor has to register a IResourceChangeListener [see
ResourcesPlugin.getWorkspace().addResourceChangeListener()] and then
pick out changes to the file(s) it is interested in, and do whatever it
needs in order to refresh itself.
This article will help in implementing an efficient change listener:
http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
Hope this helps,
Eric
|
|
|
Re: refresh editor [message #577770 is a reply to message #18073] |
Thu, 28 August 2008 16:44  |
Eclipse User |
|
|
|
Jay Simpson wrote:
> If I have an open editor and make changes to the file that is associated to
> it, how can I get the editor to refresh iteself?
>
>
Your editor has to register a IResourceChangeListener [see
ResourcesPlugin.getWorkspace().addResourceChangeListener()] and then
pick out changes to the file(s) it is interested in, and do whatever it
needs in order to refresh itself.
This article will help in implementing an efficient change listener:
http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.03295 seconds