Community
Participate
Working Groups
I20081111-0800. When refreshing a resource some other models need to do more work, e.g. the Java model needs to refresh the stuff on the build path of a project. Currently F5/Refresh only works in the Package Explorer because it does this additional work. If F5/Refresh is done in the Navigator or Project Explorer (or any core code calling project.refreshLocal(...)) then the Java model isn't updated. I suggest that we send out a resourceChanged event when a refresh is done. Models could then do the additional work when they get such an event.
There is already IResourceChangeEvent#PRE_REFRESH. We can add POST_REFRESH to indicate the end of project refreshing.
Yes, post event would be better because then, the model can rely on the resources already being updated. Also, PRE_REFRESH is pretty limiting because it is only fired for projects i.e. if I refresh the whole workspace no event is fired. Same if refresh a folder or file.
>if I refresh the whole workspace no event is fired Filed bug 255325 to track this.
(In reply to comment #0) > > I suggest that we send out a resourceChanged event when a refresh is done. > Models could then do the additional work when they get such an event. > Another approach would be to schedule a workspace job when PRE_REFRESH is caught. This job would start right after refresh is finished.
Only external jars are refreshed differently by the Java model. If we refreshed external jars in PRE_REFRESH, refreshing in the Navigator would behave exactly as in the Package Explorer. There is already a request in JDT/Core (can't find it right now) to handle the refresh of external jars in PRE_REFRESH.
(In reply to comment #5) > There is already a request in JDT/Core (can't find it right now) to handle the > refresh of external jars in PRE_REFRESH. The request is bug 255174
(In reply to comment #6) Regarding comment 4 and comment 6, is this request still valid?
Given that bug 255325 is fixed and if JDT Core can solve the problem with PRE_REFRESH then this can be closed.
I has a quick chat with Jerome. We all agree that the bug can be closed.