blob: 33c62721acf9ede063c7b845c9206359d5c8d98b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*******************************************************************************
* Copyright (C) 2006, Robin Rosenberg <robin.rosenberg@dewire.com>
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
* Copyright (C) 2011, Matthias Sohn <matthias.sohn@sap.com>
* Copyright (C) 2011, IBM Corporation
* Copyright (C) 2012, Mathias Kinzler <mathias.kinzler@sap.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.egit.ui.internal.history;
import java.io.IOException;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.internal.dialogs.CommitLabelProvider;
/**
* A Label Provider for Commits
*/
class GraphLabelProvider extends CommitLabelProvider {
public GraphLabelProvider() {
super();
}
public GraphLabelProvider(boolean canShowEmailAddresses) {
super(canShowEmailAddresses);
}
@Override
public String getColumnText(Object element, int columnIndex) {
if (element == null) {
return ""; //$NON-NLS-1$
}
final SWTCommit c = (SWTCommit) element;
try {
c.parseBody();
} catch (IOException e) {
Activator.error("Error parsing body", e); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
return super.getColumnText(c, columnIndex);
}
}
|