Bonjour tout le monde,
J'ai fait un plugin Eclipse qui tournait bien sous Eclipse Kepler avec les dépendances suivantes :
Sa fonction est de définir une toolchain pour compiler mes programmes sur ARM.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Require-Bundle: org.eclipse.cdt.managedbuilder.core;bundle-version="8. 0.2" ,org.eclipse.core.runtime;bundle-version="3.7.0" ,org.eclipse.cdt.managedbuilder.ui;bundle-version="8.0.2" ,org.eclipse.core.resources;bundle-version="3.7.101" ,org.eclipse.cdt;bundle-version="8.0.2" ,org.eclipse.cdt.core;bundle-version="5.3.2"
A cette toolchain est associé un template qui vient copier les fichiers stockés dans mon plugin pour avoir un projet prêt à être utilisé.
Ce plugin fonctionne bien avec la configuration actuelle.
Par contre j'ai besoin de passer à une version plus récente d'Eclipse (au moins Oxygen).
Je vois bien que mon template est lu car Eclipse me propose de créer le projet avec le bon label.
Mais lorsque je crée le projet mon template n'est pas executé.
Ci-dessous mon plugin.xml :
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179 <?xml version="1.0" encoding="UTF-8"?> <!-- ?eclipse version="3.4"? --> <plugin> <extension point="org.eclipse.cdt.managedbuilder.core.buildDefinitions"> <projectType buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" id="com.company.product.buildDefinitions.projectType" isAbstract="false" name="product Project" projectEnvironmentSupplier="com.company.product.build.ExampleEnvironmentVariableSupplier"> <configuration id="productManagedBuilder.configuration" name="BUILD"> <toolChain id="com.company.product.buildDefinitions.toolChain" isAbstract="false" name="product Toolchain" targetTool="com.company.product.buildDefinitions.createflash"> <builder buildRunner="com.company.product.build.ExampleBuildRunner" id="productManagedBuilder.builder" isAbstract="false" isVariableCaseSensitive="false" name="product Builder" superClass="org.eclipse.cdt.build.core.internal.builder" > <!-- attribut qui marche pour le builder en paralelle : parallelBuildOn="true" parallelizationNumber="4"--> </builder> <tool command="gcc" commandLinePattern="${TOOLCHAIN_BIN_PATH}/${TOOLCHAIN_PREFIX}${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="com.company.product.buildDefinitions.compiler" isAbstract="false" name="Compiler" natureFilter="both" outputFlag="-o"> <optionCategory id="com.company.product.compiler.optionCategory" name="Option"> </optionCategory> <option category="com.company.product.compiler.optionCategory" defaultValue="-c -g -Wall -fno-common -O2 -mcpu=cortex-m3 -mthumb -mthumb-interwork" id="com.company.product.compiler.option.other.otherflags" name="Other flags" valueType="string"> </option> <option browseType="directory" category="com.company.product.compiler.optionCategory" command="-I" id="com.company.product.compiler.option.include.paths" name="Include paths (-I)" valueType="includePath"> <listOptionValue builtIn="false" value="../"> </listOptionValue> </option> <inputType dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator" dependencyContentType="org.eclipse.cdt.core.cHeader" dependencyExtensions="h" id="com.company.product.buildDefinitions.compiler.inputType" sourceContentType=" org.eclipse.cdt.core.cSource" sources="c"> </inputType> <outputType buildVariable="OBJS" id="com.company.product.buildDefinitions.compiler.outputType" outputs="o"> </outputType> <envVarBuildPath pathType="buildpathInclude" variableList="INCLUDE_PATH"> </envVarBuildPath> </tool> <tool command="gcc" commandLinePattern="${TOOLCHAIN_BIN_PATH}/${TOOLCHAIN_PREFIX}${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="com.company.product.buildDefinitions.linker" isAbstract="false" name="Linker" natureFilter="cnature" outputFlag="-o"> <optionCategory id="com.company.product.linker.optionCategory" name="Option"> </optionCategory> <option category="com.company.product.linker.optionCategory" defaultValue="-Wall -nostartfiles -mcpu=cortex-m3 -mthumb -mthumb-interwork -T../Example.ld" id="com.company.product.buildDefinitions.linker.otherflags" name="Other flags" valueType="string"> </option> <option browseType="none" category="com.company.product.linker.optionCategory" command="-l" id="com.company.product.buildDefinitions.linker.libs" name="Libraries (-l)" valueType="libs"> </option> <option browseType="directory" category="com.company.product.linker.optionCategory" command="-L" id="com.company.product.buildDefinitions.linker.paths" name="Library search path (-L)" valueType="libPaths"> </option> <inputType buildVariable="OBJS" id="com.company.product.buildDefinitions.linker.inputType" multipleOfType="true" sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile" sources="o"> </inputType> <outputType buildVariable="ELF" id="com.company.product.buildDefinitions.linker.outputType" outputNames="${BuildArtifactFileBaseName}.elf" outputs="elf"> </outputType> </tool> <tool command="objcopy" commandLinePattern="${TOOLCHAIN_BIN_PATH}/${TOOLCHAIN_PREFIX}${COMMAND} ${BuildArtifactFileBaseName}.elf -O binary ${BuildArtifactFileBaseName}.bin " id="com.company.product.buildDefinitions.createflash" isAbstract="false" name="Flash binary builder (bin)"> <inputType buildVariable="ELF" id="com.company.product.buildDefinitions.createflash.inputType" sources="elf"> </inputType> </tool> </toolChain> </configuration> </projectType> </extension> <extension point="org.eclipse.cdt.core.templateProcessTypes"> <processType name="CopyFolders" processRunner="com.company.product.build.CopyFolders"> <simple name="projectName"> </simple> <simple name="folder"> </simple> </processType> </extension> <extension point="org.eclipse.cdt.core.templates"> <template id="com.company.product.build.CopyFolders" location="templates/ExampleBase/template.xml" projectType="com.company.product.buildDefinitions.projectType"> </template> </extension> <extension point="org.eclipse.cdt.core.templateAssociations"> <template id="com.company.product.build.CopyFolders"> <toolChain id="com.company.product.buildDefinitions.toolChain"> </toolChain> </template> </extension> </plugin>
Il semble que l'association de mon template définie dans le point d'extension org.eclipse.cdt.core.templates avec l'attribut projectType="com.company.product.buildDefinitions.projectType" n'aille pas chercher dans mon point d'extension org.eclipse.cdt.managedbuilder.core.buildDefinitions la balise projectType avec l'attribut id="com.company.product.buildDefinitions.projectType" au moment où le projet est créé.
J'ai passé beaucoup de temps à faire des tests avec la mise à jour de la doc ainsi que les plugin.xml de cdt.autotools et de cdt.build.crossgcc mais je n'ai rien trouvé de concluant.
Est ce un bug de CDT, est ce que je dois modifier mon plugin.xml, y'a il des moyens de contourner?
Auriez vous une idée SVP?
Merci.
Partager