Search in sources :

Example 1 with EMFModelViewerDialog

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

the class PrimaryKeyPropertiesEditionPartImpl method addColumns.

/**
 */
protected void addColumns() {
    EMFModelViewerDialog dialog = new EMFModelViewerDialog(new AdapterFactoryLabelProvider(adapterFactory), columns.getInput(), columnsFilters, columnsBusinessFilters, false, true) {

        public void process(IStructuredSelection selection) {
            for (Iterator iter = selection.iterator(); iter.hasNext(); ) {
                EObject elem = (EObject) iter.next();
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(PrimaryKeyPropertiesEditionPartImpl.this, DatabaseViewsRepository.PrimaryKey.Properties.columns, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
            }
        }
    };
    dialog.open();
    // Start of user code for addColumns
    // End of user code
    columns.refresh();
}
Also used : EMFModelViewerDialog(org.eclipse.emf.eef.runtime.ui.widgets.EMFModelViewerDialog) EObject(org.eclipse.emf.ecore.EObject) Iterator(java.util.Iterator) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Example 2 with EMFModelViewerDialog

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

the class PrimaryKeyPropertiesEditionPartForm method addColumns.

/**
 */
protected void addColumns() {
    EMFModelViewerDialog dialog = new EMFModelViewerDialog(new AdapterFactoryLabelProvider(adapterFactory), columns.getInput(), columnsFilters, columnsBusinessFilters, false, true) {

        public void process(IStructuredSelection selection) {
            for (Iterator iter = selection.iterator(); iter.hasNext(); ) {
                EObject elem = (EObject) iter.next();
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(PrimaryKeyPropertiesEditionPartForm.this, DatabaseViewsRepository.PrimaryKey.Properties.columns, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
            }
        }
    };
    // Start of user code for addColumns
    // End of user code
    dialog.open();
    columns.refresh();
}
Also used : EMFModelViewerDialog(org.eclipse.emf.eef.runtime.ui.widgets.EMFModelViewerDialog) EObject(org.eclipse.emf.ecore.EObject) Iterator(java.util.Iterator) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Aggregations

Iterator (java.util.Iterator)2 EObject (org.eclipse.emf.ecore.EObject)2 AdapterFactoryLabelProvider (org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider)2 IPropertiesEditionEvent (org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)2 PropertiesEditionEvent (org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)2 EMFModelViewerDialog (org.eclipse.emf.eef.runtime.ui.widgets.EMFModelViewerDialog)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2