Package: VdmRtRuntimeChecksLaunchConfigurationTab

VdmRtRuntimeChecksLaunchConfigurationTab

nameinstructionbranchcomplexitylinemethod
VdmRtRuntimeChecksLaunchConfigurationTab()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createExtendableContent(Composite)
M: 47 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 12 C: 0
0%
M: 1 C: 0
0%
initializeFrom(ILaunchConfiguration)
M: 15 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
performApply(ILaunchConfigurationWorkingCopy)
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
setDefaults(ILaunchConfigurationWorkingCopy)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * #%~
3: * org.overture.ide.vdmrt.debug
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.vdmrt.debug.ui.launching;
23:
24: import org.eclipse.core.runtime.CoreException;
25: import org.eclipse.debug.core.ILaunchConfiguration;
26: import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
27: import org.eclipse.swt.SWT;
28: import org.eclipse.swt.layout.GridData;
29: import org.eclipse.swt.layout.GridLayout;
30: import org.eclipse.swt.widgets.Button;
31: import org.eclipse.swt.widgets.Composite;
32: import org.eclipse.swt.widgets.Group;
33: import org.overture.ide.debug.ui.launching.VdmRuntimeChecksLaunchConfigurationTab;
34: import org.overture.ide.vdmrt.debug.IVdmRtDebugConstants;
35:
36: public class VdmRtRuntimeChecksLaunchConfigurationTab extends
37:                 VdmRuntimeChecksLaunchConfigurationTab
38: {
39:         private Button checkBoxEnableRealTimeLog;
40:
41:         @Override
42:         protected void createExtendableContent(Composite comp)
43:         {
44:                 Group group = new Group(comp, SWT.NONE);
45:                 group.setText("VDM Real-Time options");
46:                 GridData gd = new GridData(GridData.FILL_HORIZONTAL);
47:
48:                 group.setLayoutData(gd);
49:
50:                 GridLayout layout = new GridLayout();
51:                 layout.makeColumnsEqualWidth = false;
52:                 layout.numColumns = 3;
53:                 group.setLayout(layout);
54:
55:                 checkBoxEnableRealTimeLog = new Button(group, SWT.CHECK);
56:                 checkBoxEnableRealTimeLog.setText("Log Real-Time Events");
57:                 checkBoxEnableRealTimeLog.addSelectionListener(fListener);
58:         }
59:         
60:         @Override
61:         public void performApply(ILaunchConfigurationWorkingCopy configuration)
62:         {
63:                 super.performApply(configuration);
64:                 configuration.setAttribute(IVdmRtDebugConstants.VDM_LAUNCH_CONFIG_ENABLE_REALTIME_LOGGING, checkBoxEnableRealTimeLog.getSelection());
65:         }
66:         
67:         @Override
68:         public void initializeFrom(ILaunchConfiguration configuration)
69:         {
70:                 super.initializeFrom(configuration);
71:                 try
72:                 {
73:                         checkBoxEnableRealTimeLog.setSelection(configuration.getAttribute(IVdmRtDebugConstants.VDM_LAUNCH_CONFIG_ENABLE_REALTIME_LOGGING, IVdmRtDebugConstants.VDM_LAUNCH_CONFIG_ENABLE_REALTIME_LOGGING_DEFAULT));
74:                 } catch (CoreException e)
75:                 {
76:                         // TODO Auto-generated catch block
77:                         e.printStackTrace();
78:                 }
79:         }
80:         
81:         @Override
82:         public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
83:         {
84:                 super.setDefaults(configuration);
85:                 configuration.setAttribute(IVdmRtDebugConstants.VDM_LAUNCH_CONFIG_ENABLE_REALTIME_LOGGING, IVdmRtDebugConstants.VDM_LAUNCH_CONFIG_ENABLE_REALTIME_LOGGING_DEFAULT);
86:         }
87: }