Search in sources :

Example 41 with EMFComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer in project InformationSystem by ObeoNetwork.

the class ServicePropertiesEditionPartImpl method createSynchronizationEMFComboViewer.

protected Composite createSynchronizationEMFComboViewer(Composite parent) {
    createDescription(parent, SoaViewsRepository.Service.Properties.synchronization, SoaMessages.ServicePropertiesEditionPart_SynchronizationLabel);
    synchronization = new EMFComboViewer(parent);
    synchronization.setContentProvider(new ArrayContentProvider());
    synchronization.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
    GridData synchronizationData = new GridData(GridData.FILL_HORIZONTAL);
    synchronization.getCombo().setLayoutData(synchronizationData);
    synchronization.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(ServicePropertiesEditionPartImpl.this, SoaViewsRepository.Service.Properties.synchronization, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getSynchronization()));
        }
    });
    synchronization.setID(SoaViewsRepository.Service.Properties.synchronization);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(SoaViewsRepository.Service.Properties.synchronization, SoaViewsRepository.SWT_KIND), null);
    // End of user code
    return parent;
}
Also used : ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) 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)

Example 42 with EMFComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer in project InformationSystem by ObeoNetwork.

the class AttributePropertiesEditionPartForm method createMultiplicityEMFComboViewer.

protected Composite createMultiplicityEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
    createDescription(parent, EnvironmentViewsRepository.Attribute.Properties.multiplicity, EnvironmentMessages.AttributePropertiesEditionPart_MultiplicityLabel);
    multiplicity = new EMFComboViewer(parent);
    multiplicity.setContentProvider(new ArrayContentProvider());
    multiplicity.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
    GridData multiplicityData = new GridData(GridData.FILL_HORIZONTAL);
    multiplicity.getCombo().setLayoutData(multiplicityData);
    multiplicity.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(AttributePropertiesEditionPartForm.this, EnvironmentViewsRepository.Attribute.Properties.multiplicity, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getMultiplicity()));
        }
    });
    multiplicity.setID(EnvironmentViewsRepository.Attribute.Properties.multiplicity);
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EnvironmentViewsRepository.Attribute.Properties.multiplicity, EnvironmentViewsRepository.FORM_KIND), null);
    // End of user code
    return parent;
}
Also used : ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) 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)

Example 43 with EMFComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer in project InformationSystem by ObeoNetwork.

the class BindingInfoPropertiesEditionPartForm method createRightEMFComboViewer.

protected Composite createRightEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
    createDescription(parent, EnvironmentViewsRepository.BindingInfo.Properties.right, EnvironmentMessages.BindingInfoPropertiesEditionPart_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(BindingInfoPropertiesEditionPartForm.this, EnvironmentViewsRepository.BindingInfo.Properties.right, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getRight()));
        }
    });
    right.setContentProvider(new EMFListContentProvider());
    EditingUtils.setID(right.getCombo(), EnvironmentViewsRepository.BindingInfo.Properties.right);
    EditingUtils.setEEFtype(right.getCombo(), "eef::Combo");
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EnvironmentViewsRepository.BindingInfo.Properties.right, EnvironmentViewsRepository.FORM_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)

Example 44 with EMFComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer in project InformationSystem by ObeoNetwork.

the class ReferencePropertiesEditionPartImpl method createMultiplicityEMFComboViewer.

protected Composite createMultiplicityEMFComboViewer(Composite parent) {
    createDescription(parent, EnvironmentViewsRepository.Reference.Properties.multiplicity, EnvironmentMessages.ReferencePropertiesEditionPart_MultiplicityLabel);
    multiplicity = new EMFComboViewer(parent);
    multiplicity.setContentProvider(new ArrayContentProvider());
    multiplicity.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
    GridData multiplicityData = new GridData(GridData.FILL_HORIZONTAL);
    multiplicity.getCombo().setLayoutData(multiplicityData);
    multiplicity.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(ReferencePropertiesEditionPartImpl.this, EnvironmentViewsRepository.Reference.Properties.multiplicity, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getMultiplicity()));
        }
    });
    multiplicity.setID(EnvironmentViewsRepository.Reference.Properties.multiplicity);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EnvironmentViewsRepository.Reference.Properties.multiplicity, EnvironmentViewsRepository.SWT_KIND), null);
    // End of user code
    return parent;
}
Also used : ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) 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)

Example 45 with EMFComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer in project InformationSystem by ObeoNetwork.

the class TransitionPropertiesEditionPartForm method createKindEMFComboViewer.

protected Composite createKindEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
    createDescription(parent, GraalViewsRepository.Transition.Properties.kind, GraalMessages.TransitionPropertiesEditionPart_KindLabel);
    kind = new EMFComboViewer(parent);
    kind.setContentProvider(new ArrayContentProvider());
    kind.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
    GridData kindData = new GridData(GridData.FILL_HORIZONTAL);
    kind.getCombo().setLayoutData(kindData);
    kind.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(TransitionPropertiesEditionPartForm.this, GraalViewsRepository.Transition.Properties.kind, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getKind()));
        }
    });
    kind.setID(GraalViewsRepository.Transition.Properties.kind);
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(GraalViewsRepository.Transition.Properties.kind, GraalViewsRepository.FORM_KIND), null);
    // End of user code
    return parent;
}
Also used : ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) 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)50 IPropertiesEditionEvent (org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)50 PropertiesEditionEvent (org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)50 EMFComboViewer (org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer)50 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)50 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)50 GridData (org.eclipse.swt.layout.GridData)50 ArrayContentProvider (org.eclipse.jface.viewers.ArrayContentProvider)34 EMFListContentProvider (org.eclipse.emf.eef.runtime.ui.providers.EMFListContentProvider)16