|
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 * Rules for mapping trace model entries into source code |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracebuilder.engine.source; |
|
20 |
|
21 import com.nokia.tracebuilder.model.TraceObjectRule; |
|
22 |
|
23 /** |
|
24 * Rules for relocating traces in source code |
|
25 * |
|
26 */ |
|
27 public interface SourceLocationRule extends TraceObjectRule { |
|
28 |
|
29 /** |
|
30 * Rule type for context-relative location |
|
31 */ |
|
32 int CONTEXT_RELATIVE = 1; |
|
33 |
|
34 /** |
|
35 * Rule type for absolute location |
|
36 */ |
|
37 int ABSOLUTE = 2; |
|
38 |
|
39 /** |
|
40 * Gets the rule type |
|
41 * |
|
42 * @return rule type |
|
43 */ |
|
44 public int getLocationType(); |
|
45 |
|
46 /** |
|
47 * Gets the offset where the trace is inserted |
|
48 * |
|
49 * @return the offset |
|
50 */ |
|
51 public int getLocationOffset(); |
|
52 |
|
53 /** |
|
54 * Flag which determines whether this locator should be removed from the |
|
55 * trace after the trace has been inserted to source. If this is left to the |
|
56 * trace, the trace is relocated every time it is inserted. |
|
57 * <p> |
|
58 * Note that if this returns false, the extension should also be persistent |
|
59 * so that the relocations work over TraceBuilder restarts. |
|
60 * |
|
61 * @return true if this should be removed after insertion |
|
62 */ |
|
63 public boolean isRemovedAfterInsert(); |
|
64 |
|
65 } |