Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-02-07 12:59:26 +0000
committerThomas Wolf2016-02-29 18:30:14 +0000
commit04b5ae86a4dacfecdd86d7d92c697695fcedfe7b (patch)
treeee8be33f08154ebde4e6a5625cdf7fb157540aea
parent83ad11e2ff549487a8fb3352950266b663bc979b (diff)
downloadegit-04b5ae86a4dacfecdd86d7d92c697695fcedfe7b.tar.gz
egit-04b5ae86a4dacfecdd86d7d92c697695fcedfe7b.tar.xz
egit-04b5ae86a4dacfecdd86d7d92c697695fcedfe7b.zip
Decorate IFolders that are submodule working directory roots
Introduce a new configurable submodule text decoration used for folders that are submodule working directory roots. (Or working directory roots of nested repositories.) The default shows the a dirty indicator, the branch, branch state, and the head commit's short message. The repository name is omitted since it'll always be identical to the folder name. Added a new variable for the short message of the head commit. Change-Id: I75460fd59f2e6c9bd06e82a1966e3d06f97ab709 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java18
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResource.java11
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceAdapter.java12
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceHelper.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java21
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/IDecoratableResource.java9
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java27
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingEntry.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetLabelProvider.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties2
13 files changed, 115 insertions, 11 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java
index c15b6b156f..320344a6f9 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java
@@ -243,6 +243,24 @@ public class SubmoduleFolderTest extends LocalRepositoryTestCase {
}), 5000);
}
+ @Test
+ public void testDecoration() throws Exception {
+ SWTBotTree projectExplorerTree = TestUtil.getExplorerTree();
+ SWTBotTreeItem node = TestUtil.navigateTo(projectExplorerTree,
+ childFolder.getFullPath().segments());
+ waitForDecorations();
+ assertTrue("Folder should have repo/branch decoration",
+ node.getText().contains("[master"));
+ node = TestUtil.getChildNode(node.expand(), CHILDPROJECT);
+ waitForDecorations();
+ assertFalse("Folder should not have repo/branch decoration",
+ node.getText().contains("["));
+ node = TestUtil.navigateTo(projectExplorerTree, CHILDPROJECT);
+ waitForDecorations();
+ assertTrue("Project should have subrepo/branch decoration",
+ node.getText().contains("[child"));
+ }
+
@SuppressWarnings("restriction")
@Test
public void testHistoryFromProjectExplorerIsFromSubRepository()
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java
index 94e275e174..6dc1e80ab7 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java
@@ -69,6 +69,8 @@ public class PluginPreferenceInitializer extends AbstractPreferenceInitializer {
GitLightweightDecorator.DecorationHelper.FOLDER_FORMAT_DEFAULT);
store.setDefault(UIPreferences.DECORATOR_PROJECTTEXT_DECORATION,
GitLightweightDecorator.DecorationHelper.PROJECT_FORMAT_DEFAULT);
+ store.setDefault(UIPreferences.DECORATOR_SUBMODULETEXT_DECORATION,
+ GitLightweightDecorator.DecorationHelper.SUBMODULE_FORMAT_DEFAULT);
store.setDefault(UIPreferences.DECORATOR_SHOW_TRACKED_ICON, true);
store.setDefault(UIPreferences.DECORATOR_SHOW_UNTRACKED_ICON, true);
store.setDefault(UIPreferences.DECORATOR_SHOW_STAGED_ICON, true);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
index 73f0af0c25..9ea9fa7fc4 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
@@ -125,6 +125,8 @@ public class UIPreferences {
/** */
public final static String DECORATOR_PROJECTTEXT_DECORATION = "decorator_projecttext_decoration"; //$NON-NLS-1$
/** */
+ public final static String DECORATOR_SUBMODULETEXT_DECORATION = "decorator_submoduletext_decoration"; //$NON-NLS-1$
+ /** */
public final static String DECORATOR_SHOW_TRACKED_ICON = "decorator_show_tracked_icon"; //$NON-NLS-1$
/** */
public final static String DECORATOR_SHOW_UNTRACKED_ICON = "decorator_show_untracked_icon"; //$NON-NLS-1$
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
index f728a484fb..598afec4be 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
@@ -3324,6 +3324,9 @@ public class UIText extends NLS {
public static String DecoratorPreferencesPage_projectFormatLabel;
/** */
+ public static String DecoratorPreferencesPage_submoduleFormatLabel;
+
+ /** */
public static String DecoratorPreferencesPage_generalTabFolder;
/** */
@@ -3336,6 +3339,9 @@ public class UIText extends NLS {
public static String DecoratorPreferencesPage_bindingBranchStatus;
/** */
+ public static String DecoratorPreferencesPage_bindingCommitMessage;
+
+ /** */
public static String DecoratorPreferencesPage_bindingDirtyFlag;
/** */
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResource.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResource.java
index bb17c5ff91..f672c088ab 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResource.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResource.java
@@ -33,6 +33,11 @@ public class DecoratableResource extends ResourceState
protected String repositoryName = null;
/**
+ * Head commit of the repository of the resource
+ */
+ protected String commitMessage = null;
+
+ /**
* Current branch of the resource
*/
protected String branch = null;
@@ -42,7 +47,6 @@ public class DecoratableResource extends ResourceState
*/
protected String branchStatus = null;
-
/**
* Constructs a new decoratable resource
*
@@ -72,6 +76,11 @@ public class DecoratableResource extends ResourceState
}
@Override
+ public String getCommitMessage() {
+ return commitMessage;
+ }
+
+ @Override
public String getBranch() {
return branch;
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceAdapter.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceAdapter.java
index 3e0960ca4a..ae7d53ee64 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceAdapter.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceAdapter.java
@@ -27,6 +27,7 @@ import org.eclipse.egit.ui.internal.resources.ResourceStateFactory;
import org.eclipse.egit.ui.internal.trace.GitTraceLocation;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
class DecoratableResourceAdapter extends DecoratableResource {
@@ -60,12 +61,19 @@ class DecoratableResourceAdapter extends DecoratableResource {
setConflicts(baseState.hasConflicts());
setAssumeUnchanged(baseState.isAssumeUnchanged());
setStagingState(baseState.getStagingState());
- if (resource.getType() == IResource.PROJECT) {
- // We only need this very expensive info for project decoration
+ if (resource.getType() == IResource.PROJECT
+ || resource.equals(mapping.getContainer())) {
+ // We only need this very expensive info for project decoration,
+ // and for decorating folders that are submodule roots.
repositoryName = DecoratableResourceHelper
.getRepositoryName(repository);
branch = DecoratableResourceHelper.getShortBranch(repository);
branchStatus = DecoratableResourceHelper.getBranchStatus(repository);
+ RevCommit headCommit = DecoratableResourceHelper
+ .getHeadCommit(repository);
+ if (headCommit != null) {
+ commitMessage = headCommit.getShortMessage();
+ }
}
} finally {
if (trace)
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceHelper.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceHelper.java
index 672137b4e8..542dc297b8 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceHelper.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceHelper.java
@@ -21,6 +21,7 @@ import org.eclipse.egit.ui.internal.GitLabels;
import org.eclipse.jgit.lib.BranchTrackingStatus;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryState;
+import org.eclipse.jgit.revwalk.RevCommit;
/**
* Helper class to create decoratable resources
@@ -54,6 +55,11 @@ public class DecoratableResourceHelper {
.getShortBranch(repository);
}
+ static RevCommit getHeadCommit(Repository repository) {
+ return Activator.getDefault().getRepositoryUtil()
+ .parseHeadCommit(repository);
+ }
+
static String getBranchStatus(Repository repo) throws IOException {
String cachedStatus = branchState.get(repo);
if (cachedStatus != null)
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
index ddfc1403d8..67cffdaf3c 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
@@ -8,6 +8,7 @@
* Copyright (C) 2011, Dariusz Luksza <dariusz@luksza.org>
* Copyright (C) 2011, Christian Halstrick <christian.halstrick@sap.com>
* Copyright (C) 2015, IBM Corporation (Dani Megert <daniel_megert@ch.ibm.com>)
+ * Copyright (C) 2016, Thomas Wolf <thomas.wolf@paranor.ch>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -276,6 +277,9 @@ public class GitLightweightDecorator extends LabelProvider implements
public static final String BINDING_REPOSITORY_NAME = "repository"; //$NON-NLS-1$
/** */
+ public static final String BINDING_SHORT_MESSAGE = "short_message"; //$NON-NLS-1$
+
+ /** */
public static final String BINDING_DIRTY_FLAG = "dirty"; //$NON-NLS-1$
/** */
@@ -288,7 +292,10 @@ public class GitLightweightDecorator extends LabelProvider implements
public static final String FOLDER_FORMAT_DEFAULT = "{dirty:>} {name}"; //$NON-NLS-1$
/** */
- public static final String PROJECT_FORMAT_DEFAULT = "{dirty:>} {name} [{repository} {branch}{ branch_status}]"; //$NON-NLS-1$
+ public static final String PROJECT_FORMAT_DEFAULT = "{dirty:>} {name} [{repository }{branch}{ branch_status}]"; //$NON-NLS-1$
+
+ /** */
+ public static final String SUBMODULE_FORMAT_DEFAULT = "{dirty:>} {name} [{branch}{ branch_status}]{ short_message}"; //$NON-NLS-1$
private IPreferenceStore store;
@@ -427,8 +434,14 @@ public class GitLightweightDecorator extends LabelProvider implements
break;
case IResource.FOLDER:
case DecoratableResourceMapping.RESOURCE_MAPPING:
- format = store
- .getString(UIPreferences.DECORATOR_FOLDERTEXT_DECORATION);
+ // Use the submodule formatting if it's a submodule root
+ if (resource.getBranch() != null) {
+ format = store.getString(
+ UIPreferences.DECORATOR_SUBMODULETEXT_DECORATION);
+ } else {
+ format = store.getString(
+ UIPreferences.DECORATOR_FOLDERTEXT_DECORATION);
+ }
break;
case DecoratableResourceMapping.WORKING_SET:
// working sets will use the project formatting but only if the
@@ -454,7 +467,7 @@ public class GitLightweightDecorator extends LabelProvider implements
bindings.put(BINDING_BRANCH_STATUS, resource.getBranchStatus());
bindings.put(BINDING_DIRTY_FLAG, resource.isDirty() ? ">" : null); //$NON-NLS-1$
bindings.put(BINDING_STAGED_FLAG, resource.isStaged() ? "*" : null); //$NON-NLS-1$
-
+ bindings.put(BINDING_SHORT_MESSAGE, resource.getCommitMessage());
decorate(decoration, format, bindings);
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/IDecoratableResource.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/IDecoratableResource.java
index a7c92ee6c9..48c18b01cc 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/IDecoratableResource.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/IDecoratableResource.java
@@ -43,6 +43,15 @@ public interface IDecoratableResource extends IResourceState {
String getRepositoryName();
/**
+ * Gets the short message of the head commit of the repository of the
+ * resource.
+ *
+ * @return the head commit's short message, or <code>null</code> if not
+ * applicable
+ */
+ String getCommitMessage();
+
+ /**
* Gets the current branch of the resource if applicable
*
* @return the name of the current branch, or <code>null</code> if not
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java
index 77bf3c5341..84584970ed 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java
@@ -2,7 +2,7 @@
* Copyright (c) 2000, 2012 IBM Corporation and others.
* Copyright (C) 2009, Tor Arne Vestbø <torarnv@gmail.com>
* Copyright (C) 2010, Mathias Kinzler <mathias.kinzler@sap.com>
- * Copyright (C) 2015, Thomas Wolf <thomas.wolf@paranor.ch>
+ * Copyright (C) 2015, 2016 Thomas Wolf <thomas.wolf@paranor.ch>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -100,6 +100,8 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
private boolean tabsInitialized;
+ private final static String SAMPLE_COMMIT_MESSAGE = "Commit message text"; //$NON-NLS-1$
+
private static final Collection PREVIEW_FILESYSTEM_ROOT;
private static final Map<String, String> FILE_AND_FOLDER_BINDINGS;
@@ -126,6 +128,9 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
"folder", IResource.FOLDER, "repository", null, null, true, false, true, StagingState.NOT_STAGED, false, false)); //$NON-NLS-1$ //$NON-NLS-2$
children
.add(new PreviewResource(
+ "submodule", IResource.FOLDER, "submodule", "master 5bef90d", null, true, false, true, StagingState.NOT_STAGED, false, false)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ children
+ .add(new PreviewResource(
"tracked.txt", IResource.FILE, "repository", null, null, true, false, false, StagingState.NOT_STAGED, false, false)); //$NON-NLS-1$ //$NON-NLS-2$
children
.add(new PreviewResource(
@@ -178,6 +183,8 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
UIText.DecoratorPreferencesPage_bindingBranchName);
PROJECT_BINDINGS.put(DecorationHelper.BINDING_BRANCH_STATUS,
UIText.DecoratorPreferencesPage_bindingBranchStatus);
+ PROJECT_BINDINGS.put(DecorationHelper.BINDING_SHORT_MESSAGE,
+ UIText.DecoratorPreferencesPage_bindingCommitMessage);
CHANGESET_LABEL_BINDINGS = new HashMap<String, String>();
@@ -375,6 +382,8 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
private final FormatEditor projectTextFormat;
+ private final FormatEditor submoduleTextFormat;
+
public TextDecorationTab(TabFolder parent) {
Composite composite = SWTUtils.createHVFillComposite(parent,
SWTUtils.MARGINS_DEFAULT, 3);
@@ -394,10 +403,16 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
UIText.DecoratorPreferencesPage_addVariablesAction3,
PROJECT_BINDINGS,
UIPreferences.DECORATOR_PROJECTTEXT_DECORATION);
+ submoduleTextFormat = new FormatEditor(composite,
+ UIText.DecoratorPreferencesPage_submoduleFormatLabel,
+ UIText.DecoratorPreferencesPage_addVariablesAction3,
+ PROJECT_BINDINGS,
+ UIPreferences.DECORATOR_SUBMODULETEXT_DECORATION);
fileTextFormat.addModifyListener(this);
folderTextFormat.addModifyListener(this);
projectTextFormat.addModifyListener(this);
+ submoduleTextFormat.addModifyListener(this);
final TabItem tabItem = new TabItem(parent, SWT.NONE);
tabItem.setText(UIText.DecoratorPreferencesPage_textLabel);
@@ -409,6 +424,7 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
fileTextFormat.initializeValue(store);
folderTextFormat.initializeValue(store);
projectTextFormat.initializeValue(store);
+ submoduleTextFormat.initializeValue(store);
}
@Override
@@ -416,6 +432,7 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
fileTextFormat.performDefaults(store);
folderTextFormat.performDefaults(store);
projectTextFormat.performDefaults(store);
+ submoduleTextFormat.performDefaults(store);
}
@Override
@@ -423,6 +440,7 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
fileTextFormat.performOk(store);
folderTextFormat.performOk(store);
projectTextFormat.performOk(store);
+ submoduleTextFormat.performOk(store);
}
@Override
@@ -1001,7 +1019,6 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
private static class GitModelCommitMockup {
- private static final String message = "Commit message text"; //$NON-NLS-1$
private static final String author = "Author Name"; //$NON-NLS-1$
private static final Date date = new Date();
private static final String committer = "Committer Name"; //$NON-NLS-1$
@@ -1015,13 +1032,16 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
formatter.formatDate(date));
bindings.put(GitChangeSetLabelProvider.BINDING_CHANGESET_AUTHOR, author);
bindings.put(GitChangeSetLabelProvider.BINDING_CHANGESET_COMMITTER, committer);
- bindings.put(GitChangeSetLabelProvider.BINDING_CHANGESET_SHORT_MESSAGE, message);
+ bindings.put(
+ GitChangeSetLabelProvider.BINDING_CHANGESET_SHORT_MESSAGE,
+ SAMPLE_COMMIT_MESSAGE);
return GitChangeSetLabelProvider.formatName(format, bindings);
}
}
private static class PreviewResource extends DecoratableResource {
+
private final String name;
private final int type;
@@ -1036,6 +1056,7 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
super(null);
this.name = name;
this.repositoryName = repositoryName;
+ this.commitMessage = SAMPLE_COMMIT_MESSAGE;
this.branch = branch;
this.branchStatus = branchStatus;
this.type = type;
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingEntry.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingEntry.java
index 865bfb75a8..780f2fb4aa 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingEntry.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingEntry.java
@@ -260,6 +260,11 @@ public class StagingEntry extends PlatformObject
}
@Override
+ public String getCommitMessage() {
+ return null;
+ }
+
+ @Override
public boolean isTracked() {
return state != State.UNTRACKED;
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetLabelProvider.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetLabelProvider.java
index 6f8dcfb652..6c8bdb200b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetLabelProvider.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitChangeSetLabelProvider.java
@@ -21,6 +21,7 @@ import org.eclipse.egit.ui.UIPreferences;
import org.eclipse.egit.ui.internal.GitLabelProvider;
import org.eclipse.egit.ui.internal.PreferenceBasedDateFormatter;
import org.eclipse.egit.ui.internal.UIText;
+import org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator;
import org.eclipse.egit.ui.internal.synchronize.GitChangeSetModelProvider;
import org.eclipse.egit.ui.internal.synchronize.model.GitModelCommit;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -40,7 +41,9 @@ import org.eclipse.team.ui.mapping.SynchronizationLabelProvider;
public class GitChangeSetLabelProvider extends SynchronizationLabelProvider implements IStyledLabelProvider {
/** */
- public static final String BINDING_CHANGESET_SHORT_MESSAGE = "{short_message}"; //$NON-NLS-1$
+ public static final String BINDING_CHANGESET_SHORT_MESSAGE = '{'
+ + GitLightweightDecorator.DecorationHelper.BINDING_SHORT_MESSAGE
+ + '}';
/** */
public static final String BINDING_CHANGESET_COMMITTER = "{committer}"; //$NON-NLS-1$
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
index b4f33e7d67..7028633803 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
@@ -1174,12 +1174,14 @@ DecoratorPreferencesPage_preview=Preview:
DecoratorPreferencesPage_fileFormatLabel=&Files:
DecoratorPreferencesPage_folderFormatLabel=F&olders:
DecoratorPreferencesPage_projectFormatLabel=&Projects:
+DecoratorPreferencesPage_submoduleFormatLabel=&Submodules:
DecoratorPreferencesPage_labelDecorationsLink=See <a>''{0}''</a> to enable or disable Git decorations.
DecoratorPreferencesPage_colorsAndFontsLink=See <a>''{0}''</a> to configure the font and color decorations.
DecoratorPreferencesPage_generalTabFolder=&General
DecoratorPreferencesPage_bindingResourceName=Name of the resource being decorated
DecoratorPreferencesPage_bindingBranchName=Current branch of the repository
DecoratorPreferencesPage_bindingBranchStatus=Branch status (compared to remote-tracking)
+DecoratorPreferencesPage_bindingCommitMessage=First line of the commit message of the HEAD commit
DecoratorPreferencesPage_bindingDirtyFlag=Flag indicating whether or not the resource is dirty
DecoratorPreferencesPage_bindingStagedFlag=Flag indicating whether or not the resource is staged
DecoratorPreferencesPage_selectVariablesToAdd=Select the &variables to add to the decoration format:

Back to the top