|
1 /* |
|
2 * Copyright (c) 2009 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 * Properties associated with formatting rules |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracebuilder.engine.rules; |
|
20 |
|
21 import com.nokia.tracebuilder.engine.TraceObjectPropertyDialogFlag; |
|
22 import com.nokia.tracebuilder.engine.TraceObjectPropertyDialogTemplate; |
|
23 import com.nokia.tracebuilder.engine.rules.osttrace.OstTraceFormatRule; |
|
24 import com.nokia.tracebuilder.engine.rules.osttrace.OstTraceParserRule; |
|
25 import com.nokia.tracebuilder.engine.source.SourceParserRule; |
|
26 import com.nokia.tracebuilder.project.TraceProjectAPI; |
|
27 |
|
28 /** |
|
29 * Constants for rules engine |
|
30 * |
|
31 */ |
|
32 interface RulesEngineConstants { |
|
33 |
|
34 /** |
|
35 * Trace parsers |
|
36 */ |
|
37 SourceParserRule[] TRACE_PARSERS = { new OstTraceParserRule() }; |
|
38 |
|
39 /** |
|
40 * Printf parsers |
|
41 */ |
|
42 String[] PRINTF_PARSERS = { "RDebug::Print", //$NON-NLS-1$ |
|
43 "Kern::Printf" //$NON-NLS-1$ |
|
44 }; |
|
45 |
|
46 /** |
|
47 * List of supported API's |
|
48 */ |
|
49 TraceProjectAPI[] TRACE_APIS = { new OstTraceFormatRule() }; |
|
50 |
|
51 /** |
|
52 * Persistent extensions |
|
53 */ |
|
54 ClassNameWrapper[] PERSISTENT_EXTENSIONS = { |
|
55 new ClassNameWrapper(InstrumentedTraceRuleImpl.STORAGE_NAME, |
|
56 InstrumentedTraceRuleImpl.class), |
|
57 new ClassNameWrapper(ParameterTypeMappingRule.STORAGE_NAME, |
|
58 ParameterTypeMappingRule.class), |
|
59 new ClassNameWrapper(ArrayParameterRuleImpl.STORAGE_NAME, |
|
60 ArrayParameterRuleImpl.class) }; |
|
61 |
|
62 /** |
|
63 * Dialog flags for "Add Trace" dialog |
|
64 */ |
|
65 TraceObjectPropertyDialogFlag[] TRACE_FLAGS = { new AddThisPtrFlag(), |
|
66 new AddFunctionParametersFlag(), new AddMatchingTraceFlag(), new AddReturnParameterFlag() }; |
|
67 |
|
68 /** |
|
69 * Dialog flags for instrumenter dialog. |
|
70 */ |
|
71 TraceObjectPropertyDialogFlag[] INSTRUMENTER_FLAGS = TRACE_FLAGS; |
|
72 |
|
73 /** |
|
74 * Dialog flags for "Add Parameter" dialog |
|
75 */ |
|
76 TraceObjectPropertyDialogFlag[] PARAMETER_FLAGS = { new ArrayParameterFlag() }; |
|
77 |
|
78 /** |
|
79 * Templates used in "Add Trace" dialog |
|
80 */ |
|
81 TraceObjectPropertyDialogTemplate[] TRACE_TEMPLATES = { |
|
82 new EntryExitTraceTemplate(), new PerformanceEventTemplate(), new StateTraceTemplate()}; |
|
83 |
|
84 /** |
|
85 * Templates used in instrumenter dialog |
|
86 */ |
|
87 TraceObjectPropertyDialogTemplate[] INSTRUMENTER_TEMPLATES = { new EntryExitInstrumenterTemplate() }; |
|
88 |
|
89 /** |
|
90 * Templates used with "Add Parameter" dialog |
|
91 */ |
|
92 TraceObjectPropertyDialogTemplate[] PARAMETER_TEMPLATES = { new ThisPointerParameterTemplate() }; |
|
93 |
|
94 } |