Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 291534 - Migrate resource refreshing support to headless plug-in
Summary: Migrate resource refreshing support to headless plug-in
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 M3   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 264338
  Show dependency tree
 
Reported: 2009-10-06 16:37 EDT by Darin Wright CLA
Modified: 2009-10-13 11:47 EDT (History)
1 user (show)

See Also:
Michael_Rennie: review+


Attachments
patch (57.75 KB, patch)
2009-10-06 16:37 EDT, Darin Wright CLA
no flags Details | Diff
Associated tests (17.24 KB, patch)
2009-10-06 16:38 EDT, Darin Wright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2009-10-06 16:37:33 EDT
Created attachment 148941 [details]
patch

In support of bug 264338, support in the RefreshTab to persist, restore, and
refresh resources should be moved to the debug.core plug-in such that headless
ant and external tool launchers can leverage the function. As well, the notion
on a PRIVATE launch config has been moved to ILaunchManager.

The attached patch provides updates to debug.ui and debug.core. The majority of
the refresh support is provided in the new RefreshUtil class in debug.core. Old
methods in the debug.ui delegate to the new API utility class in core.
Comment 1 Darin Wright CLA 2009-10-06 16:38:28 EDT
Created attachment 148942 [details]
Associated tests
Comment 2 Darin Wright CLA 2009-10-06 17:10:11 EDT
Applied to HEAD. Fixed. Please verify, Mike.
Comment 3 Darin Wright CLA 2009-10-08 11:04:08 EDT
Discovered a bug with this... when a refresh variable like ${project} can not be resolved, the new implementation throws an exception rather than returning an empty resource collection. For example:

Errors occurred during the build.
  Errors running builder 'Integrated External Tool Builder' on project 'org.eclipse.equinox.p2.publisher'.
    Unable to restore resource memento: ${project}
  Unable to restore resource memento: ${project}
  Errors running builder 'Integrated External Tool Builder' on project 'org.eclipse.equinox.p2.metadata.generator'.
    Unable to restore resource memento: ${project}
  Unable to restore resource memento: ${project}
  Errors running builder 'Integrated External Tool Builder' on project 'org.eclipse.equinox.p2.repository.tools'.
    Unable to restore resource memento: ${project}
  Unable to restore resource memento: ${project}
  Errors running builder 'Integrated External Tool Builder' on project 'org.eclipse.equinox.p2.director.app'.
    Unable to restore resource memento: ${project}
  Unable to restore resource memento: ${project}

I've modified the code to do the same as before.
Comment 4 Michael Rennie CLA 2009-10-13 11:47:24 EDT
looks good.