b2db4e6586e53c2b64573588794883fff1b0ba32
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / project / model / TmfViewerSorter.java
1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.tmf.ui.project.model;
14
15 import org.eclipse.jface.viewers.ViewerSorter;
16
17 /**
18 * Viewer sorter for TMF project model elements
19 */
20 //TODO: Follow-up with Bug 484248
21 public class TmfViewerSorter extends ViewerSorter {
22
23 @Override
24 public int category(Object element) {
25 if (element instanceof TmfExperimentFolder) {
26 return 0;
27 }
28 if (element instanceof TmfTraceFolder) {
29 return 0;
30 }
31 if (element instanceof TmfExperimentElement) {
32 return 1;
33 }
34 if (element instanceof TmfTraceElement) {
35 return 1;
36 }
37 return 2;
38 }
39
40
41 }
This page took 0.030777 seconds and 4 git commands to generate.