1 /*******************************************************************************
2 * Copyright (c) 2011 GitHub Inc.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License 2.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-2.0/
8 * SPDX-License-Identifier: EPL-2.0
11 * Kevin Sawicki (GitHub Inc.) - initial API and implementation
12 *******************************************************************************/
13 package org
.eclipse
.egit
.ui
.internal
.search
;
15 import org
.eclipse
.egit
.ui
.internal
.commit
.RepositoryCommit
;
16 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
17 import org
.eclipse
.search
.ui
.text
.Match
;
18 import org
.eclipse
.ui
.model
.IWorkbenchAdapter
;
23 public class CommitMatch
extends Match
implements IWorkbenchAdapter
{
25 private RepositoryCommit commit
;
30 public CommitMatch(RepositoryCommit commit
) {
39 public CommitMatch(RepositoryCommit commit
, int offset
, int length
) {
40 super(commit
, offset
, length
);
45 * Get repository commit
49 public RepositoryCommit
getCommit() {
54 public Object
[] getChildren(Object o
) {
59 public ImageDescriptor
getImageDescriptor(Object object
) {
60 return this.commit
.getImageDescriptor(object
);
64 public String
getLabel(Object o
) {
65 return this.commit
.getLabel(o
);
69 public Object
getParent(Object o
) {