Source:
<code>private void createExcludeGroup() { Group excludeEventMainGroup = new Group(this, SWT.SHADOW_NONE); excludeEventMainGroup.setText(Messages.TraceControl_EnableEventsExcludeEventGroupName); GridLayout layout = new GridLayout(2, false); excludeEventMainGroup.setLayout(layout); GridData data = new GridData(GridData.FILL_HORIZONTAL); excludeEventMainGroup.setLayoutData(data); Composite buttonComposite = new Composite(excludeEventMainGroup, SWT.NONE); layout = new GridLayout(1, false); buttonComposite.setLayout(layout); data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true); buttonComposite.setLayoutData(data); fExcludeEventsButton = new Button(buttonComposite, SWT.CHECK); fExcludeEventsButton.setText(Messages.TraceControl_EnableGroupSelectionName); fExcludeEventsButton.setSelection(false); data = new GridData(GridData.FILL_HORIZONTAL); fExcludeEventsButton.setLayoutData(data); fExcludeEventsButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { <START> if (fExcludeEventsButton.getSelection()) { fExcludeEventsText.setEnabled(true); } else { fExcludeEventsText.setEnabled(false); } <END> } }); Group excludeEventGroup = new Group(excludeEventMainGroup, SWT.SHADOW_NONE); layout = new GridLayout(3, true); excludeEventGroup.setLayout(layout); data = new GridData(GridData.FILL_HORIZONTAL); excludeEventGroup.setLayoutData(data); Label excludeEventLabel = new Label(excludeEventGroup, SWT.LEFT); excludeEventLabel.setText(Messages.TraceControl_EnableEventsExcludeEventLabel); data.horizontalSpan = 1; excludeEventLabel.setLayoutData(data); fExcludeEventsText = new Text(excludeEventGroup, SWT.LEFT); fExcludeEventsText.setToolTipText(Messages.TraceControl_EnableEventsExcludeEventTooltip); data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2; fExcludeEventsText.setLayoutData(data); fExcludeEventsText.setEnabled(false); }</code><technical_language>reminder: fExcludeEventsText.setEnabled(fExcludeEventsButton.getSelection());</technical_language>

Target:
private void createExcludeGroup() { Group excludedEventMainGroup = new Group(this, SWT.SHADOW_NONE); excludedEventMainGroup.setText(Messages.TraceControl_EnableEventsExcludedEventGroupName); GridLayout layout = new GridLayout(2, false); excludedEventMainGroup.setLayout(layout); GridData data = new GridData(GridData.FILL_HORIZONTAL); excludedEventMainGroup.setLayoutData(data); Composite buttonComposite = new Composite(excludedEventMainGroup, SWT.NONE); layout = new GridLayout(1, false); buttonComposite.setLayout(layout); data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true); buttonComposite.setLayoutData(data); fExcludedEventsButton = new Button(buttonComposite, SWT.CHECK); fExcludedEventsButton.setText(Messages.TraceControl_EnableGroupSelectionName); fExcludedEventsButton.setSelection(false); data = new GridData(GridData.FILL_HORIZONTAL); fExcludedEventsButton.setLayoutData(data); fExcludedEventsButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { fExcludedEventsText.setEnabled(fExcludedEventsButton.getSelection()); } }); Group excludedEventGroup = new Group(excludedEventMainGroup, SWT.SHADOW_NONE); layout = new GridLayout(3, true); excludedEventGroup.setLayout(layout); data = new GridData(GridData.FILL_HORIZONTAL); excludedEventGroup.setLayoutData(data); Label excludedEventLabel = new Label(excludedEventGroup, SWT.LEFT); excludedEventLabel.setText(Messages.TraceControl_EnableEventsExcludedEventLabel); data.horizontalSpan = 1; excludedEventLabel.setLayoutData(data); fExcludedEventsText = new Text(excludedEventGroup, SWT.LEFT); fExcludedEventsText.setToolTipText(Messages.TraceControl_EnableEventsExcludedEventTooltip); data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2; fExcludedEventsText.setLayoutData(data); fExcludedEventsText.setEnabled(false); }