Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-07-22 13:14:20 +0000
committerThomas Wolf2018-08-01 19:20:30 +0000
commit5b76c96c4b38c2e3a6286190c361dc8dcb3b4a71 (patch)
treefc5ac9df3a4160c7bf7e8c8d254771e30f2313b1 /org.eclipse.egit.ui/src/org/eclipse/egit/ui
parent7011de74a8fd125677b6a9261d6fbddd51081c99 (diff)
downloadegit-5b76c96c4b38c2e3a6286190c361dc8dcb3b4a71.tar.gz
egit-5b76c96c4b38c2e3a6286190c361dc8dcb3b4a71.tar.xz
egit-5b76c96c4b38c2e3a6286190c361dc8dcb3b4a71.zip
History table: let the user define which columns are shown
Columns in tables cannot be shown/hidden individually. But we can set the width to zero to hide a column. Of course the user can hide and restore columns directly by dragging the column separators, too. Add a "Columns" sub-menu in the view menu where the user can check the columns to be shown/hidden. These modifications are transient; they are not saved or restored when the view is closed or opened, and they do not survive across and IDE restart. This is similar to the "pinned" state of a history view. To permanently change which columns are shown by default, there's a new preference page. Bug: 339796 Change-Id: Ib8daff29b6610eed1397969a203947e5e72b629a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java16
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java11
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java160
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java37
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/HistoryColumnsPreferencePage.java63
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties5
7 files changed, 270 insertions, 28 deletions
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 ce74787089..70010d32eb 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
@@ -149,6 +149,12 @@ public class PluginPreferenceInitializer extends AbstractPreferenceInitializer {
store.setDefault(UIPreferences.USE_LOGICAL_MODEL, true);
store.setDefault(UIPreferences.REBASE_INTERACTIVE_SYNC_SELECTION, true);
+
+ store.setDefault(UIPreferences.HISTORY_COLUMN_ID, true);
+ store.setDefault(UIPreferences.HISTORY_COLUMN_AUTHOR, true);
+ store.setDefault(UIPreferences.HISTORY_COLUMN_AUTHOR_DATE, true);
+ store.setDefault(UIPreferences.HISTORY_COLUMN_COMMITTER, true);
+ store.setDefault(UIPreferences.HISTORY_COLUMN_COMMITTER_DATE, 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 b2bd9574ad..4092a9cc7b 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
@@ -219,6 +219,22 @@ public class UIPreferences {
public static final String HISTORY_SHOW_TAG_SEQUENCE = "HistoryView_ShowTagSequence"; //$NON-NLS-1$
/** */
public static final String HISTORY_SHOW_BRANCH_SEQUENCE = "HistoryView_ShowBranchSequence"; //$NON-NLS-1$
+
+ /** */
+ public static final String HISTORY_COLUMN_ID = "HistoryView_ColumnIdShow"; //$NON-NLS-1$
+
+ /** */
+ public static final String HISTORY_COLUMN_AUTHOR = "HistoryView_ColumnAuthorShow"; //$NON-NLS-1$
+
+ /** */
+ public static final String HISTORY_COLUMN_AUTHOR_DATE = "HistoryView_ColumnAuthorDateShow"; //$NON-NLS-1$
+
+ /** */
+ public static final String HISTORY_COLUMN_COMMITTER = "HistoryView_ColumnCommitterShow"; //$NON-NLS-1$
+
+ /** */
+ public static final String HISTORY_COLUMN_COMMITTER_DATE = "HistoryView_ColumnCommitterDateShow"; //$NON-NLS-1$
+
/** */
public static final String STAGING_VIEW_SHOW_NEW_COMMITS = "StagingView_ShowNewCommits"; //$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 2d7e4b9b19..396169b9d5 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
@@ -643,6 +643,9 @@ public class UIText extends NLS {
public static String GitHistoryPage_ShowSubMenuLabel;
/** */
+ public static String GitHistoryPage_ColumnsSubMenuLabel;
+
+ /** */
public static String GitHistoryPage_toggleEmailAddresses;
/** */
@@ -2107,6 +2110,12 @@ public class UIText extends NLS {
public static String HistoryPreferencePage_toggleEmailAddresses;
/** */
+ public static String HistoryColumnsPreferencePage_description;
+
+ /** */
+ public static String HistoryColumnsPreferencePage_title;
+
+ /** */
public static String PullWizardPage_PageName;
/** */
@@ -4556,7 +4565,7 @@ public class UIText extends NLS {
public static String CommitGraphTable_Committer;
/** */
- public static String CommitGraphTable_committerDataColumn;
+ public static String CommitGraphTable_committerDateColumn;
/** */
public static String CommitGraphTable_CompareWithEachOtherInTreeMenuLabel;
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java
index 7339c39b43..32736814ad 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java
@@ -32,6 +32,7 @@ import org.eclipse.core.commands.IParameter;
import org.eclipse.core.commands.Parameterization;
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.egit.core.op.CreatePatchOperation;
import org.eclipse.egit.core.op.CreatePatchOperation.DiffHeaderFormat;
@@ -49,7 +50,10 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.viewers.ColumnLayoutData;
import org.eclipse.jface.viewers.ColumnPixelData;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -90,6 +94,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Scrollable;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
@@ -122,6 +127,14 @@ class CommitGraphTable {
private final TableViewer table;
+ private final CommitGraphTableLayout tableLayout;
+
+ private final ColumnLayoutData[] columnLayouts = new ColumnLayoutData[6];
+
+ private final ColumnLayoutData[] baseLayouts = new ColumnLayoutData[6];
+
+ private final ColumnLayoutData[] defaultLayouts = new ColumnLayoutData[6];
+
private Clipboard clipboard;
private final SWTPlotRenderer renderer;
@@ -151,21 +164,22 @@ class CommitGraphTable {
private boolean enableAntialias = true;
- CommitGraphTable(Composite parent, final TableLoader loader,
- final ResourceManager resources) {
- this(parent, loader, resources, true);
+ CommitGraphTable(Composite parent, TableLoader loader,
+ ResourceManager resources, boolean canShowEmailAddresses) {
+ this(parent, loader, resources, canShowEmailAddresses, false);
}
CommitGraphTable(Composite parent, final TableLoader loader,
- final ResourceManager resources, boolean canShowEmailAddresses) {
+ final ResourceManager resources, boolean canShowEmailAddresses,
+ boolean useColumnPreferences) {
nFont = UIUtils.getFont(UIPreferences.THEME_CommitGraphNormalFont);
hFont = highlightFont();
tableLoader = loader;
Composite tableContainer = new Composite(parent, SWT.NONE);
final Table rawTable = new Table(tableContainer,
- SWT.MULTI | SWT.H_SCROLL
- | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);
+ SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER
+ | SWT.FULL_SELECTION | SWT.VIRTUAL);
rawTable.setHeaderVisible(true);
rawTable.setLinesVisible(false);
rawTable.setFont(nFont);
@@ -184,13 +198,43 @@ class CommitGraphTable {
}
});
- TableColumnLayout layout = new TableColumnLayout();
- tableContainer.setLayout(layout);
+ tableLayout = new CommitGraphTableLayout();
+ tableContainer.setLayout(tableLayout);
- createColumns(rawTable, layout);
+ createColumns(rawTable);
createPaintListener(rawTable);
- rawTable.addListener(SWT.Resize, event -> layout(rawTable, layout));
+ System.arraycopy(columnLayouts, 0, defaultLayouts, 0,
+ columnLayouts.length);
+ System.arraycopy(columnLayouts, 0, baseLayouts, 0,
+ columnLayouts.length);
+ if (useColumnPreferences) {
+ IPreferenceStore store = Activator.getDefault()
+ .getPreferenceStore();
+ applyColumnPreferences(store, rawTable);
+ IPropertyChangeListener prefsChanged = event -> {
+ String property = event.getProperty();
+ if (UIPreferences.HISTORY_COLUMN_ID.equals(property)
+ || UIPreferences.HISTORY_COLUMN_AUTHOR.equals(property)
+ || UIPreferences.HISTORY_COLUMN_AUTHOR_DATE
+ .equals(property)
+ || UIPreferences.HISTORY_COLUMN_COMMITTER
+ .equals(property)
+ || UIPreferences.HISTORY_COLUMN_COMMITTER_DATE
+ .equals(property)) {
+ rawTable.getDisplay().asyncExec(() -> {
+ if (!rawTable.isDisposed()) {
+ applyColumnPreferences(store, rawTable);
+ rawTable.getParent().layout();
+ }
+ });
+ }
+ };
+ store.addPropertyChangeListener(prefsChanged);
+ rawTable.addDisposeListener(
+ event -> store.removePropertyChangeListener(prefsChanged));
+ }
+ rawTable.addListener(SWT.Resize, event -> layout(rawTable));
table = new TableViewer(rawTable) {
@Override
@@ -268,7 +312,7 @@ class CommitGraphTable {
CommitGraphTable(final Composite parent, final IPageSite site,
final MenuManager menuMgr, final TableLoader loader,
final ResourceManager resources) {
- this(parent, loader, resources);
+ this(parent, loader, resources, true, true);
final IAction selectAll = ActionUtils.createGlobalAction(
ActionFactory.SELECT_ALL,
@@ -417,8 +461,7 @@ class CommitGraphTable {
}
}
- private void createColumns(Table rawTable,
- TableColumnLayout layout) {
+ private void createColumns(Table rawTable) {
final TableColumn commitId = new TableColumn(rawTable, SWT.NONE);
commitId.setResizable(true);
commitId.setText(UIText.CommitGraphTable_CommitId);
@@ -430,37 +473,43 @@ class CommitGraphTable {
} finally {
gc.dispose();
}
- layout.setColumnData(commitId, new ColumnPixelData(minWidth, false));
+ columnLayouts[0] = new ColumnPixelData(minWidth, false);
+ tableLayout.setColumnData(commitId, columnLayouts[0]);
final TableColumn graph = new TableColumn(rawTable, SWT.NONE);
graph.setResizable(true);
graph.setText(UIText.CommitGraphTable_messageColumn);
graph.setWidth(400);
- layout.setColumnData(graph, new ColumnWeightData(20, 200, true));
+ columnLayouts[1] = new ColumnWeightData(20, 200, true);
+ tableLayout.setColumnData(graph, columnLayouts[1]);
final TableColumn author = new TableColumn(rawTable, SWT.NONE);
author.setResizable(true);
author.setText(UIText.HistoryPage_authorColumn);
author.setWidth(100);
- layout.setColumnData(author, new ColumnWeightData(5, 80, true));
+ columnLayouts[2] = new ColumnWeightData(5, 80, true);
+ tableLayout.setColumnData(author, columnLayouts[2]);
final TableColumn date = new TableColumn(rawTable, SWT.NONE);
date.setResizable(true);
date.setText(UIText.HistoryPage_authorDateColumn);
date.setWidth(100);
- layout.setColumnData(date, new ColumnWeightData(5, 80, true));
+ columnLayouts[3] = new ColumnWeightData(5, 80, true);
+ tableLayout.setColumnData(date, columnLayouts[3]);
final TableColumn committer = new TableColumn(rawTable, SWT.NONE);
committer.setResizable(true);
committer.setText(UIText.CommitGraphTable_Committer);
committer.setWidth(100);
- layout.setColumnData(committer, new ColumnWeightData(5, 80, true));
+ columnLayouts[4] = new ColumnWeightData(5, 80, true);
+ tableLayout.setColumnData(committer, columnLayouts[4]);
final TableColumn committerDate = new TableColumn(rawTable, SWT.NONE);
committerDate.setResizable(true);
- committerDate.setText(UIText.CommitGraphTable_committerDataColumn);
+ committerDate.setText(UIText.CommitGraphTable_committerDateColumn);
committerDate.setWidth(100);
- layout.setColumnData(committerDate, new ColumnWeightData(5, 80, true));
+ columnLayouts[5] = new ColumnWeightData(5, 80, true);
+ tableLayout.setColumnData(committerDate, columnLayouts[5]);
}
private void createPaintListener(final Table rawTable) {
@@ -529,7 +578,7 @@ class CommitGraphTable {
return table;
}
- private void layout(Table rawTable, TableColumnLayout layout) {
+ private void layout(Table rawTable) {
rawTable.getParent().layout();
// Check that the table now fits
int tableWidth = rawTable.getSize().x;
@@ -540,11 +589,10 @@ class CommitGraphTable {
}
if (columnsWidth > tableWidth) {
// Re-distribute the space again
- layout.setColumnData(columns[1],
- new ColumnWeightData(20, 200, true));
- for (int i = 2; i < columns.length; i++) {
- layout.setColumnData(columns[i],
- new ColumnWeightData(5, 80, true));
+ for (int i = 1; i < columns.length; i++) {
+ if (columns[i].getWidth() != 0) {
+ tableLayout.setColumnData(columns[i], baseLayouts[i]);
+ }
}
rawTable.getParent().layout();
}
@@ -552,6 +600,66 @@ class CommitGraphTable {
rawTable.redraw();
}
+ void setVisible(int columnIndex, boolean visible) {
+ Assert.isLegal(columnIndex >= 0 && columnIndex < columnLayouts.length);
+ if (columnIndex == 1) {
+ return; // Commit message column is always visible
+ }
+ Table rawTable = table.getTable();
+ TableColumn col = rawTable.getColumn(columnIndex);
+ boolean isVisible = col.getWidth() > 0;
+ if (isVisible != visible) {
+ if (isVisible) {
+ columnLayouts[columnIndex] = tableLayout.getLayoutData(rawTable,
+ columnIndex);
+ if (columnLayouts[columnIndex] == null) {
+ columnLayouts[columnIndex] = defaultLayouts[columnIndex];
+ }
+ tableLayout.setColumnData(col, new ColumnPixelData(0));
+ } else {
+ tableLayout.setColumnData(col, columnLayouts[columnIndex]);
+ }
+ rawTable.getParent().layout();
+ }
+ }
+
+ private void setColumn(TableColumn column, int index, boolean visible) {
+ if (visible) {
+ baseLayouts[index] = defaultLayouts[index];
+ if (column.getWidth() > 0) {
+ return;
+ }
+ tableLayout.setColumnData(column, columnLayouts[index]);
+ } else {
+ baseLayouts[index] = new ColumnPixelData(0);
+ tableLayout.setColumnData(column, baseLayouts[index]);
+ }
+ }
+
+ private void applyColumnPreferences(IPreferenceStore store,
+ Table rawTable) {
+ setColumn(rawTable.getColumn(0), 0,
+ store.getBoolean(UIPreferences.HISTORY_COLUMN_ID));
+ setColumn(rawTable.getColumn(2), 2,
+ store.getBoolean(UIPreferences.HISTORY_COLUMN_AUTHOR));
+ setColumn(rawTable.getColumn(3), 3,
+ store.getBoolean(UIPreferences.HISTORY_COLUMN_AUTHOR_DATE));
+ setColumn(rawTable.getColumn(4), 4,
+ store.getBoolean(UIPreferences.HISTORY_COLUMN_COMMITTER));
+ setColumn(rawTable.getColumn(5), 5,
+ store.getBoolean(UIPreferences.HISTORY_COLUMN_COMMITTER_DATE));
+ }
+
+ private static class CommitGraphTableLayout extends TableColumnLayout {
+
+ @Override
+ protected ColumnLayoutData getLayoutData(Scrollable tableTree,
+ int columnIndex) {
+ // Make this method accessible here
+ return super.getLayoutData(tableTree, columnIndex);
+ }
+ }
+
private final class CommitDragSourceListener extends DragSourceAdapter {
@Override
public void dragStart(DragSourceEvent event) {
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index 0b7a9e983b..7265f7e0ea 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -157,6 +157,7 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.team.ui.history.HistoryPage;
import org.eclipse.team.ui.history.IHistoryView;
import org.eclipse.ui.IActionBars;
@@ -173,6 +174,7 @@ import org.eclipse.ui.part.IShowInTargetList;
import org.eclipse.ui.part.ShowInContext;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
import org.eclipse.ui.progress.UIJob;
+import org.eclipse.ui.texteditor.IUpdate;
/** Graphical commit history viewer. */
public class GitHistoryPage extends HistoryPage implements RefsChangedListener,
@@ -1518,11 +1520,46 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener,
mgr.add(actions.showAllBranchesAction);
}
+ private class ColumnAction extends Action implements IUpdate {
+
+ private final int columnIndex;
+
+ public ColumnAction(String text, int idx) {
+ super(text, IAction.AS_CHECK_BOX);
+ columnIndex = idx;
+ update();
+ }
+
+ @Override
+ public void run() {
+ graph.setVisible(columnIndex, isChecked());
+ }
+
+ @Override
+ public void update() {
+ setChecked(graph.getTableView().getTable().getColumn(columnIndex)
+ .getWidth() > 0);
+ }
+ }
+
private void setupViewMenu() {
IMenuManager viewMenuMgr = getSite().getActionBars().getMenuManager();
viewMenuMgr.add(actions.refreshAction);
viewMenuMgr.add(new Separator());
+ IMenuManager columnsMenuMgr = new MenuManager(
+ UIText.GitHistoryPage_ColumnsSubMenuLabel);
+ viewMenuMgr.add(columnsMenuMgr);
+ TableColumn[] columns = graph.getTableView().getTable().getColumns();
+ for (int i = 0; i < columns.length; i++) {
+ if (i != 1) {
+ ColumnAction action = new ColumnAction(columns[i].getText(), i);
+ columnsMenuMgr.add(action);
+ columns[i].addListener(SWT.Resize, event -> {
+ action.update();
+ });
+ }
+ }
IMenuManager showSubMenuMgr = new MenuManager(
UIText.GitHistoryPage_ShowSubMenuLabel);
viewMenuMgr.add(showSubMenuMgr);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/HistoryColumnsPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/HistoryColumnsPreferencePage.java
new file mode 100644
index 0000000000..72cd1db869
--- /dev/null
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/HistoryColumnsPreferencePage.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (C) 2018 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 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.egit.ui.internal.preferences;
+
+import org.eclipse.egit.ui.Activator;
+import org.eclipse.egit.ui.UIPreferences;
+import org.eclipse.egit.ui.internal.UIText;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Preferences defining which columns to show by default in the history view.
+ */
+public class HistoryColumnsPreferencePage extends FieldEditorPreferencePage
+ implements IWorkbenchPreferencePage {
+
+ /** Creates a new instance. */
+ public HistoryColumnsPreferencePage() {
+ super(GRID);
+ setTitle(UIText.HistoryColumnsPreferencePage_title);
+ setDescription(UIText.HistoryColumnsPreferencePage_description);
+ }
+
+ @Override
+ public void init(IWorkbench workbench) {
+ // Nothing to do
+ }
+
+ @Override
+ protected IPreferenceStore doGetPreferenceStore() {
+ return Activator.getDefault().getPreferenceStore();
+ }
+
+ @Override
+ protected void createFieldEditors() {
+ final Composite pane = getFieldEditorParent();
+ addField(new BooleanFieldEditor(UIPreferences.HISTORY_COLUMN_ID,
+ UIText.CommitGraphTable_CommitId, pane));
+ addField(new BooleanFieldEditor(UIPreferences.HISTORY_COLUMN_AUTHOR,
+ UIText.HistoryPage_authorColumn, pane));
+ addField(
+ new BooleanFieldEditor(UIPreferences.HISTORY_COLUMN_AUTHOR_DATE,
+ UIText.HistoryPage_authorDateColumn, pane));
+ addField(new BooleanFieldEditor(UIPreferences.HISTORY_COLUMN_COMMITTER,
+ UIText.CommitGraphTable_Committer, pane));
+ addField(new BooleanFieldEditor(
+ UIPreferences.HISTORY_COLUMN_COMMITTER_DATE,
+ UIText.CommitGraphTable_committerDateColumn, pane));
+ }
+
+}
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 b0d3500a4e..2c95fb4f90 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
@@ -233,6 +233,7 @@ GitHistoryPage_InRevisionCommentSubMenuLabel=&In Revision Comment
GitHistoryPage_ListIncompleteWarningMessage=The list is incomplete
GitHistoryPage_pushCommit=&Push Commit...
GitHistoryPage_ShowSubMenuLabel=&Show
+GitHistoryPage_ColumnsSubMenuLabel=&Columns
GitHistoryPage_toggleEmailAddresses=&E-mail Addresses
GitPreferenceRoot_automaticallyEnableChangesetModel=Automatically enable commit &grouping in Git synchronizations
GitPreferenceRoot_BlameGroupHeader=Revision Information
@@ -728,6 +729,8 @@ HistoryPreferencePage_MaxDiffLines=Maximum lines to show for a &diff:
HistoryPreferencePage_MaxTagLength=&Maximum characters to show for a tag:
HistoryPreferencePage_ShowGroupLabel=Show
HistoryPreferencePage_ShowInRevCommentGroupLabel=Show in Revision Comment
+HistoryColumnsPreferencePage_description=Select which columns to show by default in the history view. You can change this temporarily via the view menu of the history view.
+HistoryColumnsPreferencePage_title=History Columns
PullWizardPage_PageName=PullWizardPage
PullWizardPage_PageTitle=Pull
@@ -1598,7 +1601,7 @@ DiffViewer_notContainedInCommit=File {0} is not contained in commit {1}
CommitGraphTable_CommitId=Id
CommitGraphTable_CopyCommitIdLabel=Cop&y Commit Id
CommitGraphTable_Committer=Committer
-CommitGraphTable_committerDataColumn=Committed Date
+CommitGraphTable_committerDateColumn=Committed Date
CommitGraphTable_CompareWithEachOtherInTreeMenuLabel=Compare with Each Other in &Tree
CommitGraphTable_DeleteBranchAction=&Delete Branch
CommitGraphTable_DeleteTagAction=De&lete Tag...

Back to the top