1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 * Rule interface for tags to be searched from source files |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracecompiler.engine.source; |
|
20 |
|
21 import java.util.List; |
|
22 |
|
23 import com.nokia.tracecompiler.model.TraceCompilerException; |
|
24 import com.nokia.tracecompiler.model.TraceModelExtension; |
|
25 import com.nokia.tracecompiler.model.TraceObjectRule; |
|
26 import com.nokia.tracecompiler.project.TraceLocationParser; |
|
27 |
|
28 /** |
|
29 * Rule interface for tags to be searched from source files |
|
30 * |
|
31 */ |
|
32 public interface SourceParserRule extends TraceObjectRule { |
|
33 |
|
34 /** |
|
35 * Parameter conversion result |
|
36 */ |
|
37 public class ParameterConversionResult { |
|
38 |
|
39 /** |
|
40 * Parameter name |
|
41 */ |
|
42 public String name; |
|
43 |
|
44 /** |
|
45 * Parameter type |
|
46 */ |
|
47 public String type; |
|
48 |
|
49 /** |
|
50 * Parameter extensions |
|
51 */ |
|
52 public List<TraceModelExtension> extensions; |
|
53 } |
|
54 |
|
55 /** |
|
56 * Trace location conversion result |
|
57 */ |
|
58 public class TraceConversionResult { |
|
59 |
|
60 /** |
|
61 * Name of the group where the trace goes to |
|
62 */ |
|
63 public String group; |
|
64 |
|
65 /** |
|
66 * Name for the trace |
|
67 */ |
|
68 public String name; |
|
69 |
|
70 /** |
|
71 * Text for the trace |
|
72 */ |
|
73 public String text; |
|
74 |
|
75 /** |
|
76 * List of parameters |
|
77 */ |
|
78 public List<ParameterConversionResult> parameters; |
|
79 |
|
80 /** |
|
81 * Extensions for the trace |
|
82 */ |
|
83 public List<TraceModelExtension> extensions; |
|
84 |
|
85 } |
|
86 |
|
87 /** |
|
88 * Gets the name of this parser |
|
89 * |
|
90 * @return the name |
|
91 */ |
|
92 public String getName(); |
|
93 |
|
94 /** |
|
95 * Gets the source tag to be located from source |
|
96 * |
|
97 * @return the tag name |
|
98 */ |
|
99 public String getSearchTag(); |
|
100 |
|
101 /** |
|
102 * Checks if the trace tag suffix is allowed |
|
103 * |
|
104 * @param tagSuffix |
|
105 * the tag to be checked |
|
106 * @return true if allowed, false if not |
|
107 */ |
|
108 public boolean isAllowedTagSuffix(String tagSuffix); |
|
109 |
|
110 /** |
|
111 * Parses a parameter list found from source |
|
112 * |
|
113 * @param tag |
|
114 * the location tag |
|
115 * @param list |
|
116 * list of parameters |
|
117 * @return the parameter list |
|
118 * @throws TraceCompilerException |
|
119 * if parameter list is not valid |
|
120 */ |
|
121 public SourceParserResult parseParameters(String tag, List<String> list) |
|
122 throws TraceCompilerException; |
|
123 |
|
124 /** |
|
125 * Gets the location parser interface |
|
126 * |
|
127 * @return the location parser |
|
128 */ |
|
129 public TraceLocationParser getLocationParser(); |
|
130 |
|
131 } |
|