Search in sources :

Example 11 with AdapterFactoryEditingDomain

use of org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain in project iobserve-analysis by research-iobserve.

the class cloudprofileEditor method initializeEditingDomain.

/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
    // Create an adapter factory that yields item providers.
    // 
    adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
    adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new cloudprofileItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
    // Create the command stack that will notify this editor as commands are executed.
    // 
    BasicCommandStack commandStack = new BasicCommandStack();
    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    // 
    commandStack.addCommandStackListener(new CommandStackListener() {

        public void commandStackChanged(final EventObject event) {
            getContainer().getDisplay().asyncExec(new Runnable() {

                public void run() {
                    firePropertyChange(IEditorPart.PROP_DIRTY);
                    // Try to select the affected objects.
                    // 
                    Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand();
                    if (mostRecentCommand != null) {
                        setSelectionToViewer(mostRecentCommand.getAffectedObjects());
                    }
                    for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
                        PropertySheetPage propertySheetPage = i.next();
                        if (propertySheetPage.getControl().isDisposed()) {
                            i.remove();
                        } else {
                            propertySheetPage.refresh();
                        }
                    }
                }
            });
        }
    });
    // Create the editing domain with a special command stack.
    // 
    editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
Also used : AdapterFactoryEditingDomain(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) CommandStack(org.eclipse.emf.common.command.CommandStack) PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage) ExtendedPropertySheetPage(org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage) CommandStackListener(org.eclipse.emf.common.command.CommandStackListener) ResourceItemProviderAdapterFactory(org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) ComposedAdapterFactory(org.eclipse.emf.edit.provider.ComposedAdapterFactory) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) org.iobserve.planning.cloudprofile.provider.cloudprofileItemProviderAdapterFactory(org.iobserve.planning.cloudprofile.provider.cloudprofileItemProviderAdapterFactory) EventObject(java.util.EventObject) ReflectiveItemProviderAdapterFactory(org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory) Command(org.eclipse.emf.common.command.Command)

Example 12 with AdapterFactoryEditingDomain

use of org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain in project iobserve-analysis by research-iobserve.

the class systemadaptationEditor method initializeEditingDomain.

/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
    // Create an adapter factory that yields item providers.
    // 
    adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
    adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new systemadaptationItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new IdentifierItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new PcmItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new CoreItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new EntityItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new CompositionItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new UsagemodelItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new RepositoryItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ResourcetypeItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ProtocolItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ParameterItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReliabilityItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new SeffItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new SeffPerformanceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new SeffReliabilityItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new QosannotationsItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new QosPerformanceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new QosReliabilityItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new SystemItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ResourceenvironmentItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new AllocationItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new SubsystemItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ProbfunctionItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new StoexItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new UnitsItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
    // Create the command stack that will notify this editor as commands are executed.
    // 
    BasicCommandStack commandStack = new BasicCommandStack();
    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    // 
    commandStack.addCommandStackListener(new CommandStackListener() {

        public void commandStackChanged(final EventObject event) {
            getContainer().getDisplay().asyncExec(new Runnable() {

                public void run() {
                    firePropertyChange(IEditorPart.PROP_DIRTY);
                    // Try to select the affected objects.
                    // 
                    Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand();
                    if (mostRecentCommand != null) {
                        setSelectionToViewer(mostRecentCommand.getAffectedObjects());
                    }
                    for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
                        PropertySheetPage propertySheetPage = i.next();
                        if (propertySheetPage.getControl().isDisposed()) {
                            i.remove();
                        } else {
                            propertySheetPage.refresh();
                        }
                    }
                }
            });
        }
    });
    // Create the editing domain with a special command stack.
    // 
    editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
