|
1 /* |
|
2 * Copyright (c) 2009 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 the License "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 */ |
|
17 |
|
18 /** |
|
19 * |
|
20 */ |
|
21 package com.nokia.carbide.cpp.internal.pi.test; |
|
22 |
|
23 import java.util.Vector; |
|
24 |
|
25 /** |
|
26 * |
|
27 * Trace specific support for additional info in NPI file. |
|
28 * Additional info is saved as Vector<Object> in NPI file and loaded as |
|
29 * AnalysisInfoHandler in NPI file during runtime. |
|
30 * -During load, additional info is transfer to AnalysisInfoHandler |
|
31 * -During save, AnalysisInfoHandler is transfer to additional info |
|
32 * -After import, AnalysisInfoHandler is set up (e.g. with sampleimporter |
|
33 * data or anything we figure out during import) |
|
34 * -Any modification to additional info with an opened instance of NPI files are done |
|
35 * on AnalysisInfoHandler, and mark the file dirty |
|
36 * |
|
37 * These allow us to use common write route used by import and save as. |
|
38 * |
|
39 * Plugins should define their own internal class to encapsulate runtime |
|
40 * structure in AnalysisInfoHandler and use AnalysisInfoHandler.set/getTraceDefinedInfo |
|
41 * to access their own share of additional when NPI file is loaded. |
|
42 * |
|
43 * |
|
44 */ |
|
45 public interface IProvideTraceAdditionalInfo { |
|
46 /** |
|
47 * Set up info handler right after loading .dat file, so we can commit those |
|
48 * from info handler to additional info with a common write route used by import |
|
49 * and save as. Info can be extracted info from importer. |
|
50 * @param traceAdditionalInfos |
|
51 */ |
|
52 public void setupInfoHandler(AnalysisInfoHandler handler); |
|
53 /** |
|
54 * Move info from additional info to info handler while loading a NPI file |
|
55 * @param additional_info |
|
56 * @param handler |
|
57 */ |
|
58 public void additionalInfoToAnalysisInfoHandler(Vector<Object> additional_info, AnalysisInfoHandler handler); |
|
59 /** |
|
60 * Move info from info handler to additional info before writing to NPI file |
|
61 * @param info |
|
62 * @param handler |
|
63 */ |
|
64 public void analysisInfoHandlerToAdditonalInfo(TraceAdditionalInfo info, AnalysisInfoHandler handler); |
|
65 /** |
|
66 * @return String representation for additional info used in property page |
|
67 */ |
|
68 public String InfoHandlerToDisplayString(AnalysisInfoHandler handler); |
|
69 } |