DESCRIPTION

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>
   
Change-Id: I3e0b8cd23be957c8c6a8199ce6818282fb24dc68


COMMENTS

author: Douglas Trujillo
date: 2010-12-21 00:34:09.000000000

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

(17 inline comments)

could you add a change on top of this one illustrating how you intend to use the proposed extension point ?

Line:1, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> missing license header

Line:12, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> should be rather a link

Line:14, org.eclipse.egit.ui/src/org/eclipse/egit/ui/ICommitMessageProvider.java -> Primalary ? Sounds like a typo.

Line:1, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> missing license header

PDE's extension point schema editor in helios can't open this and fails with a NPE

Line:9, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> missing documentation

Line:26, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> style nit: trailing whitespace

missing extension point documentation

Line:33, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> style nit: trailing whitespace

missing extension point documentation

Line:40, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> style nit: trailing whitespace

missing extension point documentation

Line:55, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> style nit: trailing whitespace

missing extension point documentation

Line:70, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> missing extension point documentation

Line:79, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> missing extension point documentation

Line:88, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> missing extension point documentation

Line:97, org.eclipse.egit.ui/schema/commitMessageProvider.exsd -> missing extension point documentation

Line:459, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> use StringBuilder to concatenate strings

Line:7, /COMMIT_MSG -> start commit message with a short (<70 chars) summary line followed by a blank line otherwise its not nicely formatted by git command line tools.

style nit: trailing whitespace

Line:13, /COMMIT_MSG -> style nits: trailing whitespace, inconsistent indentation

Line:19, /COMMIT_MSG -> style nit: trailing whitespace

-------------------------------------
author: Kennedi Macias
date: 2010-12-21 10:15:56.000000000

Patch Set 1: (1 inline comment)

What is my intention of the usage of this extension point:

In an own plugin org.eclipse.egit.mylyn I can implement the ICommitMessageProvider:

public class MylynMessageProvider implements ICommitMessageProvider{

   public String getMessage(){
      ITask task = TasksUi.getTaskActivityManager().getActiveTask();
      
      String comment = 
           ContextChangeSet.getComment(...);
      return comment;
   }
}

This class is the messageprovider I needed to configure in plugin.xml. So I am able to add the mylyn's generated commit message for the currently activated task.

I have another idea to add more functions for a really task-focused working with eclipse, git and mylyn.
If you are interested we can discuss this on the dev list.

Line:459, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> mhh...I think the Java compiler use a StringBuilder internally

-------------------------------------
author: Douglas Trujillo
date: 2010-12-21 16:30:20.000000000

Patch Set 1: (1 inline comment)



Line:459, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> you are right, FindBugs was complaining so I blindly copied that complaint here without using my brain

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