use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class RiskPropertiesEditionPartForm method createBenefitsEMFComboViewer.
protected Composite createBenefitsEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
createDescription(parent, GraalextensionsViewsRepository.Risk.Properties.benefits, GraalextensionsMessages.RiskPropertiesEditionPart_BenefitsLabel);
benefits = new EMFComboViewer(parent);
benefits.setContentProvider(new ArrayContentProvider());
benefits.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
GridData benefitsData = new GridData(GridData.FILL_HORIZONTAL);
benefits.getCombo().setLayoutData(benefitsData);
benefits.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(RiskPropertiesEditionPartForm.this, GraalextensionsViewsRepository.Risk.Properties.benefits, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getBenefits()));
}
});
benefits.setID(GraalextensionsViewsRepository.Risk.Properties.benefits);
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(GraalextensionsViewsRepository.Risk.Properties.benefits, GraalextensionsViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class SubflowStatePropertiesEditionPartForm method createSubflowFlatComboViewer.
/**
* @param parent the parent composite
* @param widgetFactory factory to use to instanciante widget of the form
*/
protected Composite createSubflowFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
createDescription(parent, FlowViewsRepository.SubflowState.Properties.subflow, FlowMessages.SubflowStatePropertiesEditionPart_SubflowLabel);
subflow = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(FlowViewsRepository.SubflowState.Properties.subflow, FlowViewsRepository.FORM_KIND));
widgetFactory.adapt(subflow);
subflow.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
GridData subflowData = new GridData(GridData.FILL_HORIZONTAL);
subflow.setLayoutData(subflowData);
subflow.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(SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.subflow, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getSubflow()));
}
});
subflow.setID(FlowViewsRepository.SubflowState.Properties.subflow);
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(FlowViewsRepository.SubflowState.Properties.subflow, FlowViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class TransitionPropertiesEditionPartImpl method createFromFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createFromFlatComboViewer(Composite parent) {
createDescription(parent, FlowViewsRepository.Transition.Properties.from, FlowMessages.TransitionPropertiesEditionPart_FromLabel);
from = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(FlowViewsRepository.Transition.Properties.from, FlowViewsRepository.SWT_KIND));
from.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
from.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TransitionPropertiesEditionPartImpl.this, FlowViewsRepository.Transition.Properties.from, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getFrom()));
}
});
GridData fromData = new GridData(GridData.FILL_HORIZONTAL);
from.setLayoutData(fromData);
from.setID(FlowViewsRepository.Transition.Properties.from);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(FlowViewsRepository.Transition.Properties.from, FlowViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class TransitionPropertiesEditionPartImpl method createToFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createToFlatComboViewer(Composite parent) {
createDescription(parent, FlowViewsRepository.Transition.Properties.to, FlowMessages.TransitionPropertiesEditionPart_ToLabel);
to = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(FlowViewsRepository.Transition.Properties.to, FlowViewsRepository.SWT_KIND));
to.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
to.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TransitionPropertiesEditionPartImpl.this, FlowViewsRepository.Transition.Properties.to, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getTo()));
}
});
GridData toData = new GridData(GridData.FILL_HORIZONTAL);
to.setLayoutData(toData);
to.setID(FlowViewsRepository.Transition.Properties.to);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(FlowViewsRepository.Transition.Properties.to, FlowViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class InteractionUsePropertiesEditionPartForm method createInteractionFlatComboViewer.
/**
* @param parent the parent composite
* @param widgetFactory factory to use to instanciante widget of the form
*/
protected Composite createInteractionFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
createDescription(parent, InteractionViewsRepository.InteractionUse.Properties.interaction_, InteractionMessages.InteractionUsePropertiesEditionPart_InteractionLabel);
interaction = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(InteractionViewsRepository.InteractionUse.Properties.interaction_, InteractionViewsRepository.FORM_KIND));
widgetFactory.adapt(interaction);
interaction.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
GridData interactionData = new GridData(GridData.FILL_HORIZONTAL);
interaction.setLayoutData(interactionData);
interaction.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(InteractionUsePropertiesEditionPartForm.this, InteractionViewsRepository.InteractionUse.Properties.interaction_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getInteraction()));
}
});
interaction.setID(InteractionViewsRepository.InteractionUse.Properties.interaction_);
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(InteractionViewsRepository.InteractionUse.Properties.interaction_, InteractionViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
Aggregations