Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to programatically refresh a folder from a plugin?
How to programatically refresh a folder from a plugin? [message #152790] Tue, 04 November 2003 11:40 Go to next message
Eclipse UserFriend
Originally posted by: FLawlor.TMRS.org

I wrote a plugin and it tries to do a refresh on a directory to which I
have added files using Window's explorer (simplified):

IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IProject project = workspaceRoot.getProject("MyProject");
project.open(null);
IFolder folder = project.getFolder("source/foo/bar");
folder.refreshLocal(99, null);
System.out.println("Successfully refreshed.");

This says it runs fine, but

1) The GUI is not refreshed

2) The actions performed by a GUI menu refresh operation are clearly not
performed since it involves a bunch of compiles, which are not happening
in the programatic case.

How do I simulate the GUI menu refresh operation?

Thanks,
-- Frank
Re: How to programatically refresh a folder from a plugin? [message #155122 is a reply to message #152790] Mon, 10 November 2003 18:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

Look at the javadoc for refreshLocal. You're passing an illegal value
for the "depth" parameter.
--

Frank wrote:
> I wrote a plugin and it tries to do a refresh on a directory to which I
> have added files using Window's explorer (simplified):
>
> IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
> IProject project = workspaceRoot.getProject("MyProject");
> project.open(null);
> IFolder folder = project.getFolder("source/foo/bar");
> folder.refreshLocal(99, null);
> System.out.println("Successfully refreshed.");
>
> This says it runs fine, but
>
> 1) The GUI is not refreshed
>
> 2) The actions performed by a GUI menu refresh operation are clearly not
> performed since it involves a bunch of compiles, which are not happening
> in the programatic case.
>
> How do I simulate the GUI menu refresh operation?
>
> Thanks,
> -- Frank
>
Re: How to programatically refresh a folder from a plugin? [message #155628 is a reply to message #155122] Tue, 11 November 2003 17:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: FLawlor.TMRS.org

John,

Thanks for the response.

I changed it to IFolder.DEPTH_INFINITE, but I still get the same result.
It completes much too quickly and the GUI folder does not appear refreshed.
Any suggestions, references?


John Arthorne wrote:

> Look at the javadoc for refreshLocal. You're passing an illegal value
> for the "depth" parameter.
> --
Re: How to programatically refresh a folder from a plugin? [message #156022 is a reply to message #155628] Wed, 12 November 2003 17:02 Go to previous message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

It sounds like you're now doing the right thing. This is exactly what
the UI refresh action does (org.eclipse.ui.actions.RefreshAction).
--

Frank wrote:
> John,
>
> Thanks for the response.
>
> I changed it to IFolder.DEPTH_INFINITE, but I still get the same result.
> It completes much too quickly and the GUI folder does not appear refreshed.
> Any suggestions, references?
>
>
> John Arthorne wrote:
>
>
>>Look at the javadoc for refreshLocal. You're passing an illegal value
>>for the "depth" parameter.
>>--
>
>
>
>
Previous Topic:Plugins and Eclipse cvs November 12
Next Topic:Todo list editor?
Goto Forum:
  


Current Time: Tue Jul 22 02:44:09 EDT 2025

Powered by FUDForum. Page generated in 0.04217 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top