Package com._1c.g5.v8.dt.bsl.ui.event
Interface IBslModuleEventsLookup
-
- All Known Subinterfaces:
IBslModuleExtensionEventsLookup
- All Known Implementing Classes:
BslModuleEventsLookup
public interface IBslModuleEventsLookup
Performs BSL module event handlers lookup and creation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EventHandlerInformation
createHandlerInForm(org.eclipse.xtext.ui.editor.model.IXtextDocument document, org.eclipse.jface.text.ITextViewer viewer, String currentHandlerName, Event event, boolean isMainItem, boolean isCommandHandler, String procedureDerictive)
Creates handler for event from Form (called from property sheet).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)
Creates insert content assist proposals.org.eclipse.xtext.util.Triple<org.eclipse.jface.text.ITextSelection,Boolean,Object>
findHandlerInForm(org.eclipse.xtext.ui.editor.model.IXtextDocument document, String currentHandlerName)
Finds method by name in form bsl module by handler name from property sheet.int
getPositionOfInsertionEvent(Module module, int offset, org.eclipse.jface.text.ITextViewer viewer)
Defines offset of the insertingEvent
.String
getValidName(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, String methodNamePrefix)
Returns unique method name for Bsl module.
-
-
-
Method Detail
-
findHandlerInForm
org.eclipse.xtext.util.Triple<org.eclipse.jface.text.ITextSelection,Boolean,Object> findHandlerInForm(org.eclipse.xtext.ui.editor.model.IXtextDocument document, String currentHandlerName)
Finds method by name in form bsl module by handler name from property sheet.- Parameters:
document
- actualIXtextDocument
, can't benull
currentHandlerName
- searching handler's name, can't benull
- 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
-
getPositionOfInsertionEvent
int getPositionOfInsertionEvent(Module module, int offset, org.eclipse.jface.text.ITextViewer viewer)
Defines offset of the insertingEvent
.- Parameters:
module
- current Bsl moduleoffset
- current cursor offsetviewer
- currentITextViewer
- Returns:
- offset of the inserting
Event
-
getValidName
String getValidName(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, String methodNamePrefix)
Returns unique method name for Bsl module.- Parameters:
doc
- actualIXtextDocument
, can't benull
methodNamePrefix
- prefix of method name, can't benull
- Returns:
- unique method name for Bsl module, never
null
-
createHandlerInForm
EventHandlerInformation createHandlerInForm(org.eclipse.xtext.ui.editor.model.IXtextDocument document, org.eclipse.jface.text.ITextViewer viewer, String currentHandlerName, Event event, boolean isMainItem, boolean isCommandHandler, String procedureDerictive)
Creates handler for event from Form (called from property sheet).- Parameters:
document
- actualIXtextDocument
, can't benull
viewer
- actualITextViewer
, can't benull
currentHandlerName
- searching handler's name, can't benull
event
- handle events, can't benull
isMainItem
-true
if event from main item of form,false
otherwiseisCommandHandler
-true
if event from command of form,false
otherwiseprocedureDerictive
- directive for chosen event, or empty string if there is no procedure for chosen event- Returns:
EventHandlerInformation
, can't benull
-
createInsertContentProposals
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)
Creates insert content assist proposals.- Parameters:
event
- handle events, can't benull
set
- param set, can't benull
eventName
- event name, can't benull
isMainItem
-true
if event from main item of form,false
otherwiseisCommandHandler
-true
if event from command of form,false
otherwiseactualBslModule
- actual BSL module, cannot benull
procedureDerictive
- procedure derictive, can't benull
offset
- current cursor offsetdocument
- actualIDocument
, can't benull
isRussian
- whether current script variant is russian- Returns:
- insert content assist proposals, never
null
-
-