Source:
<code>IObservableValue<IRegistry> createRegistrySelectionControls( Composite parent) { final Label accountLabel = new Label(parent, SWT.NULL); accountLabel.setText(WizardMessages .getString("ImagePullPushPage.registry.account.label")); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER) .grab(false, false).applyTo(accountLabel); final Combo registryAccountCombo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY); registryAccountCombo.setToolTipText(WizardMessages .getString("ImagePullPushPage.registry.account.desc")); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER) .grab(true, false).applyTo(registryAccountCombo); final ComboViewer registryAccountComboViewer = new ComboViewer( registryAccountCombo); registryAccountComboViewer .setContentProvider(ArrayContentProvider.getInstance()); registryAccountComboViewer .setLabelProvider(new RegistryAccountLabelProvider()); final List<IRegistry> allRegistryAccounts = getRegistryAccounts(); final IPreferenceStore store = Activator.getDefault() .getPreferenceStore(); IRegistry defaultRegistry = null; String lastRegistry = store .getString(PreferenceConstants.LAST_REGISTRY_ACCOUNT); if (!allRegistryAccounts.isEmpty()) { defaultRegistry = allRegistryAccounts.get(0); } IRegistry selectedRegistry = allRegistryAccounts.stream() <START> .filter(x -> x.toString().equals(lastRegistry)).findFirst() <END> .orElse(defaultRegistry); registryAccountComboViewer.setInput(allRegistryAccounts); if (!allRegistryAccounts.isEmpty()) { getModel().setSelectedRegistry(selectedRegistry); } final IObservableValue<IRegistry> registryAccountObservable = BeanProperties .value(ImagePushPageModel.class, ImagePullPushPageModel.SELECTED_REGISTRY) .observe(model); dbc.bindValue(ViewerProperties.singleSelection().observe( registryAccountComboViewer), registryAccountObservable); final Link addRegistryLink = new Link(parent, SWT.NONE); addRegistryLink.setText( WizardMessages.getString("ImagePullPushPage.add.link")); GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER) .grab(false, false).applyTo(addRegistryLink); addRegistryLink.addSelectionListener( onAddRegistry(registryAccountComboViewer)); return registryAccountObservable; }</code><technical_language>great, thanks</technical_language>

Target:
IObservableValue<IRegistry> createRegistrySelectionControls( Composite parent) { final Label accountLabel = new Label(parent, SWT.NULL); accountLabel.setText(WizardMessages .getString("ImagePullPushPage.registry.account.label")); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER) .grab(false, false).applyTo(accountLabel); final Combo registryAccountCombo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY); registryAccountCombo.setToolTipText(WizardMessages .getString("ImagePullPushPage.registry.account.desc")); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER) .grab(true, false).applyTo(registryAccountCombo); final ComboViewer registryAccountComboViewer = new ComboViewer( registryAccountCombo); registryAccountComboViewer .setContentProvider(ArrayContentProvider.getInstance()); registryAccountComboViewer .setLabelProvider(new RegistryAccountLabelProvider()); final List<IRegistry> allRegistryAccounts = getRegistryAccounts(); final IPreferenceStore store = Activator.getDefault() .getPreferenceStore(); IRegistry defaultRegistry = null; String lastRegistry = store .getString(PreferenceConstants.LAST_REGISTRY_ACCOUNT); if (!allRegistryAccounts.isEmpty()) { defaultRegistry = allRegistryAccounts.get(0); } IRegistry selectedRegistry = allRegistryAccounts.stream() .filter(x -> x.toString().equals(lastRegistry)).findFirst() .orElse(defaultRegistry); registryAccountComboViewer.setInput(allRegistryAccounts); if (selectedRegistry != null) { getModel().setSelectedRegistry(selectedRegistry); } final IObservableValue<IRegistry> registryAccountObservable = BeanProperties .value(ImagePushPageModel.class, ImagePullPushPageModel.SELECTED_REGISTRY) .observe(model); dbc.bindValue(ViewerProperties.singleSelection().observe( registryAccountComboViewer), registryAccountObservable); final Link addRegistryLink = new Link(parent, SWT.NONE); addRegistryLink.setText( WizardMessages.getString("ImagePullPushPage.add.link")); GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER) .grab(false, false).applyTo(addRegistryLink); addRegistryLink.addSelectionListener( onAddRegistry(registryAccountComboViewer)); return registryAccountObservable; }