Class BslModuleEventsLookup

java.lang.Object
com._1c.g5.v8.dt.bsl.ui.event.BslModuleEventsLookup
All Implemented Interfaces:
IBslModuleEventsLookup

public class BslModuleEventsLookup extends Object implements IBslModuleEventsLookup
Implementation of IBslModuleEventsLookup.
  • Constructor Details

    • BslModuleEventsLookup

      public BslModuleEventsLookup()
  • Method Details

    • findHandlerInForm

      public org.eclipse.xtext.util.Pair<org.eclipse.jface.text.ITextSelection,Object> findHandlerInForm(org.eclipse.xtext.ui.editor.model.IXtextDocument document, 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:
      document - actual IXtextDocument, can't be null
      currentHandlerName - searching handler's name, can't be null
      Returns:
      pair, never null, which contains
      • actual selection of the found handler, or empty selection if handler wasn't found
      • resource lock of document, can be null
    • createHandlerInForm

      public EventHandlerInformation createHandlerInForm(org.eclipse.xtext.ui.editor.model.IXtextDocument document, org.eclipse.jface.text.ITextViewer viewer, String currentHandlerName, org.eclipse.emf.ecore.EObject eventOwner, Event event, EventItemType itemType, ProcedureParameters procedureParameters)
      Description copied from interface: IBslModuleEventsLookup
      Creates handlers for event from Form (called from property sheet).
      Specified by:
      createHandlerInForm in interface IBslModuleEventsLookup
      Parameters:
      document - actual IXtextDocument, can't be null
      viewer - actual ITextViewer, can't be null
      currentHandlerName - searching handler's name, can't be null
      eventOwner - handle event owner, can't be null
      event - handle events, can't be null
      itemType - current EventItemType, cannot be null
      procedureParameters - ProcedureParameters for chosen event, can't be null
      Returns:
      EventHandlerInformation, can't be null
    • getPositionOfInsertionEvent

      public int getPositionOfInsertionEvent(org.eclipse.xtext.ui.editor.model.IXtextDocument document, int offset)
      Description copied from interface: IBslModuleEventsLookup
      Defines offset of the inserting Event
      Specified by:
      getPositionOfInsertionEvent in interface IBslModuleEventsLookup
      Parameters:
      document - actual IXtextDocument, can't be null
      offset - current cursor offset
      Returns:
      offset of the inserting Event
    • getValidName

      public String getValidName(org.eclipse.xtext.ui.editor.model.IXtextDocument document, String methodNamePrefix)
      Description copied from interface: IBslModuleEventsLookup
      Returns unique method name for Bsl module.
      Specified by:
      getValidName in interface IBslModuleEventsLookup
      Parameters:
      document - 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(org.eclipse.xtext.ui.editor.model.IXtextDocument document, Event event, ParamSet set, ProcedureParameters procedureParameters, String eventName, boolean isMainItem, boolean isCommandHandler, int offset, boolean isRussian)
      Description copied from interface: IBslModuleEventsLookup
      Creates insert content assist proposals.
      Specified by:
      createInsertContentProposals in interface IBslModuleEventsLookup
      Parameters:
      document - actual IXtextDocument, can't be null
      event - handle events, can't be null
      set - param set, can't be null
      procedureParameters - ProcedureParameters 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
      offset - current cursor offset
      isRussian - whether current script variant is russian
      Returns:
      insert content assist proposals, never null