Also used : ResourcetypeItemProviderAdapterFactory(org.palladiosimulator.pcm.resourcetype.provider.ResourcetypeItemProviderAdapterFactory) AdapterFactoryEditingDomain(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain) org.iobserve.planning.systemadaptation.provider.systemadaptationItemProviderAdapterFactory(org.iobserve.planning.systemadaptation.provider.systemadaptationItemProviderAdapterFactory) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) CoreItemProviderAdapterFactory(org.palladiosimulator.pcm.core.provider.CoreItemProviderAdapterFactory) SeffReliabilityItemProviderAdapterFactory(org.palladiosimulator.pcm.seff.seff_reliability.provider.SeffReliabilityItemProviderAdapterFactory) SeffReliabilityItemProviderAdapterFactory(org.palladiosimulator.pcm.seff.seff_reliability.provider.SeffReliabilityItemProviderAdapterFactory) QosReliabilityItemProviderAdapterFactory(org.palladiosimulator.pcm.qosannotations.qos_reliability.provider.QosReliabilityItemProviderAdapterFactory) ReliabilityItemProviderAdapterFactory(org.palladiosimulator.pcm.reliability.provider.ReliabilityItemProviderAdapterFactory) CompositionItemProviderAdapterFactory(org.palladiosimulator.pcm.core.composition.provider.CompositionItemProviderAdapterFactory) QosReliabilityItemProviderAdapterFactory(org.palladiosimulator.pcm.qosannotations.qos_reliability.provider.QosReliabilityItemProviderAdapterFactory) SeffItemProviderAdapterFactory(org.palladiosimulator.pcm.seff.provider.SeffItemProviderAdapterFactory) PcmItemProviderAdapterFactory(org.palladiosimulator.pcm.provider.PcmItemProviderAdapterFactory) RepositoryItemProviderAdapterFactory(org.palladiosimulator.pcm.repository.provider.RepositoryItemProviderAdapterFactory) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) CommandStack(org.eclipse.emf.common.command.CommandStack) PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage) ExtendedPropertySheetPage(org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage) CommandStackListener(org.eclipse.emf.common.command.CommandStackListener) ResourceItemProviderAdapterFactory(org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory) ProtocolItemProviderAdapterFactory(org.palladiosimulator.pcm.protocol.provider.ProtocolItemProviderAdapterFactory) QosPerformanceItemProviderAdapterFactory(org.palladiosimulator.pcm.qosannotations.qos_performance.provider.QosPerformanceItemProviderAdapterFactory) AllocationItemProviderAdapterFactory(org.palladiosimulator.pcm.allocation.provider.AllocationItemProviderAdapterFactory) SubsystemItemProviderAdapterFactory(org.palladiosimulator.pcm.subsystem.provider.SubsystemItemProviderAdapterFactory) StoexItemProviderAdapterFactory(de.uka.ipd.sdq.stoex.provider.StoexItemProviderAdapterFactory) EntityItemProviderAdapterFactory(org.palladiosimulator.pcm.core.entity.provider.EntityItemProviderAdapterFactory) ComposedAdapterFactory(org.eclipse.emf.edit.provider.ComposedAdapterFactory) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) UsagemodelItemProviderAdapterFactory(org.palladiosimulator.pcm.usagemodel.provider.UsagemodelItemProviderAdapterFactory) ResourceenvironmentItemProviderAdapterFactory(org.palladiosimulator.pcm.resourceenvironment.provider.ResourceenvironmentItemProviderAdapterFactory) EventObject(java.util.EventObject) SystemItemProviderAdapterFactory(org.palladiosimulator.pcm.system.provider.SystemItemProviderAdapterFactory) IdentifierItemProviderAdapterFactory(de.uka.ipd.sdq.identifier.provider.IdentifierItemProviderAdapterFactory) ReflectiveItemProviderAdapterFactory(org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory) ProbfunctionItemProviderAdapterFactory(de.uka.ipd.sdq.probfunction.provider.ProbfunctionItemProviderAdapterFactory) Command(org.eclipse.emf.common.command.Command) UnitsItemProviderAdapterFactory(de.uka.ipd.sdq.units.provider.UnitsItemProviderAdapterFactory) QosannotationsItemProviderAdapterFactory(org.palladiosimulator.pcm.qosannotations.provider.QosannotationsItemProviderAdapterFactory) SeffPerformanceItemProviderAdapterFactory(org.palladiosimulator.pcm.seff.seff_performance.provider.SeffPerformanceItemProviderAdapterFactory) ParameterItemProviderAdapterFactory(org.palladiosimulator.pcm.parameter.provider.ParameterItemProviderAdapterFactory)

Example 13 with AdapterFactoryEditingDomain

use of org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain in project InformationSystem by ObeoNetwork.

the class ApplicationEditor method initializeEditingDomain.

