rcp: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / ctf / core / event / scope / EventHeaderScope.java
1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * 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 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.ctf.core.event.scope;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19 * A lttng specific speedup node (the packet header with ID and V) of a lexical
20 * scope
21 *
22 * @author Matthew Khouzam
23 */
24 @NonNullByDefault
25 public final class EventHeaderScope extends LexicalScope {
26
27
28 /**
29 * The scope constructor
30 *
31 * @param parent
32 * The parent node, can be null, but shouldn't
33 * @param name
34 * the name of the field
35 */
36 EventHeaderScope(ILexicalScope parent, String name) {
37 super(parent, name);
38 }
39
40 @Override
41 @Nullable
42 public ILexicalScope getChild(String name) {
43 if (name.equals(EVENT_HEADER_ID.getName())) {
44 return EVENT_HEADER_ID;
45 }
46 if (name.equals(EVENT_HEADER_V.getName())) {
47 return EVENT_HEADER_V;
48 }
49 return super.getChild(name);
50 }
51
52 @Override
53 public String getPath() {
54 return "event.header"; //$NON-NLS-1$
55 }
56
57 }
This page took 0.036068 seconds and 5 git commands to generate.