// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
- private enum KernelGroupEnum { TRACEPOINTS, SYSCALLS, PROBE, FUNCTION }
+ private enum KernelGroupEnum { ALL, TRACEPOINTS, SYSCALLS, PROBE, FUNCTION }
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+ /**
+ * A button to enable/disable the all tracepoints&sycalls group
+ */
+ private Button fAllActivateButton;
/**
* A button to enable/disable the tracepoints group
*/
* component which contains a list of available tracepoints.
*/
private final TraceProviderGroup fProviderGroup;
+ /**
+ * The flag indicating that all tracepoints/syscalls are selected.
+ */
+ private boolean fIsAllTracepointsAndSyscalls;
/**
* The flag indicating that tracepoints are selected.
*/
// ------------------------------------------------------------------------
// Acessors
// ------------------------------------------------------------------------
-
+ @Override
+ public boolean isAllEvents() {
+ return fIsAllTracepointsAndSyscalls;
+ }
@Override
public boolean isTracepoints() {
return fIsTracepoints;
*/
public void createContent() {
+ // All Tracepoints/syscalls Group
+ createAllTracepointsSyscallGroup();
+
// Tracepoints Group
createTracepointsGroup();
createFilterGroup();
// Set default enablements
- setKernelEnablements(KernelGroupEnum.TRACEPOINTS);
+ setKernelEnablements(KernelGroupEnum.ALL);
}
/**
* @return true if configured data is valid and can be retrieved.
*/
public boolean isValid() {
+ fIsAllTracepointsAndSyscalls = fAllActivateButton.getSelection();
fIsTracepoints = fTracepointsActivateButton.getSelection();
fIsSysCalls = fSysCallsActivateButton.getSelection();
fIsDynamicProbe = fProbeActivateButton.getSelection();
return true;
}
+ /**
+ * Creates all tracepoints/syscalls group.
+ */
+ private void createAllTracepointsSyscallGroup() {
+
+ GridLayout layout;
+ GridData data;
+ Group tpMainGroup = new Group(this, SWT.SHADOW_NONE);
+ tpMainGroup.setText(Messages.TraceControl_EnableEventsAllEventsLabel);
+ layout = new GridLayout(2, false);
+ tpMainGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ tpMainGroup.setLayoutData(data);
+
+ Composite buttonComposite = new Composite(tpMainGroup, SWT.NONE);
+ layout = new GridLayout(1, true);
+ buttonComposite.setLayout(layout);
+ data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
+ buttonComposite.setLayoutData(data);
+
+ fAllActivateButton = new Button(buttonComposite, SWT.RADIO);
+ fAllActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
+ fAllActivateButton.setToolTipText(Messages.TraceControl_EnableEventsAllEventsTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fAllActivateButton.setLayoutData(data);
+ fAllActivateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setKernelEnablements(KernelGroupEnum.ALL);
+ }
+ });
+ }
+
/**
* Creates tracepoints group.
*/
* @param group - group to enable.
*/
private void setKernelEnablements(KernelGroupEnum group) {
+ fAllActivateButton.setSelection(group == KernelGroupEnum.ALL);
fTracepointsActivateButton.setSelection(group == KernelGroupEnum.TRACEPOINTS);
fTracepointsViewer.getTree().setEnabled(group == KernelGroupEnum.TRACEPOINTS);