Bug 329500 - Add ability to extend the CVS commit screen
Summary: Add ability to extend the CVS commit screen
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 17:49 EDT by Brian Mauter CLA
Modified: 2019-09-06 16:18 EDT (History)
2 users (show)

See Also:


Attachments
how we modify the CVS commit window (83.90 KB, image/png)
2010-11-04 17:50 EDT, Brian Mauter CLA
no flags Details
proposed patch (10.74 KB, patch)
2010-11-04 17:51 EDT, Brian Mauter CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Mauter CLA 2010-11-04 17:49:18 EDT
Build Identifier: I20100608-0911

At the company I work for, we add bug IDs (and other attributes) to our cvs commit messages.  Tags are used for other things.  For example, one message might be "BUG#12345 Project#123456 my message here ****CUSTOM*****".  It is very error-prone to make the user type this every time.

We have solved this issue by pulling down the source for org.eclipse.team.cvs.ui and modifying CommitCommentArea.java.  Thankfully Eclipse is open source!  However, it would be good to offer this back to the community.  Our approach was to make it easy to extend CommitCommentArea, not just modify the source.  We created an extensionpoint and there's a new method on CommitCommentArea that tries to load the extended version instead of the vanilla CommitCommentArea.  It works rather well.  We keep the UI code that is specific for our needs in our own plugin and the only changes to the Eclipse source is the ability to be extended.  We identified four places that instantiate CommitCommentArea and modified them to call our new method that checks for an extension.  This means that if you commit something from a wizard or from a right-click of the file or anywhere, the dialog is always properly modified.

In the attached screenshot, the red box highlights how we modified the commit box.  When you click Finish, our plugin gets a chance to override the user's message.  It's there that we put everything together in a predictable way.  The attached code is what we modified in the Eclipse source to let us do this, not the actual screen changes that add the combo, check and radio options.

We understand that this is likely not the best way to go about it, but it does work well for us so maybe it's a legitimate starting point.  I'm aware that this class is in an internal package, but rather than cloud the intent of the change by pulling it out of the internal package and putting it elsewhere, we kept it simple and are unfortunately using internal APIs.

Using mylyn is not an option since a lot of other processes here read those CVS commit messages.

Reproducible: Always

Steps to Reproduce:
1.  Modify a file that is checked in to CVS.
2.  Right-click the file and choose Team->Commit.
3.  Observe that it would be nice to have some metadata that goes along with the user's commit message.
Comment 1 Brian Mauter CLA 2010-11-04 17:50:05 EDT
Created attachment 182441 [details]
how we modify the CVS commit window
Comment 2 Brian Mauter CLA 2010-11-04 17:51:09 EDT
Created attachment 182442 [details]
proposed patch
Comment 3 Tomasz Zarna CLA 2010-12-22 09:01:15 EST
(In reply to comment #0)
> Using mylyn is not an option since a lot of other processes here read those CVS
> commit messages.

Could you please elaborate on that? Why Mylyn's Commit Comment Template won't work in your case. Is the fact that you need to create a properly named task a problem here? Have you examined the set of variables you can use in the template?
Comment 4 Eclipse Webmaster CLA 2019-09-06 16:18:53 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.