Source:
private void createEnableDebuggingControls(FormToolkit toolkit, Composite container, DataBindingContext dbc) { Label enableDevmodeLabel = new Label(container, SWT.None); enableDevmodeLabel.setText("Enable debugging:"); applyAlignData(SWT.FILL, SWT.CENTER, enableDevmodeLabel); useImageDevmodeKeyButton = toolkit.createButton(container, "use image provided key", SWT.CHECK); applyGridData(4, 1, SWT.FILL, SWT.CENTER, useImageDevmodeKeyButton); new Label(container, SWT.NONE); Label keyLabel = new Label(container, SWT.NONE); keyLabel.setText("Key:"); applyAlignData(SWT.BEGINNING, SWT.CENTER, keyLabel); devmodeKeyText = new Text(container, SWT.BORDER); applyGridData(3, 1, SWT.FILL, SWT.CENTER,devmodeKeyText); devmodeKeyModifyListener = new ModifyListener() { public void modifyText(ModifyEvent e) { execute(new ServerWorkingCopyPropertyTextCommand(input.getServer(), "SetDevmodeKey", devmodeKeyText, devmodeKeyText.getText(), OpenShiftServerUtils.ATTR_DEVMODE_KEY, this)); } }; ModifyListener devmodeKeyModifyDecoration = new TextboxDecoratorSupport(devmodeKeyText, new IValidator() { @Override public IStatus validate(Object value) { if( !useImageDevmodeKeyButton.getSelection()) { return new OpenShiftIdentifierValidator().validate(devmodeKeyText.getText()); } return Status.OK_STATUS; } }); devmodeKeyText.addModifyListener(devmodeKeyModifyDecoration); useImageDevmodeKeyListener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { execute(new ToggleDebuggingCommand(input.getServer(), useImageDevmodeKeyButton, devmodeKeyText, this, devmodeKeyModifyListener)); } }; }

Target:
private void createEnableDebuggingControls(FormToolkit toolkit, Composite container, DataBindingContext dbc) { Label enableDevmodeLabel = new Label(container, SWT.None); enableDevmodeLabel.setText("Enable debugging:"); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(enableDevmodeLabel); useImageDevmodeKeyButton = toolkit.createButton(container, "use image provided key", SWT.CHECK); GridDataFactory.fillDefaults().span(4, 1).align(SWT.FILL, SWT.CENTER).applyTo(useImageDevmodeKeyButton); new Label(container, SWT.NONE); Label keyLabel = new Label(container, SWT.NONE); keyLabel.setText("Key:"); GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.CENTER).applyTo(keyLabel); devmodeKeyText = new Text(container, SWT.BORDER); GridDataFactory.fillDefaults().span(3, 1).align(SWT.FILL, SWT.CENTER).applyTo(devmodeKeyText); devmodeKeyModifyListener = new ModifyListener() { @Override public void modifyText(ModifyEvent e) { execute(new ServerWorkingCopyPropertyTextCommand(input.getServer(), "SetDevmodeKey", devmodeKeyText, devmodeKeyText.getText(), OpenShiftServerUtils.ATTR_DEVMODE_KEY, (ModifyListener) this)); } }; ModifyListener devmodeKeyModifyDecoration = new TextboxDecoratorSupport(devmodeKeyText, value -> { if( !useImageDevmodeKeyButton.getSelection()) { return new OpenShiftIdentifierValidator().validate(devmodeKeyText.getText()); } return Status.OK_STATUS; }); devmodeKeyText.addModifyListener(devmodeKeyModifyDecoration); useImageDevmodeKeyListener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { execute(new ToggleDebuggingCommand(input.getServer(), useImageDevmodeKeyButton, devmodeKeyText, this, devmodeKeyModifyListener)); } }; }