Source:
protected void initializeQuickPath(Composite parent) { quickPathButton = new Button(parent, SWT.RADIO); quickPathButton.setText("Quick path builder"); final Composite quickPathBuilderComposite = new Composite(parent, SWT.NONE); quickPathBuilderComposite.setLayout(new GridLayout(2, false)); final Label comboText = new Label(quickPathBuilderComposite, SWT.NONE); comboText.setText("1. Choose one of the following paths: "); GridData marginLeftData = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false); marginLeftData.horizontalIndent = 10; comboText.setLayoutData(marginLeftData); final Combo quickPathCombo = new Combo(quickPathBuilderComposite, SWT.READ_ONLY); String[] items = {"*", "CPUs/*", "Threads/*"}; quickPathCombo.setItems(items); quickPathCombo.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { currentBuildPath = ((Combo)e.widget).getText(); pathValue.setText(currentBuildPath); } @Override public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } }); final Label textText = new Label(quickPathBuilderComposite, SWT.NONE); textText.setText("2. Write your own path: "); textText.setLayoutData(marginLeftData); final Text customText = new Text(quickPathBuilderComposite, SWT.MULTI | SWT.WRAP | SWT.BORDER); customText.setLayoutData(new GridData(350, 19)); customText.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { currentBuildPath = ((Text)e.widget).getText(); pathValue.setText(((Text)e.widget).getText()); } }); setEnabledRecursive(quickPathBuilderComposite, false); quickPathButton.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { if(quickPathButton.getSelection()) { setEnabledRecursive(quickPathBuilderComposite, true); customPathButton.setSelection(false); customPathButton.notifyListeners(SWT.Selection, new Event()); } else { setEnabledRecursive(quickPathBuilderComposite, false); } } @Override public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } }); }

Target:
protected void initializeQuickPath(Composite parent) { quickPathButton = new Button(parent, SWT.RADIO); quickPathButton.setText(Messages.StateSystemPathBuilder_quickPathButtonText); final Composite quickPathBuilderComposite = new Composite(parent, SWT.NONE); quickPathBuilderComposite.setLayout(new GridLayout(2, false)); final Label comboText = new Label(quickPathBuilderComposite, SWT.NONE); comboText.setText(Messages.StateSystemPathBuilder_comboTextText); GridData marginLeftData = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false); marginLeftData.horizontalIndent = 10; comboText.setLayoutData(marginLeftData); final Combo quickPathCombo = new Combo(quickPathBuilderComposite, SWT.READ_ONLY); String[] items = { "*", "CPUs/*", "Threads/*" }; quickPathCombo.setItems(items); quickPathCombo.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { currentBuildPath = ((Combo) e.widget).getText(); pathValue.setText(currentBuildPath); } @Override public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } }); final Label textText = new Label(quickPathBuilderComposite, SWT.NONE); textText.setText(Messages.StateSystemPathBuilder_textText); textText.setLayoutData(marginLeftData); final Text customText = new Text(quickPathBuilderComposite, SWT.MULTI | SWT.WRAP | SWT.BORDER); customText.setLayoutData(new GridData(350, 19)); customText.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { currentBuildPath = ((Text) e.widget).getText(); pathValue.setText(((Text) e.widget).getText()); } }); setEnabledRecursive(quickPathBuilderComposite, false); quickPathButton.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { if (quickPathButton.getSelection()) { setEnabledRecursive(quickPathBuilderComposite, true); customPathButton.setSelection(false); customPathButton.notifyListeners(SWT.Selection, new Event()); } else { setEnabledRecursive(quickPathBuilderComposite, false); } } @Override public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } }); }