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.AbstractHandler
Abstract handler listener for generate annotated comments
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.xtext.resource.EObjectAtOffsetHelperprotected BslProposalProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAnnotationComment(org.eclipse.xtext.ui.editor.model.IXtextDocument document, org.eclipse.emf.ecore.EObject annotatedObject, String commentContent, BslProposalProvider proposalProvider) Creates annotation comment content and computes the offset of position for inserting commentexecute(org.eclipse.core.commands.ExecutionEvent event) protected abstract StringGets annotation comment contentMethods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabledMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
Field Details
-
proposalProvider
-
offsetHelper
protected org.eclipse.xtext.resource.EObjectAtOffsetHelper offsetHelper
-
-
Constructor Details
-
AbstractBslAddAnnotationCommentHandler
public AbstractBslAddAnnotationCommentHandler()
-
-
Method Details
-
createAnnotationComment
public static org.eclipse.xtext.util.Pair<Integer,String> createAnnotationComment(org.eclipse.xtext.ui.editor.model.IXtextDocument document, org.eclipse.emf.ecore.EObject annotatedObject, String commentContent, BslProposalProvider proposalProvider) Creates annotation comment content and computes the offset of position for inserting comment- Parameters:
document- actualIXtextDocumentfor inserting comment, can't benullannotatedObject- Bsl langugage semantic object, can benullcommentContent- content of the comment for generating, can't benullproposalProvider- actualBslProposalProvider, 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
Gets annotation comment content- Returns:
- comment content, can't be
null
-