Skip to content

Package: ControlsSWTBot_PTest$8

ControlsSWTBot_PTest$8

nameinstructionbranchcomplexitylinemethod
run()
M: 0 C: 29
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
{...}
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Johannes Faltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.ui.editor.test.controls;
15:
16: import java.math.BigDecimal;
17: import java.text.NumberFormat;
18: import java.util.ArrayList;
19: import java.util.Calendar;
20: import java.util.Collection;
21: import java.util.Date;
22: import java.util.List;
23: import java.util.Locale;
24:
25: import org.eclipse.emf.common.command.BasicCommandStack;
26: import org.eclipse.emf.common.notify.AdapterFactory;
27: import org.eclipse.emf.common.util.URI;
28: import org.eclipse.emf.ecore.EObject;
29: import org.eclipse.emf.ecore.EStructuralFeature;
30: import org.eclipse.emf.ecore.resource.Resource;
31: import org.eclipse.emf.ecore.resource.ResourceSet;
32: import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
33: import org.eclipse.emf.ecp.view.spi.model.VControl;
34: import org.eclipse.emf.ecp.view.spi.model.VFeaturePathDomainModelReference;
35: import org.eclipse.emf.ecp.view.spi.model.VView;
36: import org.eclipse.emf.ecp.view.spi.model.VViewFactory;
37: import org.eclipse.emf.ecp.view.test.common.spi.GCCollectable;
38: import org.eclipse.emf.ecp.view.ui.editor.test.ECPCommonSWTBotTest;
39: import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
40: import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
41: import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
42: import org.eclipse.emf.emfstore.bowling.BowlingFactory;
43: import org.eclipse.emf.emfstore.bowling.BowlingPackage;
44: import org.eclipse.emf.emfstore.bowling.Game;
45: import org.eclipse.emf.emfstore.bowling.Gender;
46: import org.eclipse.emf.emfstore.bowling.Matchup;
47: import org.eclipse.emf.emfstore.bowling.Player;
48: import org.eclipse.emf.emfstore.bowling.TournamentType;
49: import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
50: import org.eclipse.swtbot.swt.finder.results.VoidResult;
51: import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
52: import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo;
53: import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
54: import org.eclipse.swtbot.swt.finder.widgets.SWTBotDateTime;
55: import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
56: import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
57: import org.junit.AfterClass;
58: import org.junit.runner.RunWith;
59: import org.junit.runners.Parameterized;
60: import org.junit.runners.Parameterized.Parameters;
61:
62: /**
63: * Configurable SWTBotTest displaying and entering data in ECP Controls.
64: *
65: * @author jfaltermeier
66: *
67: */
68: @RunWith(Parameterized.class)
69: public class ControlsSWTBot_PTest extends ECPCommonSWTBotTest {
70:
71:         private static double memBefore;
72:         private static double memAfter;
73:
74:         private final boolean isDomainCollectable;
75:         private final Boolean[] configuration;
76:
77:         private GCCollectable viewCollectable;
78:         private GCCollectable domainCollectable;
79:
80:         public ControlsSWTBot_PTest(boolean isDomainCollectable, Boolean[] b) {
81:                 this.isDomainCollectable = isDomainCollectable;
82:                 configuration = b;
83:         }
84:
85:         @Parameters
86:         public static Collection<Object[]> data() {
87:                 final List<Object[]> data = new ArrayList<Object[]>();
88:
89:                 data.addAll(createConfig(25, new Boolean[] { true, false, false, false, false, false, false, false, false,
90:                         false, false }));
91:                 data.addAll(createConfig(25, new Boolean[] { false, true, false, false, false, false, false, false, false,
92:                         false, false }));
93:                 data.addAll(createConfig(25, new Boolean[] { false, false, true, false, false, false, false, false, false,
94:                         false, false }));
95:                 data.addAll(createConfig(25, new Boolean[] { false, false, false, true, false, false, false, false, false,
96:                         false, false }));
97:                 data.addAll(createConfig(25, new Boolean[] { false, false, false, false, true, false, false, false, false,
98:                         false, false }));
99:                 data.addAll(createConfig(25, new Boolean[] { false, false, false, false, false, true, false, false, false,
100:                         false, false }));
101:                 data.addAll(createConfig(25, new Boolean[] { false, false, false, false, false, false, true, false, false,
102:                         false, false }));
103:                 data.addAll(createConfig(25, new Boolean[] { false, false, false, false, false, false, false, true, false,
104:                         false, false }));
105:                 data.addAll(createConfig(25, new Boolean[] { false, false, false, false, false, false, false, false, true,
106:                         false, false }));
107:                 data.addAll(createConfig(25, new Boolean[] { false, false, false, false, false, false, false, false, false,
108:                         true, false }));
109:                 data.addAll(createConfig(25, new Boolean[] { false, false, false, false, false, false, false, false, false,
110:                         false, true }));
111:                 data.addAll(createConfig(25, new Boolean[] { true, true, true, true, true, true, true, true, true, true, true
112:                 }));
113:
114:                 return data;
115:         }
116:
117:         @AfterClass
118:         public static void afterClass() {
119:                 final double diff = Math.abs((memBefore - memAfter) / memBefore);
120:                 assertTrue(diff < 0.05);
121:         }
122:
123:         /**
124:          * {@inheritDoc}
125:          *
126:          * @see org.eclipse.emf.ecp.view.ui.editor.test.ECPCommonSWTBotTest#logic()
127:          */
128:         // BEGIN COMPLEX CODE
129:         @Override
130:         public void logic() {
131:                 if (configuration[0]) {
132:                         doActionStringControl(0);
133:                 }
134:                 if (configuration[1]) {
135:                         doActionDateTimeControl(1);
136:                 }
137:                 if (configuration[2]) {
138:                         doActionNumericalControlDouble(2);
139:                 }
140:                 if (configuration[3]) {
141:                         doActionBooleanControl(3);
142:                 }
143:                 if (configuration[4]) {
144:                         doActionAttributeMultiControl(4);
145:                 }
146:                 if (configuration[5]) {
147:                         doActionNumericalControlInteger(5);
148:                 }
149:                 if (configuration[6]) {
150:                         doActionMultiControlEEnum(6);
151:                 }
152:                 if (configuration[7]) {
153:                         doActionNumericalControlBigDec(7);
154:                 }
155:                 if (configuration[8]) {
156:                         doActionEEnumControl(8);
157:                 }
158:                 if (configuration[9]) {
159:                         doActionReferenceMultiControl(9);
160:                 }
161:                 if (configuration[10]) {
162:                         doActionLinkControl(10);
163:                 }
164:         }
165:
166:         // END COMPLEX CODE
167:
168:         private void doActionStringControl(final int myIndex) {
169:                 UIThreadRunnable.syncExec(new VoidResult() {
170:                         @Override
171:                         public void run() {
172:                                 final SWTBotText text = bot.textWithLabel("Name");
173:                                 text.setFocus();
174:                                 text.setText("Maxl Morlock");
175:                                 bot.label("Name").setFocus();
176:                         }
177:                 });
178:         }
179:
180:         private void doActionDateTimeControl(final int myIndex) {
181:                 UIThreadRunnable.syncExec(new VoidResult() {
182:                         @Override
183:                         public void run() {
184:                                 final SWTBotDateTime date = bot.dateTime(0);
185:                                 final SWTBotDateTime time = bot.dateTime(1);
186:                                 date.setFocus();
187:                                 date.setDate(new Date());
188:                                 time.setFocus();
189:                                 time.setDate(new Date());
190:                                 date.setFocus();
191:                         }
192:                 });
193:         }
194:
195:         private void doActionNumericalControlDouble(final int myIndex) {
196:                 UIThreadRunnable.syncExec(new VoidResult() {
197:                         @Override
198:                         public void run() {
199:                                 final SWTBotText text = bot.textWithLabel("Height");
200:                                 text.setFocus();
201:                                 final Locale locale = Locale.getDefault();
202:                                 final NumberFormat formatter = NumberFormat.getInstance(locale);
203:                                 text.setText(formatter.format(1.7d));
204:                                 bot.label("Height").setFocus();
205:                         }
206:                 });
207:         }
208:
209:         private void doActionBooleanControl(final int myIndex) {
210:                 UIThreadRunnable.syncExec(new VoidResult() {
211:                         @Override
212:                         public void run() {
213:                                 final SWTBotCheckBox check = bot.checkBox();
214:                                 check.setFocus();
215:                                 check.click();
216:                                 bot.label("Is Professional").setFocus();
217:                         }
218:                 });
219:         }
220:
221:         private void doActionAttributeMultiControl(final int myIndex) {
222:                 UIThreadRunnable.syncExec(new VoidResult() {
223:                         @Override
224:                         public void run() {
225:                                 final int addEntryIndex = getFirstButtonIndex(myIndex) + 2;
226:                                 final SWTBotButton addEntry = bot.button(addEntryIndex);
227:                                 addEntry.click();
228:                                 final SWTBotButton delete = bot.button(addEntryIndex + 1);
229:                                 delete.click();
230:                                 bot.label("EMails*").setFocus();
231:                         }
232:                 });
233:         }
234:
235:         private void doActionNumericalControlInteger(final int myIndex) {
236:                 UIThreadRunnable.syncExec(new VoidResult() {
237:                         @Override
238:                         public void run() {
239:                                 final SWTBotText text = bot.textWithLabel("Number Of Victories");
240:                                 text.setFocus();
241:                                 text.setText(String.valueOf(250));
242:                                 bot.label("Number Of Victories").setFocus();
243:                         }
244:                 });
245:         }
246:
247:         private void doActionMultiControlEEnum(final int myIndex) {
248:                 UIThreadRunnable.syncExec(new VoidResult() {
249:                         @Override
250:                         public void run() {
251:                                 final int addEntryIndex = getFirstButtonIndex(myIndex);
252:                                 final SWTBotButton addEntry = bot.button(addEntryIndex);
253:                                 addEntry.click();
254:                                 final SWTBotButton delete = bot.button(addEntryIndex + 1);
255:                                 delete.click();
256:                                 bot.label("Played Tournament Types").setFocus();
257:                         }
258:                 });
259:         }
260:
261:         private void doActionNumericalControlBigDec(final int myIndex) {
262:                 UIThreadRunnable.syncExec(new VoidResult() {
263:                         @Override
264:                         public void run() {
265:                                 final SWTBotText text = bot.textWithLabel("Win Loss Ratio");
266:                                 text.setFocus();
267:                                 final Locale locale = Locale.getDefault();
268:                                 final NumberFormat formatter = NumberFormat.getInstance(locale);
269:                                 text.setText(formatter.format(new BigDecimal(0.9)));
270:                                 bot.label("Win Loss Ratio").setFocus();
271:                         }
272:                 });
273:         }
274:
275:         private void doActionEEnumControl(final int myIndex) {
276:                 UIThreadRunnable.syncExec(new VoidResult() {
277:                         @Override
278:                         public void run() {
279:                                 final SWTBotCCombo combo = bot.ccomboBox("Male");
280:                                 combo.setSelection(0);
281:                                 combo.setSelection(1);
282:                                 bot.label("Gender").setFocus();
283:                         }
284:                 });
285:         }
286:
287:         private void doActionReferenceMultiControl(final int myIndex) {
288:                 UIThreadRunnable.syncExec(new VoidResult() {
289:                         @Override
290:                         public void run() {
291:                                 final SWTBotTable table = bot.table();
292:                                 assertTrue(table.columns().contains("Games"));
293:                         }
294:                 });
295:         }
296:
297:         private void doActionLinkControl(final int myIndex) {
298:                 UIThreadRunnable.syncExec(new VoidResult() {
299:                         @Override
300:                         public void run() {
301:                                 final int index = getFirstButtonIndex(myIndex);
302:                                 final SWTBotButton button = bot.button(index + 2);
303:                                 button.click();
304:                                 bot.label("Matchup*").setFocus();
305:                         }
306:                 });
307:         }
308:
309:         private int getFirstButtonIndex(int myIndex) {
310:                 final int[] possibleTextFields = new int[] { 4, 6, 9, 10 };
311:                 int index = 0;
312:                 for (final int i : possibleTextFields) {
313:                         if (i == myIndex) {
314:                                 break;
315:                         }
316:                         if (configuration[i]) {
317:                                 switch (i) {
318:                                 case 4:
319:                                 case 6:
320:                                         index = index + 4;
321:                                         break;
322:                                 case 9:
323:                                         index = index + 5;
324:                                         break;
325:                                 default:
326:                                         break;
327:                                 }
328:                         }
329:                 }
330:                 return index;
331:         }
332:
333:         @Override
334:         public void assertions(double before, double after) {
335:                 ControlsSWTBot_PTest.memBefore += before;
336:                 ControlsSWTBot_PTest.memAfter += after;
337:
338:                 if (getDomainObject() != null) {
339:                         assertTrue("More than four adapter left on domain model element after dispose of ECPSWTView: "
340:                                 + getDomainObject().eAdapters().size()
341:                                 + " adapters. Not all adapters can be removed, but it's maybe time to get suspicious.",
342:                                 getDomainObject()
343:                                         .eAdapters().size() < 5);
344:                 }
345:                 // disposeSWTView();
346:
347:                 assertTrue(getSWTViewCollectable().isCollectable());
348:                 unsetSWTViewCollectable();
349:                 unsetDomainObject();
350:                 assertTrue(viewCollectable.isCollectable());
351:                 viewCollectable = null;
352:                 assertTrue(domainCollectable.isCollectable());
353:         }
354:
355:         /**
356:          * {@inheritDoc}
357:          *
358:          * @see org.eclipse.emf.ecp.view.ui.editor.test.ECPCommonSWTBotTest#createDomainObject()
359:          */
360:         @Override
361:         public EObject createDomainObject() {
362:                 Game game = (Game) getDomainObject();
363:
364:                 if (isDomainCollectable) {
365:                         // remove reference to domain object, since gc will be tested
366:                         unsetDomainObject();
367:                 }
368:
369:                 if (game == null) {
370:                         game = BowlingFactory.eINSTANCE.createGame();
371:                         final Player player = createPlayer();
372:                         final Matchup matchup = BowlingFactory.eINSTANCE.createMatchup();
373:                         game.setPlayer(player);
374:                         matchup.getGames().add(game);
375:                         final Game game2 = BowlingFactory.eINSTANCE.createGame();
376:                         matchup.getGames().add(game2);
377:                         final ResourceSet resourceSet = new ResourceSetImpl();
378:                         final Resource resource = resourceSet.createResource(URI.createFileURI("foo.xmi"));
379:                         resource.getContents().add(game);
380:                         resource.getContents().add(game2);
381:                         resource.getContents().add(player);
382:                         resource.getContents().add(matchup);
383:                         addEditingDomain(resourceSet);
384:                         memBefore = 0d;
385:                         memAfter = 0d;
386:                 } else {
387:                         game.getPlayer().setName("Max Morlock");
388:                         game.getPlayer().setHeight(1.8);
389:                         game.getPlayer().getEMails().clear();
390:                         game.getPlayer().getEMails().add("maxl@foobar.com");
391:                         game.getPlayer().setNumberOfVictories(249);
392:                         game.getPlayer().getPlayedTournamentTypes().clear();
393:                         game.getPlayer().getPlayedTournamentTypes().add(TournamentType.AMATEUR);
394:                         game.getPlayer().setWinLossRatio(new BigDecimal(0.8));
395:                         game.getPlayer().setGender(Gender.MALE);
396:                         game.setMatchup((Matchup) game.eResource().getContents().get(3));
397:                         game.getMatchup().getGames().add((Game) game.eResource().getContents().get(1));
398:                 }
399:
400:                 if (!isDomainCollectable) {
401:                         setDomainObject(game);
402:                 }
403:
404:                 domainCollectable = new GCCollectable(game);
405:                 return game;
406:         }
407:
408:         private Player createPlayer() {
409:                 final Player player = BowlingFactory.eINSTANCE.createPlayer();
410:                 player.setName("Max Morlock");
411:                 final Calendar calendar = Calendar.getInstance();
412:                 calendar.clear();
413:                 calendar.set(1925, 5, 11);
414:                 player.setDateOfBirth(calendar.getTime());
415:                 player.setHeight(1.80d);
416:                 player.setIsProfessional(true);
417:                 player.getEMails().add("maxl@foobar.com");
418:                 player.setNumberOfVictories(249);
419:                 player.getPlayedTournamentTypes().add(TournamentType.AMATEUR);
420:                 player.setWinLossRatio(new BigDecimal(0.8));
421:                 player.setGender(Gender.MALE);
422:                 return player;
423:         }
424:
425:         private void addEditingDomain(ResourceSet resourceSet) {
426:                 AdapterFactory adapterFactory = new ComposedAdapterFactory(
427:                         ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
428:                 adapterFactory = new ComposedAdapterFactory(new AdapterFactory[] { adapterFactory,
429:                         new ReflectiveItemProviderAdapterFactory() });
430:                 final AdapterFactoryEditingDomain domain = new AdapterFactoryEditingDomain(adapterFactory,
431:                         new BasicCommandStack(), resourceSet);
432:                 resourceSet.eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(domain));
433:         }
434:
435:         /**
436:          * {@inheritDoc}
437:          *
438:          * @see org.eclipse.emf.ecp.view.ui.editor.test.ECPCommonSWTBotTest#createView()
439:          */
440:         @Override
441:         public VView createView() {
442:                 final VView view = VViewFactory.eINSTANCE.createView();
443:                 view.setRootEClass(BowlingPackage.eINSTANCE.getGame());
444:                 createControls(view);
445:                 viewCollectable = new GCCollectable(view);
446:                 return view;
447:         }
448:
449:         // BEGIN COMPLEX CODE
450:         private void createControls(VView view) {
451:                 if (configuration[0]) {
452:                         createStringControl(view);
453:                 }
454:                 if (configuration[1]) {
455:                         createDateTimeControl(view);
456:                 }
457:                 if (configuration[2]) {
458:                         createNumericalControlDouble(view);
459:                 }
460:                 if (configuration[3]) {
461:                         createBooleanControl(view);
462:                 }
463:                 if (configuration[4]) {
464:                         createAttributeMultiControl(view);
465:                 }
466:                 if (configuration[5]) {
467:                         createNumericalControlInteger(view);
468:                 }
469:                 if (configuration[6]) {
470:                         createMultiControlEEnum(view);
471:                 }
472:                 if (configuration[7]) {
473:                         createNumericalControlBigDec(view);
474:                 }
475:                 if (configuration[8]) {
476:                         createEEnumControl(view);
477:                 }
478:                 if (configuration[9]) {
479:                         createReferenceMultiControl(view);
480:                 }
481:                 if (configuration[10]) {
482:                         createLinkControl(view);
483:                 }
484:         }
485:
486:         // END COMPLEX CODE
487:
488:         private void createStringControl(VView view) {
489:                 final VControl stringControl = VViewFactory.eINSTANCE.createControl();
490:                 stringControl.setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
491:                         .getPlayer_Name()));
492:                 view.getChildren().add(stringControl);
493:         }
494:
495:         private void createDateTimeControl(VView view) {
496:                 final VControl dateTimeControl = VViewFactory.eINSTANCE.createControl();
497:                 dateTimeControl.setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
498:                         .getPlayer_DateOfBirth()));
499:                 view.getChildren().add(dateTimeControl);
500:         }
501:
502:         private void createNumericalControlDouble(VView view) {
503:                 final VControl doubleControl = VViewFactory.eINSTANCE.createControl();
504:                 doubleControl.setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
505:                         .getPlayer_Height()));
506:                 view.getChildren().add(doubleControl);
507:         }
508:
509:         private void createBooleanControl(VView view) {
510:                 final VControl booleanControl = VViewFactory.eINSTANCE.createControl();
511:                 booleanControl.setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
512:                         .getPlayer_IsProfessional()));
513:                 view.getChildren().add(booleanControl);
514:         }
515:
516:         private void createAttributeMultiControl(VView view) {
517:                 final VControl attributeMultiControl = VViewFactory.eINSTANCE.createControl();
518:                 attributeMultiControl
519:                         .setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
520:                                 .getPlayer_EMails()));
521:                 view.getChildren().add(attributeMultiControl);
522:         }
523:
524:         private void createNumericalControlInteger(VView view) {
525:                 final VControl integerControl = VViewFactory.eINSTANCE.createControl();
526:                 integerControl.setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
527:                         .getPlayer_NumberOfVictories()));
528:                 view.getChildren().add(integerControl);
529:         }
530:
531:         private void createMultiControlEEnum(VView view) {
532:                 final VControl eEnumMultiControl = VViewFactory.eINSTANCE.createControl();
533:                 eEnumMultiControl.setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
534:                         .getPlayer_PlayedTournamentTypes()));
535:                 view.getChildren().add(eEnumMultiControl);
536:         }
537:
538:         private void createNumericalControlBigDec(VView view) {
539:                 final VControl bigDecControl = VViewFactory.eINSTANCE.createControl();
540:                 bigDecControl.setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
541:                         .getPlayer_WinLossRatio()));
542:                 view.getChildren().add(bigDecControl);
543:         }
544:
545:         private void createEEnumControl(VView view) {
546:                 final VControl eEnumControl = VViewFactory.eINSTANCE.createControl();
547:                 eEnumControl.setDomainModelReference(createPlayerVFeaturePathDomainModelReference(BowlingPackage.eINSTANCE
548:                         .getPlayer_Gender()));
549:                 view.getChildren().add(eEnumControl);
550:         }
551:
552:         private void createReferenceMultiControl(VView view) {
553:                 final VControl referenceMultiControl = VViewFactory.eINSTANCE.createControl();
554:                 final VFeaturePathDomainModelReference domainModelReference = VViewFactory.eINSTANCE
555:                         .createFeaturePathDomainModelReference();
556:                 domainModelReference.setDomainModelEFeature(BowlingPackage.eINSTANCE.getMatchup_Games());
557:                 domainModelReference.getDomainModelEReferencePath().add(BowlingPackage.eINSTANCE.getGame_Matchup());
558:                 referenceMultiControl.setDomainModelReference(domainModelReference);
559:                 view.getChildren().add(referenceMultiControl);
560:         }
561:
562:         private void createLinkControl(VView view) {
563:                 final VControl linkControl = VViewFactory.eINSTANCE.createControl();
564:                 final VFeaturePathDomainModelReference domainModelReference = VViewFactory.eINSTANCE
565:                         .createFeaturePathDomainModelReference();
566:                 domainModelReference.setDomainModelEFeature(BowlingPackage.eINSTANCE.getGame_Matchup());
567:                 linkControl.setDomainModelReference(domainModelReference);
568:                 view.getChildren().add(linkControl);
569:         }
570:
571:         private VFeaturePathDomainModelReference createPlayerVFeaturePathDomainModelReference(EStructuralFeature feature) {
572:                 final VFeaturePathDomainModelReference domainModelReference = VViewFactory.eINSTANCE
573:                         .createFeaturePathDomainModelReference();
574:                 domainModelReference.setDomainModelEFeature(feature);
575:                 domainModelReference.getDomainModelEReferencePath().add(BowlingPackage.eINSTANCE.getGame_Player());
576:                 return domainModelReference;
577:         }
578:
579:         private static Collection<Object[]> createConfig(int loopsWithSameDomain, Boolean[] usedControls) {
580:                 final Collection<Object[]> config = new ArrayList<Object[]>();
581:                 for (int i = 0; i < loopsWithSameDomain - 1; i++) {
582:                         config.add(new Object[] { false, usedControls });
583:                 }
584:                 config.add(new Object[] { true, usedControls });
585:                 return config;
586:         }
587:
588: }