Search in sources :

Example 16 with EMFListContentProvider

use of org.eclipse.emf.eef.runtime.ui.providers.EMFListContentProvider in project InformationSystem by ObeoNetwork.

the class BindingReferencePropertiesEditionPartImpl method createRightEMFComboViewer.

protected Composite createRightEMFComboViewer(Composite parent) {
    createDescription(parent, EnvironmentViewsRepository.BindingReference.Properties.right, EnvironmentMessages.BindingReferencePropertiesEditionPart_RightLabel);
    right = new EMFComboViewer(parent);
    GridData rightData = new GridData(GridData.FILL_HORIZONTAL);
    right.getCombo().setLayoutData(rightData);
    right.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    right.addSelectionChangedListener(new ISelectionChangedListener() {

        /**
         * {@inheritDoc}
         *
         * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
         */
        public void selectionChanged(SelectionChangedEvent event) {
            if (propertiesEditionComponent != null)
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BindingReferencePropertiesEditionPartImpl.this, EnvironmentViewsRepository.BindingReference.Properties.right, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getRight()));
        }
    });
    right.setContentProvider(new EMFListContentProvider());
    EditingUtils.setID(right.getCombo(), EnvironmentViewsRepository.BindingReference.Properties.right);
    // $NON-NLS-1$
    EditingUtils.setEEFtype(right.getCombo(), "eef::Combo");
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EnvironmentViewsRepository.BindingReference.Properties.right, EnvironmentViewsRepository.SWT_KIND), null);
    // End of user code
    return parent;
}
Also used : EMFListContentProvider(org.eclipse.emf.eef.runtime.ui.providers.EMFListContentProvider) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) EMFComboViewer(org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)

Aggregations

AdapterFactoryLabelProvider (org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider)16 IPropertiesEditionEvent (org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)16 PropertiesEditionEvent (org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)16 EMFListContentProvider (org.eclipse.emf.eef.runtime.ui.providers.EMFListContentProvider)16 EMFComboViewer (org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer)16 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)16 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)16 GridData (org.eclipse.swt.layout.GridData)16