/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
    // Create an adapter factory that yields item providers.
    // 
    adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
    adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ApplicationItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new CinematicItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ViewItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new FlowItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ToolkitsItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new EcorebindingItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new EnvironmentItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new TechnicalIDItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
    // Create the command stack that will notify this editor as commands are executed.
    // 
    BasicCommandStack commandStack = new BasicCommandStack();
    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    // 
    commandStack.addCommandStackListener(new CommandStackListener() {

        public void commandStackChanged(final EventObject event) {
            getContainer().getDisplay().asyncExec(new Runnable() {

                public void run() {
                    firePropertyChange(IEditorPart.PROP_DIRTY);
                    // Try to select the affected objects.
                    // 
                    Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand();
                    if (mostRecentCommand != null) {
                        setSelectionToViewer(mostRecentCommand.getAffectedObjects());
                    }
                    for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
                        PropertySheetPage propertySheetPage = i.next();
                        if (propertySheetPage.getControl().isDisposed()) {
                            i.remove();
                        } else {
                            propertySheetPage.refresh();
                        }
                    }
                }
            });
        }
    });
    // Create the editing domain with a special command stack.
    // 
    editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
Also used : TechnicalIDItemProviderAdapterFactory(org.obeonetwork.dsl.technicalid.provider.TechnicalIDItemProviderAdapterFactory) AdapterFactoryEditingDomain(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) CommandStack(org.eclipse.emf.common.command.CommandStack) FlowItemProviderAdapterFactory(org.obeonetwork.dsl.cinematic.flow.provider.FlowItemProviderAdapterFactory) EcorebindingItemProviderAdapterFactory(org.obeonetwork.dsl.ecorebinding.provider.EcorebindingItemProviderAdapterFactory) PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage) ExtendedPropertySheetPage(org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage) ViewItemProviderAdapterFactory(org.obeonetwork.dsl.cinematic.view.provider.ViewItemProviderAdapterFactory) CommandStackListener(org.eclipse.emf.common.command.CommandStackListener) ResourceItemProviderAdapterFactory(org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) ToolkitsItemProviderAdapterFactory(org.obeonetwork.dsl.cinematic.toolkits.provider.ToolkitsItemProviderAdapterFactory) ComposedAdapterFactory(org.eclipse.emf.edit.provider.ComposedAdapterFactory) ApplicationItemProviderAdapterFactory(org.obeonetwork.dsl.application.provider.ApplicationItemProviderAdapterFactory) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) EventObject(java.util.EventObject) EcoreItemProviderAdapterFactory(org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory) ReflectiveItemProviderAdapterFactory(org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory) Command(org.eclipse.emf.common.command.Command) EnvironmentItemProviderAdapterFactory(org.obeonetwork.dsl.environment.provider.EnvironmentItemProviderAdapterFactory) CinematicItemProviderAdapterFactory(org.obeonetwork.dsl.cinematic.provider.CinematicItemProviderAdapterFactory)

Example 14 with AdapterFactoryEditingDomain

use of org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain in project InformationSystem by ObeoNetwork.

the class ClassDiagramConfigurationEditor method initializeEditingDomain.

/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
    // Create an adapter factory that yields item providers.
    // 
    adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
    adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ClassDiagramConfigurationItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ViewpointItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new DescriptionItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new StyleItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ToolItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ValidationItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new AuditItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
    // Create the command stack that will notify this editor as commands are executed.
    // 
    BasicCommandStack commandStack = new BasicCommandStack();
    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    // 
    commandStack.addCommandStackListener(new CommandStackListener() {

        public void commandStackChanged(final EventObject event) {
            getContainer().getDisplay().asyncExec(new Runnable() {

                public void run() {
                    firePropertyChange(IEditorPart.PROP_DIRTY);
                    // Try to select the affected objects.
                    // 
                    Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand();
                    if (mostRecentCommand != null) {
                        setSelectionToViewer(mostRecentCommand.getAffectedObjects());
                    }
                    for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
                        PropertySheetPage propertySheetPage = i.next();
                        if (propertySheetPage.getControl().isDisposed()) {
                            i.remove();
                        } else {
                            propertySheetPage.refresh();
                        }
                    }
                }
            });
        }
    });
    // Create the editing domain with a special command stack.
    // 
    editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
Also used : AdapterFactoryEditingDomain(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) CommandStack(org.eclipse.emf.common.command.CommandStack) ToolItemProviderAdapterFactory(org.eclipse.sirius.viewpoint.description.tool.provider.ToolItemProviderAdapterFactory) ValidationItemProviderAdapterFactory(org.eclipse.sirius.viewpoint.description.validation.provider.ValidationItemProviderAdapterFactory) PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage) ExtendedPropertySheetPage(org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage) CommandStackListener(org.eclipse.emf.common.command.CommandStackListener) ResourceItemProviderAdapterFactory(org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) StyleItemProviderAdapterFactory(org.eclipse.sirius.viewpoint.description.style.provider.StyleItemProviderAdapterFactory) ComposedAdapterFactory(org.eclipse.emf.edit.provider.ComposedAdapterFactory) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) EventObject(java.util.EventObject) EcoreItemProviderAdapterFactory(org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory) ReflectiveItemProviderAdapterFactory(org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory) Command(org.eclipse.emf.common.command.Command) DescriptionItemProviderAdapterFactory(org.eclipse.sirius.viewpoint.description.provider.DescriptionItemProviderAdapterFactory) ViewpointItemProviderAdapterFactory(org.eclipse.sirius.viewpoint.provider.ViewpointItemProviderAdapterFactory) ClassDiagramConfigurationItemProviderAdapterFactory(org.obeonetwork.tools.classdiagramconfiguration.provider.ClassDiagramConfigurationItemProviderAdapterFactory) AuditItemProviderAdapterFactory(org.eclipse.sirius.viewpoint.description.audit.provider.AuditItemProviderAdapterFactory)

