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 * Configuration for the console UI |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracecompiler; |
|
20 |
|
21 import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration; |
|
22 import com.nokia.tracecompiler.engine.TraceCompilerEngineConfigurationListener; |
|
23 |
|
24 /** |
|
25 * Configuration for the TraceCompiler UI |
|
26 * |
|
27 */ |
|
28 final class TraceCompilerConfiguration implements TraceCompilerEngineConfiguration { |
|
29 |
|
30 /** |
|
31 * Export path |
|
32 */ |
|
33 private String exportPath; |
|
34 |
|
35 /** |
|
36 * Constructor |
|
37 * |
|
38 * @param exportPath |
|
39 * the export path for decode files |
|
40 */ |
|
41 TraceCompilerConfiguration(String exportPath) { |
|
42 this.exportPath = exportPath; |
|
43 } |
|
44 |
|
45 /* |
|
46 * (non-Javadoc) |
|
47 * |
|
48 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration# |
|
49 * addConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener) |
|
50 */ |
|
51 public void addConfigurationListener( |
|
52 TraceCompilerEngineConfigurationListener configurationListener) { |
|
53 } |
|
54 |
|
55 /* |
|
56 * (non-Javadoc) |
|
57 * |
|
58 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration# |
|
59 * getFlag(java.lang.String) |
|
60 */ |
|
61 public boolean getFlag(String flagName) { |
|
62 boolean retval; |
|
63 if (flagName.equals(TraceCompilerEngineConfiguration.CONSOLE_UI_MODE)) { |
|
64 retval = true; |
|
65 } else { |
|
66 retval = false; |
|
67 } |
|
68 return retval; |
|
69 } |
|
70 |
|
71 /* |
|
72 * (non-Javadoc) |
|
73 * |
|
74 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration# |
|
75 * getText(java.lang.String) |
|
76 */ |
|
77 public String getText(String textName) { |
|
78 String retval; |
|
79 if (textName.equals(TraceCompilerEngineConfiguration.ENVIRONMENT_ROOT)) { |
|
80 retval = exportPath; |
|
81 } else { |
|
82 retval = ""; //$NON-NLS-1$ |
|
83 } |
|
84 return retval; |
|
85 } |
|
86 |
|
87 /* |
|
88 * (non-Javadoc) |
|
89 * |
|
90 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration# |
|
91 * getValue(java.lang.String) |
|
92 */ |
|
93 public int getValue(String valueName) { |
|
94 return 0; |
|
95 } |
|
96 |
|
97 /* |
|
98 * (non-Javadoc) |
|
99 * |
|
100 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration# |
|
101 * hasEntry(java.lang.String) |
|
102 */ |
|
103 public boolean hasEntry(String entryName) { |
|
104 return false; |
|
105 } |
|
106 |
|
107 /* |
|
108 * (non-Javadoc) |
|
109 * |
|
110 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#isAvailable() |
|
111 */ |
|
112 public boolean isAvailable() { |
|
113 return true; |
|
114 } |
|
115 |
|
116 /* |
|
117 * (non-Javadoc) |
|
118 * |
|
119 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration# |
|
120 * removeConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener) |
|
121 */ |
|
122 public void removeConfigurationListener( |
|
123 TraceCompilerEngineConfigurationListener configurationListener) { |
|
124 } |
|
125 |
|
126 /* |
|
127 * (non-Javadoc) |
|
128 * |
|
129 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setFlag(java.lang.String, |
|
130 * boolean) |
|
131 */ |
|
132 public void setFlag(String flagName, boolean flag) { |
|
133 } |
|
134 |
|
135 /* |
|
136 * (non-Javadoc) |
|
137 * |
|
138 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setText(java.lang.String, |
|
139 * java.lang.String) |
|
140 */ |
|
141 public void setText(String textName, String text) { |
|
142 } |
|
143 |
|
144 /* |
|
145 * (non-Javadoc) |
|
146 * |
|
147 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setValue(java.lang.String, |
|
148 * int) |
|
149 */ |
|
150 public void setValue(String valueName, int value) { |
|
151 } |
|
152 |
|
153 } |
|