use of org.eclipse.egit.ui.internal.synchronize.model.GitModelCommit in project egit by eclipse.
the class GitChangeSetLabelProvider method getStyledText.
@Override
public StyledString getStyledText(Object element) {
// need to compare classes as everything is 'instanceof GitModelCommit'
if (element.getClass().equals(GitModelCommit.class)) {
String formattedName = createChangeSetLabel((GitModelCommit) element);
StyledString string = new StyledString(formattedName);
GitModelCommit commit = (GitModelCommit) element;
// $NON-NLS-1$//$NON-NLS-2$
String format = " [" + getAbbreviatedId(commit) + "]";
string.append(format, StyledString.DECORATIONS_STYLER);
return string;
}
if (element instanceof GitChangeSetModelProvider)
return new StyledString(UIText.GitChangeSetModelProviderLabel);
return getDelegateLabelProvider().getStyledText(element);
}
Aggregations