Package com._1c.g5.v8.dt.bsl.ui.menu
Class AbstractBslAddAnnotationCommentHandler
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.core.commands.AbstractHandler
-
- com._1c.g5.v8.dt.bsl.ui.menu.AbstractBslAddAnnotationCommentHandler
-
- All Implemented Interfaces:
org.eclipse.core.commands.IHandler,org.eclipse.core.commands.IHandler2
- Direct Known Subclasses:
BslAddQlAnnotationCommentHandler,BslAddWarningAnnotationCommentHandler
public abstract class AbstractBslAddAnnotationCommentHandler extends org.eclipse.core.commands.AbstractHandlerAbstract handler listener for generate annotated comments
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.xtext.resource.EObjectAtOffsetHelperoffsetHelperprotected BslProposalProviderproposalProvider
-
Constructor Summary
Constructors Constructor Description AbstractBslAddAnnotationCommentHandler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static org.eclipse.xtext.util.Pair<Integer,String>createAnnotationComment(Module module, org.eclipse.emf.ecore.EObject annotatedObject, String commentContent, BslProposalProvider proposalProvider, org.eclipse.jface.text.IDocument document)Creates annotation comment content and computes the offset of position for inserting commentObjectexecute(org.eclipse.core.commands.ExecutionEvent event)protected abstract StringgetCommentContent()Gets annotation comment content-
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
-
-
-
-
Field Detail
-
proposalProvider
protected BslProposalProvider proposalProvider
-
offsetHelper
protected org.eclipse.xtext.resource.EObjectAtOffsetHelper offsetHelper
-
-
Method Detail
-
createAnnotationComment
public static org.eclipse.xtext.util.Pair<Integer,String> createAnnotationComment(Module module, org.eclipse.emf.ecore.EObject annotatedObject, String commentContent, BslProposalProvider proposalProvider, org.eclipse.jface.text.IDocument document)
Creates annotation comment content and computes the offset of position for inserting comment- Parameters:
module- module, can't benullannotatedObject- Bsl langugage semantic object, can benullcommentContent- content of the comment for generating, can't benullproposalProvider- actualBslProposalProvider, can't benulldocument- actualIDocumentfor inserting comment, can't benull- Returns:
- pair of comment content and offset of position for inserting comment or
nullifannotatedObjectisnull
-
execute
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException
- Throws:
org.eclipse.core.commands.ExecutionException
-
getCommentContent
protected abstract String getCommentContent()
Gets annotation comment content- Returns:
- comment content, can't be
null
-
-