41
|
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 |
* Formatting rules are provided by Trace objects
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
package com.nokia.tracecompiler.engine.source;
|
|
20 |
|
|
21 |
import com.nokia.tracecompiler.model.Trace;
|
|
22 |
import com.nokia.tracecompiler.model.TraceObjectRule;
|
|
23 |
import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
|
|
24 |
|
|
25 |
/**
|
|
26 |
* Formatting rules are stored into traces as extension. When inserting a trace
|
|
27 |
* to source the formatting rules are used to convert the trace into source file
|
|
28 |
* representation.
|
|
29 |
*
|
|
30 |
*/
|
|
31 |
public interface TraceFormattingRule extends TraceObjectRule {
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Gets the format for given trace
|
|
35 |
*
|
|
36 |
* @param trace
|
|
37 |
* the trace
|
|
38 |
* @param formatType
|
|
39 |
* the type of the format requested
|
|
40 |
* @return the format
|
|
41 |
*/
|
|
42 |
public String getFormat(Trace trace, TraceFormatType formatType);
|
|
43 |
|
|
44 |
/**
|
|
45 |
* Maps the trace name to name shown in source
|
|
46 |
*
|
|
47 |
* @param trace
|
|
48 |
* the trace to be mapped
|
|
49 |
* @return the name shown in source
|
|
50 |
*/
|
|
51 |
public String mapNameToSource(Trace trace);
|
|
52 |
|
|
53 |
/**
|
|
54 |
* Maps the parameter count to source.
|
|
55 |
*
|
|
56 |
* @param trace
|
|
57 |
* the trace
|
|
58 |
* @param count
|
|
59 |
* the parameter count
|
|
60 |
* @return mapped parameter count
|
|
61 |
*/
|
|
62 |
public String mapParameterCountToSource(Trace trace, int count);
|
|
63 |
|
|
64 |
}
|