Search in sources :

Example 1 with FlatReferencesTable

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

the class DataBasePropertiesEditionPartImpl method createUsedLibrariesFlatReferencesTable.

/**
 * @param parent
 */
protected Composite createUsedLibrariesFlatReferencesTable(Composite parent) {
    createDescription(parent, DatabaseViewsRepository.DataBase_.Properties.usedLibraries, DatabaseMessages.DataBasePropertiesEditionPart_UsedLibrariesLabel);
    usedLibraries = new FlatReferencesTable(parent);
    usedLibraries.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    usedLibraries.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            if (event.getSelection() instanceof StructuredSelection)
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(DataBasePropertiesEditionPartImpl.this, DatabaseViewsRepository.DataBase_.Properties.usedLibraries, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((StructuredSelection) event.getSelection()).toList()));
        }
    });
    GridData usedLibrariesData = new GridData(GridData.FILL_HORIZONTAL);
    usedLibraries.setLayoutData(usedLibrariesData);
    usedLibraries.setID(DatabaseViewsRepository.DataBase_.Properties.usedLibraries);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.DataBase_.Properties.usedLibraries, DatabaseViewsRepository.SWT_KIND), null);
    // End of user code
    return parent;
}
Also used : FlatReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) 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 2 with FlatReferencesTable

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

the class DataBasePropertiesEditionPartForm method createUsedLibrariesFlatReferencesTable.

/**
 * @param parent
 */
protected Composite createUsedLibrariesFlatReferencesTable(FormToolkit widgetFactory, Composite parent) {
    createDescription(parent, DatabaseViewsRepository.DataBase_.Properties.usedLibraries, DatabaseMessages.DataBasePropertiesEditionPart_UsedLibrariesLabel);
    usedLibraries = new FlatReferencesTable(parent);
    usedLibraries.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    usedLibraries.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            if (event.getSelection() instanceof StructuredSelection)
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(DataBasePropertiesEditionPartForm.this, DatabaseViewsRepository.DataBase_.Properties.usedLibraries, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((StructuredSelection) event.getSelection()).toList()));
        }
    });
    GridData usedLibrariesData = new GridData(GridData.FILL_HORIZONTAL);
    usedLibraries.setLayoutData(usedLibrariesData);
    usedLibraries.setID(DatabaseViewsRepository.DataBase_.Properties.usedLibraries);
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.DataBase_.Properties.usedLibraries, DatabaseViewsRepository.FORM_KIND), null);
    // End of user code
    return parent;
}
Also used : FlatReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) 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 3 with FlatReferencesTable

use of org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable 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;
}
Also used : FlatReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) 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 4 with FlatReferencesTable

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

the class RepositoryPropertiesEditionPartForm method createReferencedObjectFlatReferencesTable.

/**
 * @param parent
 */
protected Composite createReferencedObjectFlatReferencesTable(FormToolkit widgetFactory, 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(RepositoryPropertiesEditionPartForm.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$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Repository.Repository_.referencedObject, RequirementViewsRepository.FORM_KIND), null);
    // End of user code
    return parent;
}
Also used : FlatReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) 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 5 with FlatReferencesTable

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

the class AdvancedPropertiesEditionPartImpl method createReferencedObjectFlatReferencesTable.

/**
 * @param parent
 */
protected Composite createReferencedObjectFlatReferencesTable(Composite parent) {
    createDescription(parent, RequirementViewsRepository.Advanced.referencedObject, RequirementMessages.AdvancedPropertiesEditionPart_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(AdvancedPropertiesEditionPartImpl.this, RequirementViewsRepository.Advanced.referencedObject, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((StructuredSelection) event.getSelection()).toList()));
        }
    });
    GridData referencedObjectData = new GridData(GridData.FILL_HORIZONTAL);
    referencedObject.setLayoutData(referencedObjectData);
    referencedObject.setID(RequirementViewsRepository.Advanced.referencedObject);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Advanced.referencedObject, RequirementViewsRepository.SWT_KIND), null);
    // End of user code
    return parent;
}
Also used : FlatReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) 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)6 IPropertiesEditionEvent (org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)6 PropertiesEditionEvent (org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)6 FlatReferencesTable (org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable)6 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)6 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)6 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)6 GridData (org.eclipse.swt.layout.GridData)6