tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeader.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 * Representation of a header file that gets included into sources |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracecompiler.engine.header; |
|
20 |
|
21 import com.nokia.tracecompiler.project.TraceProjectFile; |
|
22 |
|
23 /** |
|
24 * Representation of a header file that gets included into sources when traces |
|
25 * are added. |
|
26 * |
|
27 */ |
|
28 final class TraceHeader extends TraceProjectFile { |
|
29 |
|
30 /** |
|
31 * Title shown in UI |
|
32 */ |
|
33 private static final String TITLE = Messages.getString("TraceHeader.Title"); //$NON-NLS-1$ |
|
34 |
|
35 /** |
|
36 * Constructor |
|
37 * |
|
38 * @param target |
|
39 * target path |
|
40 * @param hasModelName |
|
41 * true if model name should be used with the file |
|
42 */ |
|
43 TraceHeader(String target, boolean hasModelName) { |
|
44 super(target, hasModelName); |
|
45 } |
|
46 |
|
47 /* |
|
48 * (non-Javadoc) |
|
49 * |
|
50 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension() |
|
51 */ |
|
52 @Override |
|
53 protected String getFileExtension() { |
|
54 String retval; |
|
55 if (hasModelName) { |
|
56 retval = HeaderConstants.TRACE_HEADER_EXTENSION; |
|
57 } else { |
|
58 retval = ""; //$NON-NLS-1$ |
|
59 } |
|
60 return retval; |
|
61 } |
|
62 |
|
63 /* |
|
64 * (non-Javadoc) |
|
65 * |
|
66 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle() |
|
67 */ |
|
68 @Override |
|
69 public String getTitle() { |
|
70 return TITLE; |
|
71 } |
|
72 |
|
73 } |
|