Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Modify commit message from Eclipse plugin
Modify commit message from Eclipse plugin [message #1763583] Wed, 17 May 2017 15:46 Go to next message
Mikey Hansen is currently offline Mikey HansenFriend
Messages: 1
Registered: May 2017
Junior Member

I'm working on an Eclipse RCP plugin that is supposed to modify (according to some settings) the commit message in the Git Staging View and Commit Dialog. I can see that this feature is available in the EGit Mylyn plugin where the message is preset to match the currently selected task. I cloned the GitHub Mylyn Connector from and I'm trying to figure out how this is achieved. Can you point me to some relevant code samples or give me any helpful hints?

Re: Modify commit message from Eclipse plugin [message #1763771 is a reply to message #1763583] Fri, 19 May 2017 13:03 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 116
Registered: August 2016
Senior Member
Modifying an existing commit message is not supported.

You can provide an initial commit message with a ICommitMessageProvider registered through the org.eclipse.egit.ui.commitMessageProvider extension point.

For instance:
package org.example.myapp;

import org.eclipse.core.resources.IResource;
import org.eclipse.egit.ui.ICommitMessageProvider;

public class DummyCommitMessageProvider implements ICommitMessageProvider {

	public String getMessage(IResource[] resources) {
		return "This is a dummy message\n";


and in your bundle's plugin.xml:
Previous Topic:How to replace local branch with remote branch
Next Topic:Cannot import (local) Git repository
Goto Forum:

Current Time: Wed Jun 19 15:47:03 GMT 2019

Powered by FUDForum. Page generated in 0.02003 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top