Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331364 - [Build] BuildContext API possible improvements
Summary: [Build] BuildContext API possible improvements
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on: 329338
Blocks:
  Show dependency tree
 
Reported: 2010-11-29 12:34 EST by Szymon Brandys CLA
Modified: 2011-02-07 04:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.