37
37
import java .io .File ;
38
38
import java .util .ArrayList ;
39
39
import java .util .Collection ;
40
- import java .util .Vector ;
41
-
42
40
import javax .swing .BorderFactory ;
43
41
import javax .swing .Box ;
44
42
import javax .swing .BoxLayout ;
45
43
import javax .swing .Icon ;
46
44
import javax .swing .JLabel ;
47
45
import javax .swing .JPanel ;
48
46
import javax .swing .JTextArea ;
49
-
50
47
import org .apache .log4j .Logger ;
51
48
import org .jdom .Element ;
52
-
53
49
import se .sics .cooja .AbstractionLevelDescription ;
54
50
import se .sics .cooja .ClassDescription ;
55
51
import se .sics .cooja .GUI ;
@@ -83,8 +79,6 @@ public class MicaZMoteType implements MoteType {
83
79
private String identifier = null ;
84
80
private String description = null ;
85
81
86
- protected Simulation simulation ;
87
-
88
82
/* If source file is defined, the firmware is recompiled when loading simulations */
89
83
private File fileFirmware = null ;
90
84
private File fileSource = null ;
@@ -227,8 +221,8 @@ public ProjectConfig getConfig() {
227
221
return null ;
228
222
}
229
223
230
- public Collection <Element > getConfigXML () {
231
- Vector <Element > config = new Vector <Element >();
224
+ public Collection <Element > getConfigXML (Simulation simulation ) {
225
+ ArrayList <Element > config = new ArrayList <Element >();
232
226
233
227
Element element ;
234
228
@@ -260,7 +254,7 @@ public Collection<Element> getConfigXML() {
260
254
config .add (element );
261
255
262
256
// Mote interfaces
263
- for (Class moteInterface : getMoteInterfaceClasses ()) {
257
+ for (Class <? extends MoteInterface > moteInterface : getMoteInterfaceClasses ()) {
264
258
element = new Element ("moteinterface" );
265
259
element .setText (moteInterface .getName ());
266
260
config .add (element );
@@ -272,7 +266,6 @@ public Collection<Element> getConfigXML() {
272
266
public boolean setConfigXML (Simulation simulation ,
273
267
Collection <Element > configXML , boolean visAvailable )
274
268
throws MoteTypeCreationException {
275
- this .simulation = simulation ;
276
269
277
270
ArrayList <Class <? extends MoteInterface >> intfClassList = new ArrayList <Class <? extends MoteInterface >>();
278
271
for (Element element : configXML ) {
@@ -325,7 +318,6 @@ public boolean setConfigXML(Simulation simulation,
325
318
326
319
public boolean configureAndInit (Container parentContainer , Simulation simulation , boolean visAvailable )
327
320
throws MoteTypeCreationException {
328
- this .simulation = simulation ;
329
321
330
322
/* If visualized, show compile dialog and let user configure */
331
323
if (visAvailable ) {
0 commit comments