use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class ParameterPropertiesEditionPartForm method createMultiplicityEMFComboViewer.
protected Composite createMultiplicityEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
createDescription(parent, SoaViewsRepository.Parameter.Properties.multiplicity, SoaMessages.ParameterPropertiesEditionPart_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(ParameterPropertiesEditionPartForm.this, SoaViewsRepository.Parameter.Properties.multiplicity, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getMultiplicity()));
}
});
multiplicity.setID(SoaViewsRepository.Parameter.Properties.multiplicity);
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(SoaViewsRepository.Parameter.Properties.multiplicity, SoaViewsRepository.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 RepositoryPropertiesEditionPartImpl method createReferencedObjectFlatReferencesTable.
/**
* @param parent
*/
protected Composite createReferencedObjectFlatReferencesTable(Composite parent) {
createDescription(parent, RequirementViewsRepository.Repository.Repository_.referencedObject, RequirementMessages.RepositoryPropertiesEditionPart_ReferencedObjectLabel);
referencedObject = new FlatReferencesTable(parent);
referencedObject.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
referencedObject.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
if (event.getSelection() instanceof StructuredSelection)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.referencedObject, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((StructuredSelection) event.getSelection()).toList()));
}
});
GridData referencedObjectData = new GridData(GridData.FILL_HORIZONTAL);
referencedObject.setLayoutData(referencedObjectData);
referencedObject.setID(RequirementViewsRepository.Repository.Repository_.referencedObject);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Repository.Repository_.referencedObject, RequirementViewsRepository.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 RequirementPropertiesEditionPartImpl method createTypeEMFComboViewer.
protected Composite createTypeEMFComboViewer(Composite parent) {
createDescription(parent, RequirementViewsRepository.Requirement_.type, RequirementMessages.RequirementPropertiesEditionPart_TypeLabel);
type = new EMFComboViewer(parent);
type.setContentProvider(new ArrayContentProvider());
type.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
GridData typeData = new GridData(GridData.FILL_HORIZONTAL);
type.getCombo().setLayoutData(typeData);
type.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(RequirementPropertiesEditionPartImpl.this, RequirementViewsRepository.Requirement_.type, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getType()));
}
});
type.setID(RequirementViewsRepository.Requirement_.type);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Requirement_.type, RequirementViewsRepository.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 ServicePropertiesEditionPartImpl method createKindEMFComboViewer.
protected Composite createKindEMFComboViewer(Composite parent) {
createDescription(parent, SoaViewsRepository.Service.Properties.kind, SoaMessages.ServicePropertiesEditionPart_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(ServicePropertiesEditionPartImpl.this, SoaViewsRepository.Service.Properties.kind, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getKind()));
}
});
kind.setID(SoaViewsRepository.Service.Properties.kind);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(SoaViewsRepository.Service.Properties.kind, SoaViewsRepository.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 RiskPropertiesEditionPartImpl method createRiskEMFComboViewer.
protected Composite createRiskEMFComboViewer(Composite parent) {
createDescription(parent, GraalextensionsViewsRepository.Risk.Properties.risk_, GraalextensionsMessages.RiskPropertiesEditionPart_RiskLabel);
risk = new EMFComboViewer(parent);
risk.setContentProvider(new ArrayContentProvider());
risk.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
GridData riskData = new GridData(GridData.FILL_HORIZONTAL);
risk.getCombo().setLayoutData(riskData);
risk.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(RiskPropertiesEditionPartImpl.this, GraalextensionsViewsRepository.Risk.Properties.risk_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getRisk()));
}
});
risk.setID(GraalextensionsViewsRepository.Risk.Properties.risk_);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(GraalextensionsViewsRepository.Risk.Properties.risk_, GraalextensionsViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
Aggregations