1 | package de.uka.ipd.sdq.dsexplore.launch; |
2 | |
3 | import java.util.ArrayList; |
4 | |
5 | import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; |
6 | import org.eclipse.debug.ui.ILaunchConfigurationDialog; |
7 | import org.eclipse.debug.ui.ILaunchConfigurationTab; |
8 | |
9 | import de.uka.ipd.sdq.dsexplore.analysis.AnalysisQualityAttributes; |
10 | import de.uka.ipd.sdq.dsexplore.launch.DSEConstantsContainer.QualityAttribute; |
11 | import de.uka.ipd.sdq.workflow.launchconfig.tabs.DebugEnabledCommonTab; |
12 | |
13 | /** |
14 | * Creates a Tab Group for the launch configuration. |
15 | * @author Anne |
16 | * |
17 | */ |
18 | public class DSETabGroup extends AbstractLaunchConfigurationTabGroup { |
19 | |
20 | /** |
21 | * Actually creates the tabs. |
22 | * @param dialog not needed |
23 | * @param mode not needed |
24 | */ |
25 | @Override |
26 | public void createTabs(final ILaunchConfigurationDialog dialog, final String mode) { |
27 | |
28 | QMLManager qmlManager = new QMLManager(); |
29 | |
30 | ArrayList<DSEAnalysisMethodTab> analysisTabs = new ArrayList<DSEAnalysisMethodTab>(); |
31 | for(QualityAttribute quality : new AnalysisQualityAttributes().getAllQualityAttributes()){ |
32 | analysisTabs.add(new DSEAnalysisMethodTab(quality)); |
33 | } |
34 | |
35 | qmlManager.addTabs(analysisTabs.toArray(new DSEAnalysisMethodTab[]{})); |
36 | |
37 | DSEFileNamesInputTab defaultTab = new DSEFileNamesInputTab(qmlManager); |
38 | |
39 | DSEOptionsTab optionsTab = new DSEOptionsTab(); |
40 | |
41 | TerminationCriteriaTab terminationTab = new TerminationCriteriaTab(qmlManager); |
42 | |
43 | ArrayList<ILaunchConfigurationTab> tabs = new ArrayList<ILaunchConfigurationTab>(); |
44 | |
45 | tabs.add(defaultTab); // Default tab |
46 | tabs.add(optionsTab); |
47 | tabs.add(terminationTab); |
48 | |
49 | tabs.addAll(analysisTabs); |
50 | |
51 | tabs.add(new TacticsTab()); |
52 | tabs.add(new StartingPopulationHeuristicTab()); |
53 | |
54 | tabs.add(new DebugEnabledCommonTab()); |
55 | |
56 | |
57 | |
58 | ILaunchConfigurationTab[] iTabs = new ILaunchConfigurationTab[tabs.size()]; |
59 | for (int i = 0; i < iTabs.length; i++) { |
60 | iTabs[i] = tabs.get(i); |
61 | } |
62 | setTabs(iTabs); |
63 | |
64 | } |
65 | |
66 | } |