trace/tracebuilder/com.nokia.tracebuilder/src/com/nokia/tracebuilder/engine/rules/StartOfFunctionLocationRule.java
equal
deleted
inserted
replaced
|
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 * Location rule for start of function |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracebuilder.engine.rules; |
|
20 |
|
21 import com.nokia.tracebuilder.engine.source.SourceLocationRule; |
|
22 |
|
23 /** |
|
24 * Location rule for start of function |
|
25 * |
|
26 */ |
|
27 final class StartOfFunctionLocationRule extends RuleBase implements |
|
28 SourceLocationRule { |
|
29 |
|
30 /** |
|
31 * Location rule offset. Should be large enough to cover a function |
|
32 */ |
|
33 private static final int OFFSET = -100000; // CodForChk_Dis_Magic |
|
34 |
|
35 /* |
|
36 * (non-Javadoc) |
|
37 * |
|
38 * @see com.nokia.tracebuilder.engine.source.SourceLocationRule#getType() |
|
39 */ |
|
40 public int getLocationType() { |
|
41 return SourceLocationRule.CONTEXT_RELATIVE; |
|
42 } |
|
43 |
|
44 /* |
|
45 * (non-Javadoc) |
|
46 * |
|
47 * @see com.nokia.tracebuilder.engine.source.SourceLocationRule#getOffset() |
|
48 */ |
|
49 public int getLocationOffset() { |
|
50 return OFFSET; |
|
51 } |
|
52 |
|
53 /* |
|
54 * (non-Javadoc) |
|
55 * |
|
56 * @see com.nokia.tracebuilder.engine.source.SourceLocationRule#isRemovedAfterInsert() |
|
57 */ |
|
58 public boolean isRemovedAfterInsert() { |
|
59 return true; |
|
60 } |
|
61 |
|
62 } |