Example 15 with AdapterFactoryEditingDomain

use of org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain in project InformationSystem by ObeoNetwork.

the class DatabaseEditor method initializeEditingDomain.

/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
protected void initializeEditingDomain() {
    // Create an adapter factory that yields item providers.
    // 
    adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
    adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new DatabaseItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new TypesLibraryItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
    // Create the command stack that will notify this editor as commands are executed.
    // 
    BasicCommandStack commandStack = new BasicCommandStack();
    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    // 
    commandStack.addCommandStackListener(new CommandStackListener() {

        public void commandStackChanged(final EventObject event) {
            getContainer().getDisplay().asyncExec(new Runnable() {

                public void run() {
                    firePropertyChange(IEditorPart.PROP_DIRTY);
                    // Try to select the affected objects.
                    // 
                    Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand();
                    if (mostRecentCommand != null) {
                        setSelectionToViewer(mostRecentCommand.getAffectedObjects());
                    }
                    if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed() && propertySheetPage.getCurrentTab() != null) {
                        propertySheetPage.refresh();
                    }
                }
            });
        }
    });
    // Create the editing domain with a special command stack.
    // 
    editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
Also used : AdapterFactoryEditingDomain(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) CommandStack(org.eclipse.emf.common.command.CommandStack) CommandStackListener(org.eclipse.emf.common.command.CommandStackListener) ResourceItemProviderAdapterFactory(org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) ComposedAdapterFactory(org.eclipse.emf.edit.provider.ComposedAdapterFactory) DatabaseItemProviderAdapterFactory(org.obeonetwork.dsl.database.provider.DatabaseItemProviderAdapterFactory) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) EventObject(java.util.EventObject) ReflectiveItemProviderAdapterFactory(org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory) Command(org.eclipse.emf.common.command.Command) TypesLibraryItemProviderAdapterFactory(org.obeonetwork.dsl.typeslibrary.provider.TypesLibraryItemProviderAdapterFactory)

Aggregations

HashMap (java.util.HashMap)31 BasicCommandStack (org.eclipse.emf.common.command.BasicCommandStack)31 AdapterFactoryEditingDomain (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain)31 EventObject (java.util.EventObject)30 LinkedHashMap (java.util.LinkedHashMap)30 Command (org.eclipse.emf.common.command.Command)30 CommandStack (org.eclipse.emf.common.command.CommandStack)30 CommandStackListener (org.eclipse.emf.common.command.CommandStackListener)30 ComposedAdapterFactory (org.eclipse.emf.edit.provider.ComposedAdapterFactory)30 ResourceItemProviderAdapterFactory (org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory)30 ReflectiveItemProviderAdapterFactory (org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory)29 ExtendedPropertySheetPage (org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage)15 IPropertySheetPage (org.eclipse.ui.views.properties.IPropertySheetPage)15 PropertySheetPage (org.eclipse.ui.views.properties.PropertySheetPage)15 EnvironmentItemProviderAdapterFactory (org.obeonetwork.dsl.environment.provider.EnvironmentItemProviderAdapterFactory)13 EcoreItemProviderAdapterFactory (org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory)8 TechnicalIDItemProviderAdapterFactory (org.obeonetwork.dsl.technicalid.provider.TechnicalIDItemProviderAdapterFactory)8 FlowItemProviderAdapterFactory (org.obeonetwork.dsl.cinematic.flow.provider.FlowItemProviderAdapterFactory)5 CinematicItemProviderAdapterFactory (org.obeonetwork.dsl.cinematic.provider.CinematicItemProviderAdapterFactory)5 ToolkitsItemProviderAdapterFactory (org.obeonetwork.dsl.cinematic.toolkits.provider.ToolkitsItemProviderAdapterFactory)5