Commit | Line | Data |
---|---|---|
99d7adc6 AM |
1 | /******************************************************************************* |
2 | * Copyright (c) 2014 Ericsson | |
3 | * All rights reserved. This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
7 | * | |
8 | * Contributors: | |
9 | * Alexandre Montplaisir - Initial API and implementation | |
10 | *******************************************************************************/ | |
11 | ||
12 | package org.eclipse.linuxtools.tmf.ui.viewers.events.columns; | |
13 | ||
14 | import java.util.Collection; | |
15 | ||
16 | import org.eclipse.jdt.annotation.NonNull; | |
17 | ||
18 | /** | |
19 | * This class allows a trace type to specify which columns it wants to display | |
20 | * in the Event Table. The "function" to populate the column for any given event | |
21 | * is defined in each {@link TmfEventTableColumn}. | |
22 | * | |
23 | * @author Alexandre Montplaisir | |
24 | * @since 3.1 | |
25 | */ | |
26 | public interface ITmfEventTableColumns { | |
27 | ||
28 | /** | |
29 | * Return the columns specified by this trace type. | |
30 | * | |
31 | * The iteration order of the returned collection will correspond to the | |
32 | * initial order of these columns in the view (from left to right). | |
33 | * <p> | |
34 | * Note to implementers: | |
35 | * <p> | |
36 | * Even if many traces of the same type can be opened at the same time, the | |
37 | * column objects can (and probably should) be singleton instances. This | |
38 | * means you do not need to create new column objects every time this method | |
39 | * is called. | |
40 | * | |
41 | * @return The Event Table columns advertised by this trace type | |
42 | */ | |
43 | @NonNull Collection<? extends TmfEventTableColumn> getEventTableColumns(); | |
44 | } |