2
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 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 |
package com.nokia.sdt.sourcegen;
|
|
19 |
|
|
20 |
import com.nokia.sdt.component.adapter.IComponentAdapter;
|
|
21 |
import com.nokia.sdt.datamodel.adapter.IComponentInstance;
|
|
22 |
import com.nokia.sdt.sourcegen.doms.rss.IRssModelGenerator;
|
|
23 |
|
|
24 |
/**
|
|
25 |
* This interface defines a source mapping, whereby component
|
|
26 |
* instances are transformed into RSS DOM, and
|
|
27 |
* RSS DOM into component instances. This is inherently
|
|
28 |
* a two-way mapping, although the specific rules used to
|
|
29 |
* define a mapping may need special handling for each
|
|
30 |
* direction (i.e. resulting in a pair of one-way mappings).
|
|
31 |
*
|
|
32 |
*
|
|
33 |
*
|
|
34 |
*/
|
|
35 |
public interface IComponentSourceMapping extends IComponentAdapter {
|
|
36 |
/**
|
|
37 |
* The maximum number of times to rename an identifier to
|
|
38 |
* avoid conflicts with read-only or pre-existing but
|
|
39 |
* differently-typed identifiers with the same base name
|
|
40 |
* (e.g. for r_rsrc: r_rsrc_1, r_rsrc_2, ...)
|
|
41 |
*/
|
|
42 |
public static final int MAX_NAME_CONFLICTS = 100;
|
|
43 |
|
|
44 |
/**
|
|
45 |
* This algorithm is used (via <mapEnum > nameAlgorithm="...")
|
|
46 |
* to name Command enums
|
|
47 |
*/
|
|
48 |
public static final Object NAME_ALGORITHM_COMMANDS = "com.nokia.sdt.component.symbian.NAME_ALG_COMMANDS"; //$NON-NLS-1$
|
|
49 |
|
|
50 |
/**
|
|
51 |
* This algorithm is used (via <mapEnum > nameAlgorithm="...")
|
|
52 |
* to get the identifier of the dialog-control-type attribute
|
|
53 |
*/
|
|
54 |
public static final Object NAME_ALGORITHM_CONTROL_TYPE = "com.nokia.sdt.component.symbian.NAME_ALG_CONTROL_TYPE"; //$NON-NLS-1$
|
|
55 |
|
|
56 |
/**
|
|
57 |
* This algorithm is used (via <mapEnum > nameAlgorithm="...")
|
|
58 |
* to create an enum for a dialog line entry
|
|
59 |
*/
|
|
60 |
public static final Object NAME_ALGORITHM_DIALOG_LINE_ID = "com.nokia.sdt.component.symbian.NAME_ALG_DIALOG_LINE_ID"; //$NON-NLS-1$
|
|
61 |
|
|
62 |
/**
|
|
63 |
* This algorithm is used (via <mapEnum > nameAlgorithm="...")
|
|
64 |
* to create an enum for a status pane
|
|
65 |
*/
|
|
66 |
public static final Object NAME_ALGORITHM_STATUS_PANE_ID = "com.nokia.sdt.component.symbian.NAME_ALG_STATUS_PANE_ID"; //$NON-NLS-1$
|
|
67 |
|
|
68 |
/**
|
|
69 |
* This algorithm is used (via <mapEnum > nameAlgorithm="...")
|
|
70 |
* to create an enum for the view UID
|
|
71 |
*/
|
|
72 |
public static final Object NAME_ALGORITHM_VIEW_UID = "com.nokia.sdt.component.symbian.NAME_ALG_VIEW_UID"; //$NON-NLS-1$
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Export the component instance, creating or updating
|
|
76 |
* resources in the translation unit
|
|
77 |
* @param instance the component instance to export
|
|
78 |
* @param generator
|
|
79 |
*/
|
|
80 |
public void exportInstance(IRssModelGenerator generator, IComponentInstance instance);
|
|
81 |
}
|