DESCRIPTION

Bug: 486268 Extension point for commit message editor added. 

Change-Id: I88cd984b24f029fa0f2954fd1cc9479d2795ab27
Signed-off-by: Shea Love xxx@xxx.xxx

COMMENTS

author: Evelin Sutton
date: 2016-01-26 20:40:29.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2016-01-26 20:40:35.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8087/

-------------------------------------
author: Brenden Conley
date: 2016-01-26 21:06:04.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/8087/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2016-01-26 22:45:25.000000000

Patch Set 2: Code-Review-1

(27 comments)

Better now, but still fighting with formal issues...

BTW it definitely makes sense to see the next commit on mylyn plugin so that one can see how clients are supposed to use this new API.

Line:56, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitEditorProvider.java -> I already mentioned this on the interface - it is not clear for me what is the purpose of this method. Why it should be contributed but not enabled?

Line:69, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitEditorProvider.java -> I'm not sure I saw changes in UIText and messages bundle.

Line:75, org.eclipse.egit.ui/schema/commitMessageEditor.exsd -> 4.3

Line:96, org.eclipse.egit.ui/schema/commitMessageEditor.exsd -> ? Today we have 2016 :-)

Line:222, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> There is no need to annotate constants, and the change also seem to be completely unrelated to the proposed feature. If needed I would add it later.

Line:61, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageArea.java -> unrelated white space change

Line:72, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageArea.java -> not needed

File Comment: org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/PreferenceConstants.java -> I think this one goes to the next commit, it's absolutely unrelated to the rest.

Line:115, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java -> unrelated white space change

Line:7, /COMMIT_MSG -> Sorry, still not OK, see https://wiki.eclipse.org/EGit/Contributor_Guide

The title should not end wit a dot (and also not with a space).
The Bug: <number> should be on an extra line, after commit message.

Line:17, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> view? You mean editor component?

Line:27, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> can it return null?

Line:34, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> can it return null?

Line:43, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> can it receive null?

Line:96, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> what is supposed to be enabled? All children of the editor or some of its children (I see above that there are different controls)?

Line:100, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> ?

Line:104, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> notified

Line:109, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> do you mean: "listener will be notified when..."?

Line:113, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> notified

Line:122, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> Usually interfaces in Eclipse related projects starts with "I"

Line:125, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> Notified

File Comment: org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java -> All changes here are unrelated white space changes. Please revert to HEAD.

Line:24, org.eclipse.egit.ui/src/org/eclipse/egit/ui/PreferenceConstants.java -> Do we need this class and the constant? I have no IDE right now but I'm pretty sure egit ui plugin id probably exists already somewhere and does not require an extra class to be created.

Line:7, org.eclipse.egit.ui/plugin.xml -> the file name differs from the added in the commit

Line:2, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitEditorProvider.java -> All the headers are from 2012. Please change to the current year (and eventually update your PC's time :-)).

Line:38, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitEditorProvider.java -> ? I can't get it, sorry.

Line:52, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitEditorProvider.java -> A provider returns the state of something it is supposed to create? The purpose is not clear for me.

-------------------------------------
author: Alayna Houston
date: 2016-01-27 20:01:00.000000000

Patch Set 2:

(4 comments)

Interesting idea, but I see a couple of design challenges.

Line:43, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitEditorProvider.java -> Strange name. This is not providing a commit message, it's providing a commit message editor.

Line:51, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitEditorProvider.java -> What if there's more than one? This will need a strategy for dealing with this. Just silently taking the first one may be very confusing. Especially since you have no control over which one will be the first in this array.

I can easily imagine different plugins contributing different editors to this extension point. Maybe one like described in the bugzilla entry, maybe another one that works differently--for instance, the github plugin might want to provide a wysiwyg markdown editor (or a markdown editor with preview). Also, when working with different repositories, I'd probably want to specify per repository which editor to use.

Even when there's only one contributed extension, I'd still like to able to say for which repositories to use the contributed one, and for which ones the default editor should be taken. 

Having such flexibility might get "interesting" (both from an implementation point of view and also from a UI design point of view) in the staging view, especially when set to follow the current selection.

At the very least a user should have the possibility to say "no thanks". Consider the scenario where some plugin in my Eclipse provides a commit message editor that unfortunately doesn't fit my or my company's workflow. Some toggle somewhere to switch off this extension point might be useful.

Line:53, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitEditorProvider.java -> How efficient or inefficient is it to create a new provider always?

Line:20, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageEditor.java -> Do I see this right? Any contributed editor would need to be re-written nearly from scratch -- SpellcheckableMessageArea is internal, so anyone who'd like to have URL hyperlinking, auto-wrapping, or any of the other features would have to re-implement them? If we provide an extension point for pluggable commit message editors, we'd might perhaps also want to refactor that to make such functionality available to implementors of contributed editors as building blocks...

-------------------------------------
