Class BslModuleEventsLookup

    • Constructor Detail

      • BslModuleEventsLookup

        public BslModuleEventsLookup()
    • Method Detail

      • findHandlerInForm

        public org.eclipse.xtext.util.Triple<org.eclipse.jface.text.ITextSelection,​Boolean,​Object> findHandlerInForm​(org.eclipse.xtext.ui.editor.model.IXtextDocument doc,
                                                                                                                                 String currentHandlerName)
        Description copied from interface: IBslModuleEventsLookup
        Finds method by name in form bsl module by handler name from property sheet.
        Specified by:
        findHandlerInForm in interface IBslModuleEventsLookup
        Parameters:
        doc - actual IXtextDocument, can't be null
        currentHandlerName - searching handler's name, can't be null
        Returns:
        triple, never null, which contains
        • actual selection of the found handler, or empty selection if handler wasn't found
        • true if actual script variant is Russian, false otherwise
        • resource lock of document, can be null
      • createHandlerInForm

        public EventHandlerInformation createHandlerInForm​(org.eclipse.xtext.ui.editor.model.IXtextDocument doc,
                                                           org.eclipse.jface.text.ITextViewer viewer,
                                                           String currentHandlerName,
                                                           Event event,
                                                           boolean isMainItem,
                                                           boolean isCommandHandler,
                                                           String procedureDerictive)
        Description copied from interface: IBslModuleEventsLookup
        Creates handler for event from Form (called from property sheet).
        Specified by:
        createHandlerInForm in interface IBslModuleEventsLookup
        Parameters:
        doc - actual IXtextDocument, can't be null
        viewer - actual ITextViewer, can't be null
        currentHandlerName - searching handler's name, can't be null
        event - handle events, can't be null
        isMainItem - true if event from main item of form, false otherwise
        isCommandHandler - true if event from command of form, false otherwise
        procedureDerictive - directive for chosen event, or empty string if there is no procedure for chosen event
        Returns:
        EventHandlerInformation, can't be null
      • getPositionOfInsertionEvent

        public int getPositionOfInsertionEvent​(Module module,
                                               int offset,
                                               org.eclipse.jface.text.ITextViewer viewer)
        Description copied from interface: IBslModuleEventsLookup
        Defines offset of the inserting Event.
        Specified by:
        getPositionOfInsertionEvent in interface IBslModuleEventsLookup
        Parameters:
        module - current Bsl module
        offset - current cursor offset
        viewer - current ITextViewer
        Returns:
        offset of the inserting Event
      • getValidName

        public String getValidName​(org.eclipse.xtext.ui.editor.model.IXtextDocument doc,
                                   String methodNamePrefix)
        Description copied from interface: IBslModuleEventsLookup
        Returns unique method name for Bsl module.
        Specified by:
        getValidName in interface IBslModuleEventsLookup
        Parameters:
        doc - actual IXtextDocument, can't be null
        methodNamePrefix - prefix of method name, can't be null
        Returns:
        unique method name for Bsl module, never null
      • createInsertContentProposals

        public String createInsertContentProposals​(Event event,
                                                   ParamSet set,
                                                   String eventName,
                                                   boolean isMainItem,
                                                   boolean isCommandHandler,
                                                   Module actualBslModule,
                                                   String procedureDerictive,
                                                   int offset,
                                                   org.eclipse.jface.text.IDocument document,
                                                   boolean isRussian)
        Description copied from interface: IBslModuleEventsLookup
        Creates insert content assist proposals.
        Specified by:
        createInsertContentProposals in interface IBslModuleEventsLookup
        Parameters:
        event - handle events, can't be null
        set - param set, can't be null
        eventName - event name, can't be null
        isMainItem - true if event from main item of form, false otherwise
        isCommandHandler - true if event from command of form, false otherwise
        actualBslModule - actual BSL module, cannot be null
        procedureDerictive - procedure derictive, can't be null
        offset - current cursor offset
        document - actual IDocument, can't be null
        isRussian - whether current script variant is russian
        Returns:
        insert content assist proposals, never null
      • createInsertContentProposals

        public String createInsertContentProposals​(Event event,
                                                   ParamSet set,
                                                   String eventName,
                                                   boolean isMainItem,
                                                   boolean isCommandHandler,
                                                   Module actualBslModule,
                                                   String procedureDerictive,
                                                   String procedureAnnotation,
                                                   String extensionPrefix,
                                                   int offset,
                                                   org.eclipse.jface.text.IDocument document,
                                                   boolean isRussian)
        Description copied from interface: IBslModuleExtensionEventsLookup
        Creates insert content assist proposals of event handler for extension module
        Specified by:
        createInsertContentProposals in interface IBslModuleExtensionEventsLookup
        Parameters:
        event - handle events, can't be null
        set - param set, can't be null
        eventName - event name, can't be null
        isMainItem - true if event from main item of form, false otherwise
        isCommandHandler - true if event from command of form, false otherwise
        actualBslModule - actual BSL module, cannot be null
        procedureDerictive - procedure directive, can't be null
        procedureAnnotation - annotation directive, can't be null
        extensionPrefix - prefix of extension project, can't be null
        offset - current cursor offset
        document - actual IDocument, can't be null
        isRussian - whether current script variant is russian
        Returns:
        insert content assist proposals, never null