|
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.tracebuilder.engine.source; |
|
20 |
|
21 import java.util.List; |
|
22 |
|
23 import com.nokia.tracebuilder.model.TraceBuilderException; |
|
24 import com.nokia.tracebuilder.model.TraceModelExtension; |
|
25 import com.nokia.tracebuilder.model.TraceObjectRule; |
|
26 import com.nokia.tracebuilder.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 */ |
|
38 public class ParameterConversionResult { |
|
39 |
|
40 /** |
|
41 * Parameter name |
|
42 */ |
|
43 public String name; |
|
44 |
|
45 /** |
|
46 * Parameter type |
|
47 */ |
|
48 public String type; |
|
49 |
|
50 /** |
|
51 * Parameter extensions |
|
52 */ |
|
53 public List<TraceModelExtension> extensions; |
|
54 } |
|
55 |
|
56 /** |
|
57 * Trace location conversion result |
|
58 * |
|
59 */ |
|
60 public class TraceConversionResult { |
|
61 |
|
62 /** |
|
63 * Name of the group where the trace goes to |
|
64 */ |
|
65 public String group; |
|
66 |
|
67 /** |
|
68 * Name for the trace |
|
69 */ |
|
70 public String name; |
|
71 |
|
72 /** |
|
73 * Text for the trace |
|
74 */ |
|
75 public String text; |
|
76 |
|
77 /** |
|
78 * List of parameters |
|
79 */ |
|
80 public List<ParameterConversionResult> parameters; |
|
81 |
|
82 /** |
|
83 * Extensions for the trace |
|
84 */ |
|
85 public List<TraceModelExtension> extensions; |
|
86 |
|
87 } |
|
88 |
|
89 /** |
|
90 * Gets the name of this parser |
|
91 * |
|
92 * @return the name |
|
93 */ |
|
94 public String getName(); |
|
95 |
|
96 /** |
|
97 * Gets the source tag to be located from source |
|
98 * |
|
99 * @return the tag name |
|
100 */ |
|
101 public String getSearchTag(); |
|
102 |
|
103 /** |
|
104 * Checks if the trace tag suffix is allowed |
|
105 * |
|
106 * @param tagSuffix |
|
107 * the tag to be checked |
|
108 * @return true if allowed, false if not |
|
109 */ |
|
110 public boolean isAllowedTagSuffix(String tagSuffix); |
|
111 |
|
112 /** |
|
113 * Parses a parameter list found from source |
|
114 * |
|
115 * @param tag |
|
116 * the location tag |
|
117 * @param list |
|
118 * list of parameters |
|
119 * @return the parameter list |
|
120 * @throws TraceBuilderException |
|
121 * if parameter list is not valid |
|
122 */ |
|
123 public SourceParserResult parseParameters(String tag, List<String> list) |
|
124 throws TraceBuilderException; |
|
125 |
|
126 /** |
|
127 * Gets the location parser interface |
|
128 * |
|
129 * @return the location parser |
|
130 */ |
|
131 public TraceLocationParser getLocationParser(); |
|
132 |
|
133 } |