DESCRIPTION

Created an extension point to extend the commit message.

To integrate Mylyn's commit templates an extension point
is needed. This extension point provides an interface you
must implement. During the preparation of the commit
dialogs the extensions using this extension points will be
requested for a message to add to the dialog.

Here is a sample configuration:
<extension
    point="org.eclipse.egit.ui.commitMessageProvider">
    <commitMessageProvider
        class="org.eclipse.egit.mylyn.CommitMessageProvider">
    </commitMessageProvider>
</extension>

The mylyn integration is done. You will find them in the 
org.eclipse.egit.mylyn project. The implementation of the
ICommitMessagProvider has the ability to check if there are a
project-specific configuration for mylyn's commit message templates.

Change-Id: I3e0b8cd23be957c8c6a8199ce6818282fb24dc68


COMMENTS

author: Kennedi Macias
date: 2010-12-22 15:13:52.000000000

Uploaded patch set 5.

-------------------------------------
author: Kennedi Macias
date: 2010-12-22 15:18:19.000000000

Patch Set 5:

Now I have added the org.eclipse.egit.mylyn plugin. So you can see the full usage of the ICommitMessageProvider extension.

Additionally feature I have added is the use of a project specific commit template. For this you must enter the project properties and add a template at Task Repository -> Commit Template.
Andf -of cource - you must add a query in mylyn and activate a task :)

-------------------------------------
author: Juliet Cantu
date: 2010-12-23 09:14:52.000000000

Patch Set 5: I would prefer that you didn't submit this

(15 inline comments)



Line:8, org.eclipse.egilt.mylyn/.settings/org.eclipse.jdt.core.prefs -> Use same setting as the rest of the egit projects

Line:23, /COMMIT_MSG -> Is this all that is needed for Mylyn?

trailing whitespace

Line:4, org.eclipse.egilt.mylyn/src/org/eclipse/egilt/mylyn/EgitMylynPlugin.java -> style nitpick: extra whitspace

Line:20, org.eclipse.egilt.mylyn/src/org/eclipse/egilt/mylyn/EgitMylynPlugin.java -> style nit-pick: trailng whitespace

Line:47, org.eclipse.egilt.mylyn/src/org/eclipse/egilt/mylyn/EgitMylynPlugin.java -> needed?

Line:55, org.eclipse.egilt.mylyn/src/org/eclipse/egilt/mylyn/EgitMylynPlugin.java -> needed?

Line:3, org.eclipse.egilt.mylyn/src/org/eclipse/egilt/mylyn/internal/MylynCommitMessageProvider.java -> extra whitespace,
copyright to yourself or employer

Line:24, org.eclipse.egilt.mylyn/src/org/eclipse/egilt/mylyn/internal/MylynCommitMessageProvider.java -> trailing whitespace
we don'd use xxx@xxx.xxx tag

Line:52, org.eclipse.egilt.mylyn/src/org/eclipse/egilt/mylyn/internal/MylynCommitMessageProvider.java -> trailing whitespace

Line:456, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> Why are only projects included in the resources set? If only projects can be included, the type should be IProject, right?

Line:468, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> what if the ICommitMessageProvider returns null?

Line:469, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> No exception of the extension is of the wrong type?

Line:2, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> 1:something is missing here.

2:We generally assign copyright to either the author or employer, depending on what is most appropriate.

Line:25, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> We don't use xxx@xxx.xxx tag

Line:32, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> ...with platform specific line endings
can return null

-------------------------------------
author: Kennedi Macias
date: 2010-12-23 09:35:23.000000000

Patch Set 5: (7 inline comments)



Line:8, org.eclipse.egilt.mylyn/.settings/org.eclipse.jdt.core.prefs -> What are the settings?

Line:456, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> The interface i use need an array of IResource not IProject. So its clearer to use the correct type. I am not sure why mylyn uses IResource instead of IProject. I haven't seen any config options to configure commit templates on resource base.

Line:468, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> I think that isn't possible. Mylyn has a fallback on workspace base. There is always a commit template.
But I can add a null check in the implementation of the ICommitMessageProvider

Line:469, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> ??? I throw a CoreException!

Line:2, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> oh...that is new for me. I will fix this later. But this informations aren't clearly in the ContributorGuide.

Line:25, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> same as above

Line:32, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> This I don't understand

-------------------------------------
author: Juliet Cantu
date: 2010-12-24 00:37:40.000000000

Patch Set 5: (3 inline comments)



Line:8, org.eclipse.egilt.mylyn/.settings/org.eclipse.jdt.core.prefs -> See those projects' .settings

Line:468, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> MylynCommitMessageProvider.getMessage has two occurrences of "return null"...

Line:469, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> if (provider instanceof ICommitMessageProvider) {
   ....
}
// no else

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