Commit | Line | Data |
---|---|---|
c3c5c786 FC |
1 | /*******************************************************************************\r |
2 | * Copyright (c) 2010 Ericsson\r | |
3 | * \r | |
4 | * All rights reserved. This program and the accompanying materials are\r | |
5 | * made available under the terms of the Eclipse Public License v1.0 which\r | |
6 | * accompanies this distribution, and is available at\r | |
7 | * http://www.eclipse.org/legal/epl-v10.html\r | |
8 | * \r | |
9 | * Contributors:\r | |
10 | * Patrick Tasse - Initial API and implementation\r | |
11 | *******************************************************************************/\r | |
12 | \r | |
13 | package org.eclipse.linuxtools.tmf.ui.parsers.custom;\r | |
14 | \r | |
948b0607 | 15 | import java.io.IOException;\r |
c3c5c786 FC |
16 | import java.util.regex.Matcher;\r |
17 | \r | |
d7fcacc9 | 18 | import org.eclipse.linuxtools.tmf.io.BufferedRandomAccessFile;\r |
c3c5c786 FC |
19 | import org.eclipse.linuxtools.tmf.trace.ITmfLocation;\r |
20 | import org.eclipse.linuxtools.tmf.trace.TmfContext;\r | |
21 | import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTraceDefinition.InputLine;\r | |
22 | \r | |
23 | public class CustomTxtTraceContext extends TmfContext {\r | |
d7fcacc9 | 24 | public BufferedRandomAccessFile raFile;\r |
c3c5c786 | 25 | public Matcher firstLineMatcher;\r |
d7fcacc9 | 26 | public String firstLine;\r |
c3c5c786 FC |
27 | public long nextLineLocation;\r |
28 | public InputLine inputLine;\r | |
29 | \r | |
30 | public CustomTxtTraceContext(ITmfLocation<?> location, long rank) {\r | |
31 | super(location, rank);\r | |
32 | }\r | |
948b0607 FC |
33 | \r |
34 | @Override\r | |
35 | public void dispose() {\r | |
36 | if (raFile != null) {\r | |
37 | try {\r | |
38 | raFile.close();\r | |
39 | } catch (IOException e) {\r | |
40 | }\r | |
41 | }\r | |
42 | super.dispose();\r | |
43 | }\r | |
44 | \r | |
c3c5c786 | 45 | } |