Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335960 - [IDE] Update BuildAction to use new Workspace Build Configurations API
Summary: [IDE] Update BuildAction to use new Workspace Build Configurations API
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.7   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Prakash Rangaraj CLA
QA Contact: Prakash Rangaraj CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 09:28 EST by James Blackburn CLA
Modified: 2011-03-09 00:05 EST (History)
4 users (show)

See Also:
jamesblackburn+eclipse: review? (Szymon.Brandys)


Attachments
patch 1 (12.20 KB, patch)
2011-02-01 09:28 EST, James Blackburn CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2011-02-01 09:28:35 EST
Created attachment 188044 [details]
patch 1

The Workspace now supports building build configurations and their references.  Currently BuildAction resolves project level references itself and builds the projects in turn. 

This patch updates BuildAction to delegate reference computation and building to the workspace which now has API for this.

To do this I overrode WorkspaceAction's #runInBackground method.  Other potential implementation that I tried didn't work:
  - Changing #invokeOperation -- this doesn't work as the method is invoked once per IResource
  - Overriding #createOperation -- doesn't directly produce a Job so can't mark the operation as belonging to the build family.

#runInBackground is public API and callers expect it to run the BuildAction, so this seems to be the best place for this behaviour (e.g. CleanDialog calls  this directly).  

Even though this is @noextend, there are some extenders (e.g.  CDT).  The patch preserves behaviour: shouldPerformResourcePruning() == true causes references to be built, shouldPerformResourcePruning() == false causes just the selected projects to be built.
Comment 1 James Blackburn CLA 2011-02-08 15:10:15 EST
Any chance this could be targetted for M6 for maximum exposure and so the CDT build action can leverage it?
Comment 2 Prakash Rangaraj CLA 2011-02-09 01:13:52 EST
Yes, I'm looking this one for M6 only.
Comment 3 Prakash Rangaraj CLA 2011-02-23 02:06:25 EST
James,
     
       The patch looks good. But just one small thing. Usually, for the patches, copyright statement will be in the form or "Your Name, Company name - bug id/small desc of the patch". Would you like to attach an updated patch or just go with this?
Comment 4 Dani Megert CLA 2011-02-23 02:36:28 EST
> Usually, for the
> patches, copyright statement will be in the form or "Your Name, Company name -
> bug id/small desc of the patch". Would you like to attach an updated patch or
> just go with this?
FYI: It's good practice to add the credentials, see last paragraph in http://www.eclipse.org/legal/copyrightandlicensenotice.php.
Comment 5 James Blackburn CLA 2011-02-23 03:13:09 EST
(In reply to comment #3)
>        The patch looks good. But just one small thing. Usually, for the
> patches, copyright statement will be in the form or "Your Name, Company name -
> bug id/small desc of the patch". Would you like to attach an updated patch or
> just go with this?

The copyright header is correct for this patch.  This code has evolved over the last year and has had input from a couple developers here.
Comment 6 Boris Bokowski CLA 2011-02-25 11:32:42 EST
Prakash, when you commit this to CVS, can you please add this bug number to the copyright header like suggested by Dani? Thanks!
Comment 7 Prakash Rangaraj CLA 2011-03-03 03:38:11 EST
Patch 1 released to HEAD
Comment 8 Prakash Rangaraj CLA 2011-03-09 00:05:40 EST
Verified in I20110307-2110