| Summary: | FR: Hook into the commit process | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | staudta | ||||
| Component: | UI | Assignee: | Project Inbox <egit.ui-inbox> | ||||
| Status: | NEW --- | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | fabian.pfaff, jhelming, lars.ohlen, mkoegel, staudta | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
staudta
Created attachment 185752 [details]
Implementation Proposal for the feature
The classes “CommitActionHandler” and “CommitOperation” needed to be extended. To provide a possibility to hook into that commit process we created a new extension point called “CommitObserver”. The modified CommitActionHandler takes, at execution time, a look into the Eclipse extension registry if there are some commit observer. Such a commit observer has a prepare phase and a finalize phase. Each phase can abort the commit process.
During the prepare phase are changes allowed to the CommitDialog, especially to set a predefined commit message.
The finalize phase can change the CommitOperation. Basically the set of files that have to be committed can be modified.
This is important for us because we want to force that for some files also there “meta-data” will be committed. For our use case, sometimes the meta-data changes after the prepare phase. This can't be avoided. If the meta-data was unchanged the user cannot selected manually that the meta-data has to be committed too.
We had some problems to create a diff version of the changes that we have done. Therefore the changed files are attached. Please let us know if the changes are ok; or how we can support you in addition. Is it also possible to commit these changes in the near time to the EGit trunk? What do you think?
|