Class EventHandlerXmlPartReader

  • All Implemented Interfaces:
    IXmlPartReader

    public class EventHandlerXmlPartReader
    extends AbstractXmlPartReader
    XML part reader for event handlers from EventHandlerContainer.

    Note that, for correct determine host of events it is necessary that the object and its extension information object were connected.

    • Constructor Detail

      • EventHandlerXmlPartReader

        public EventHandlerXmlPartReader()
    • Method Detail

      • read

        public void read​(org.eclipse.emf.ecore.EObject context,
                         org.eclipse.emf.ecore.EStructuralFeature feature,
                         IXmlNode eventNodes,
                         String attributeName,
                         Version version,
                         IXmlReadErrorCollector errorCollector)
        Description copied from interface: IXmlPartReader
        Read and convert node named attribute content to value in context-feature.
        Parameters:
        context - the context EObject, cannot be null
        feature - the EStructuralFeature, cannot be null
        eventNodes - the source IXmlNode, cannot be null
        attributeName - the name of attribute to set as value in model, or null to use text from node
        version - the version of importing 1C:Enterprise XML files, cannot be null
        errorCollector - the IXmlReadErrorCollector to add occurred errors
      • addEventHandler

        protected void addEventHandler​(String eventHandlerName,
                                       Event event,
                                       List<EventHandler> handlers,
                                       org.eclipse.emf.ecore.EObject context,
                                       org.eclipse.emf.ecore.EStructuralFeature feature,
                                       IXmlNode node,
                                       String attributeName,
                                       IXmlReadErrorCollector errorCollector)
        Creates and adds the event handler for the provided event with the provided name to the collection of already existing handlers.
        Parameters:
        eventHandlerName - the event handler name, cannot be null
        event - the event, cannot be null
        handlers - the collection of already existing handlers, cannot be null
        context - the context EObject, cannot be null
        feature - the EStructuralFeature, cannot be null
        node - the XML node with event handler content, cannot be null
        attributeName - the name of attribute to set as value in model, or null to use text from node
        errorCollector - the IXmlReadErrorCollector to collect occurred errors