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 messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 423
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:
Re: Modify commit message from Eclipse plugin [message #1808708 is a reply to message #1763771] Sat, 29 June 2019 00:05 Go to previous message
jonathan heindl is currently offline jonathan heindlFriend
Messages: 1
Registered: June 2019
Junior Member
does this still work ? I have the exact same thing (just by reverse engineering :P) but it doesnt do anything
Previous Topic:Comparing files from "Unstaged Changes" showing whitespace which should not be there
Next Topic:Beginner Problems
Goto Forum:

Current Time: Thu Jan 20 18:16:36 GMT 2022

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

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

Back to the top