All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bndtools.internal.testcaseselection.TestCaseLabelProvider Maven / Gradle / Ivy

The newest version!
package bndtools.internal.testcaseselection;

import org.bndtools.core.ui.icons.Icons;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;

public class TestCaseLabelProvider extends LabelProvider {

	private final static Image junitImg = Icons.image("icons/test.gif");

	@Override
	public String getText(Object element) {
		String result;
		if (element instanceof String)
			result = (String) element;
		else if (element instanceof IPath)
			result = ((IPath) element).toString()
				.replace('/', '.');
		else
			result = ""; //$NON-NLS-1$
		return result;
	}

	@Override
	public Image getImage(Object element) {
		return junitImg;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy