Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331364

Summary: [Build] BuildContext API possible improvements
Product: [Eclipse Project] Platform Reporter: Szymon Brandys <Szymon.Brandys>
Component: ResourcesAssignee: Szymon Brandys <Szymon.Brandys>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: api
Version: 3.7   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 329338    
Bug Blocks:    

Description Szymon Brandys CLA 2010-11-29 12:34:44 EST
Bug 329338 introduces new API. We started a discussion whether BuildContext should be available via IncrementalProjectBuilder#getContext or maybe, like a build kind, it should be passed as an argument to #build.
The context lives at the build execution time only, so it does not make sense to call IPB#getContext outside the build operation. Even, if only Build Framework can operate on builders, we should discuss the issue.
Comment 1 Szymon Brandys CLA 2011-01-26 04:24:50 EST
We need to address it during M6.
Comment 2 James Blackburn CLA 2011-01-26 04:46:30 EST
I actually think the current API is OK.  Personally I don't think this warrants changing existing API as that will just make the API more complex .  Also, there's precedent for methods which provide metadata on the build: #getCommand, #getDelta, #getProject, #isInterrupted, #hasBeenBuilt. All of these are only valid in the context of a build.

(In reply to comment #0)
> The context lives at the build execution time only, so it does not make sense
> to call IPB#getContext outside the build operation. Even, if only Build
> Framework can operate on builders, we should discuss the issue.

The IncProjBuilder is a call-back based API.  Builders don't make sense outside of a core.resources driven #build / #clean call.  I don't think clients have, or expect to be able to, use builders outside of an actual build.
Comment 3 Szymon Brandys CLA 2011-01-26 04:51:44 EST
Sounds fair. We need to remove EXPERIMENTAL tags then during M6 and we are done :-)
Comment 4 Szymon Brandys CLA 2011-02-07 04:55:22 EST
I removed the experimental tags.