Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 08e406f84853e7f11d97a9ad892fd0fcadd14fb1 (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
/*******************************************************************************
 * Copyright (c) 2008 xored software, Inc.
 *
 * 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
 *
 * Contributors:
 *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
 *******************************************************************************/
package org.eclipse.dltk.internal.testing.ui;

import org.eclipse.dltk.internal.testing.model.TestCategoryElement;
import org.eclipse.dltk.internal.testing.model.TestSuiteElement;
import org.eclipse.jface.viewers.ViewerComparator;

public class TestTreeComparator extends ViewerComparator {

	public int category(Object element) {
		if (element instanceof TestCategoryElement) {
			return 0;
		} else if (element instanceof TestSuiteElement) {
			return 1;
		} else {
			return 2;
		}
	}

}

Back to the top