Package: CombinatorialTestingPerspective

CombinatorialTestingPerspective

nameinstructionbranchcomplexitylinemethod
CombinatorialTestingPerspective()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addActionSets()
M: 17 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
addNewWizardShortcuts()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
addPerspectiveShortcuts()
M: 1 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
addViewShortcuts()
M: 13 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
addViews()
M: 50 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 13 C: 0
0%
M: 1 C: 0
0%
createInitialLayout(IPageLayout)
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * #%~
3: * Combinatorial Testing
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.ide.plugins.combinatorialtesting.perspectives;
23:
24: import org.eclipse.ui.IFolderLayout;
25: import org.eclipse.ui.IPageLayout;
26: import org.eclipse.ui.IPerspectiveFactory;
27: import org.eclipse.ui.console.IConsoleConstants;
28: import org.overture.ide.ui.IVdmUiConstants;
29:
30: /**
31: * This class is meant to serve as an example for how various contributions are made to a perspective. Note that some of
32: * the extension point id's are referred to as API constants while others are hardcoded and may be subject to change.
33: */
34: public class CombinatorialTestingPerspective implements IPerspectiveFactory
35: {
36:
37:         private IPageLayout factory;
38:
39:         public CombinatorialTestingPerspective()
40:         {
41:                 super();
42:         }
43:
44:         public void createInitialLayout(IPageLayout factory)
45:         {
46:                 this.factory = factory;
47:                 addViews();
48:                 addActionSets();
49:                 addNewWizardShortcuts();
50:                 addPerspectiveShortcuts();
51:                 addViewShortcuts();
52:         }
53:
54:         private void addViews()
55:         {
56:                 // Creates the overall folder layout.
57:                 // Note that each new Folder uses a percentage of the remaining EditorArea.
58:                 String editorArea = factory.getEditorArea();
59:
60:                 IFolderLayout folder = factory.createFolder("left", IPageLayout.LEFT, (float) 0.2, editorArea); //$NON-NLS-1$
61:                 String navigator = IVdmUiConstants.NAVIGATOR;
62:
63:                 folder.addView(navigator);
64:
65:                 IFolderLayout bottom = factory.createFolder("bottomRight", // NON-NLS-1
66:                                 IPageLayout.BOTTOM, 0.75f, factory.getEditorArea());
67:                 bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
68:                 bottom.addView("org.eclipse.ui.console.ConsoleView");
69:                 bottom.addView("org.overture.ide.plugins.combinatorialtesting.views.TraceTest"); // NON-NLS-1
70:
71:                 IFolderLayout right = factory.createFolder("Right", // NON-NLS-1
72:                                 IPageLayout.RIGHT, 0.72f, factory.getEditorArea());
73:
74:                 right.addView("org.overture.ide.plugins.combinatorialtesting.views.TracesView"); // NON-NLS-1
75:
76:         }
77:
78:         private void addActionSets()
79:         {
80:                 factory.addActionSet("org.eclipse.debug.ui.launchActionSet"); // NON-NLS-1
81:                 factory.addActionSet("org.eclipse.debug.ui.debugActionSet"); // NON-NLS-1
82:                 factory.addActionSet("org.eclipse.debug.ui.profileActionSet"); // NON-NLS-1
83:                 factory.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); // NON-NLS-1
84:         }
85:
86:         private void addPerspectiveShortcuts()
87:         {
88:         }
89:
90:         private void addNewWizardShortcuts()
91:         {
92:                 factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");// NON-NLS-1
93:                 factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");// NON-NLS-1
94:         }
95:
96:         private void addViewShortcuts()
97:         {
98:                 factory.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
99:                 factory.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
100:                 factory.addShowViewShortcut(IPageLayout.ID_OUTLINE);
101:         }
102:
103: }