Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] Win32RefreshProvider

Hi Jason,

Take a look at IResourceDeltaVisitor :)

You can do a type compare of your delta.getResource() to IFolder.  The
resource kind is identifies the action taken (i.e. delta.getKind() is
IResourceDelta.ADDED).

Hth :)


Cherie G. Wong
Software Developer, The Eclipse Project


                                                                           
             Jason Chan                                                    
             <jc.eagle@gmail.c                                             
             om>                                                        To 
             Sent by:                  pde-dev@xxxxxxxxxxx                 
             pde-dev-admin@ecl                                          cc 
             ipse.org                                                      
                                                                   Subject 
                                       Re: [pde-dev] Win32RefreshProvider  
             02/08/2005 10:51                                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
                  pde-dev                                                  
                                                                           
                                                                           




Hi Cherie,

Thanks for your reply and the links.  I really appreciate it.
I think I got it working in my program.  I just simply instantiate the
Win32RefreshProvider and then call its installMonitor with a parameter
of IFolder and a parameter of derived IRefreshResult class.  It does
the refresh but there is about 2 secs delay.  I will try to look into
the links to search for the right way to implement this.

Do you know whether there is a way to detect a new add folder to IProject?
I know there is a IResourceChangeListener, but it does not detect the ADD
event.

Again, thanks for the help.
Happy Chinese New Year!

Regards,
-Jason :)

On Thu, 3 Feb 2005 15:13:04 -0500, Cherie Wong <cgwong@xxxxxxxxxx> wrote:
>
>
> Hi Jason,
>
> It sounds like you copied the extension as-is from the developer guide
> which isn't what you want.  That particular extension is for the
> org.eclipse.core.resources.win32 fragment.
>
> Try to set the class attribute to a class of yours that extends
> RefreshProvider. Recall, this class is responsible for installing a
monitor
> on a specific resource and its resource subtree if it is a project or
> folder. The monitor must implement IRefreshMonitor.
>
> The "PDE Does Plug-ins" article
> (http://eclipse.org/articles/Article-PDE-does-plugins/PDE-intro.html)
does
> a better job of explaining extensions if you're just getting started.
>
> For future reference, the newsgroups might strike your fancy too. ;-)
> (http://eclipse.org/newsgroups/index.html)
>
> Yours,
> Cherie G. Wong
> Software Developer, The Eclipse Project
>
>             Jason Chan
>             <jc.eagle@gmail.c
>             om>                                                        To
>             Sent by:                  pde-dev@xxxxxxxxxxx
>             pde-dev-admin@ecl                                          cc
>             ipse.org
>                                                                   Subject
>                                       [pde-dev] Win32RefreshProvider
>             02/01/2005 04:52
>             PM
>
>             Please respond to
>                  pde-dev
>
>
> Hi,
>
> I tried to use the default behavior of
> org.eclipse.core.internal.resources.refresh.win32.Win32RefreshProvider.
> I added the extension point which I copied from platform plugin
> developer guide.  I thought the extension point will register the
> Win32RefreshProvider to monitor the external files and refresh the
> workspace properly, but I didn't get it working.  Do I need to
> programmatically link the Win32RefreshProvider to my workspace?
>
> Please help if you know how to get Win32RefreshProvider working.
>
> Thanks,
> -Jason
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/pde-dev
>
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/pde-dev
>
_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/pde-dev




Back to the top