Package: LibrarySelection

LibrarySelection

nameinstructionbranchcomplexitylinemethod
LibrarySelection(Composite, int, boolean)
M: 28 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 10 C: 0
0%
M: 1 C: 0
0%
initialize()
M: 102 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 21 C: 0
0%
M: 1 C: 0
0%
isCsvSelected()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isIoSelected()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isMathSelected()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isUtilSelected()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isVdmUnitSelected()
M: 11 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setCsvChecked(boolean)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setIoChecked(boolean)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setMathChecked(boolean)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setVdmUnitChecked(boolean)
M: 8 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
setVdmUtilChecked(boolean)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * #%~
3: * org.overture.ide.ui
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.ui.wizard.pages;
23:
24: import org.eclipse.swt.layout.GridLayout;
25: import org.eclipse.swt.graphics.Point;
26: import org.eclipse.swt.widgets.Composite;
27: import org.eclipse.swt.widgets.Label;
28: import org.eclipse.swt.SWT;
29: import org.eclipse.swt.widgets.Button;
30:
31: public class LibrarySelection extends Composite
32: {
33:
34:         private Label label = null;
35:         private Button checkBoxIo = null;
36:         private Button checkBoxCsvIo = null;
37:         private Button checkBoxMath = null;
38:         private Button checkBoxUtil = null;
39:         private Button checkBoxVdmUnit = null;
40:         boolean isOo;
41:
42:         public LibrarySelection(Composite parent, int style, boolean isOo)
43:         {
44:                 super(parent, style);
45:                 this.isOo = isOo;
46:                 initialize();
47:         }
48:
49:         private void initialize()
50:         {
51:                 label = new Label(this, SWT.NONE);
52:                 label.setText("Select libraries to include");
53:                 checkBoxIo = new Button(this, SWT.CHECK);
54:                 checkBoxIo.setText("IO");
55:                 checkBoxIo.setToolTipText("Provides basic IO facilities like println, and file IO");
56:                 checkBoxMath = new Button(this, SWT.CHECK);
57:                 checkBoxMath.setText("Math");
58:                 checkBoxMath.setToolTipText("Offers a basic Math interface");
59:                 checkBoxUtil = new Button(this, SWT.CHECK);
60:                 checkBoxUtil.setText("VDM-Util");
61:                 checkBoxUtil.setToolTipText("?");
62:                 checkBoxCsvIo = new Button(this, SWT.CHECK);
63:                 checkBoxCsvIo.setText("CSV");
64:                 checkBoxCsvIo.setToolTipText("Provides IO facilities for CSV files");
65:•                if (isOo)
66:                 {
67:                         checkBoxVdmUnit = new Button(this, SWT.CHECK);
68:                         checkBoxVdmUnit.setText("VDM-Unit");
69:                         checkBoxVdmUnit.setToolTipText("Provides JUnit like facilities for VDM models");
70:                 }
71:                 setSize(new Point(300, 200));
72:                 setLayout(new GridLayout());
73:         }
74:
75:         public boolean isIoSelected()
76:         {
77:                 return checkBoxIo.getSelection();
78:         }
79:
80:         public boolean isMathSelected()
81:         {
82:                 return checkBoxMath.getSelection();
83:         }
84:
85:         public boolean isUtilSelected()
86:         {
87:                 return checkBoxUtil.getSelection();
88:         }
89:
90:         public boolean isCsvSelected()
91:         {
92:                 return checkBoxCsvIo.getSelection();
93:         }
94:
95:         public boolean isVdmUnitSelected()
96:         {
97:•                return checkBoxVdmUnit != null && checkBoxVdmUnit.getSelection();
98:         }
99:
100:         public void setIoChecked(boolean b)
101:         {
102:                 checkBoxIo.setSelection(b);
103:         }
104:
105:         public void setMathChecked(boolean exists)
106:         {
107:                 checkBoxMath.setSelection(exists);
108:         }
109:
110:         public void setVdmUtilChecked(boolean exists)
111:         {
112:                 checkBoxUtil.setSelection(exists);
113:         }
114:
115:         public void setCsvChecked(boolean exists)
116:         {
117:                 checkBoxCsvIo.setSelection(exists);
118:         }
119:
120:         public void setVdmUnitChecked(boolean exists)
121:         {
122:•                if (isOo)
123:                 {
124:                         checkBoxVdmUnit.setSelection(exists);
125:                 }
126:         }
127: }