Package com._1c.g5.v8.dt.bsl.ui.menu
Class AbstractBslSpecCopyPasteHandler
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
com._1c.g5.v8.dt.bsl.ui.menu.AbstractBslSpecCopyPasteHandler
- All Implemented Interfaces:
org.eclipse.core.commands.IHandler,org.eclipse.core.commands.IHandler2
- Direct Known Subclasses:
BslSpecCopyHandler,BslSpecCutHandler,BslSpecPasteHandler
public abstract class AbstractBslSpecCopyPasteHandler
extends org.eclipse.core.commands.AbstractHandler
Abstract handler for processing special operation - copy, cut and paste, for
StringLiteral in Built-in language-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyToClipboard(org.eclipse.jface.text.ITextSelection selection, boolean delete, org.eclipse.jface.text.source.SourceViewer viewer) Copy text fromselectionto the clipboardprotected booleanisStringLiteralContext(org.eclipse.jface.text.IDocument document, org.eclipse.swt.graphics.Point selectRange) Checks that selected range in the editor corresponding to the body of theStringLiteralprotected StringtransformCopyText(String copyText) Transfroms text deleting symbols "|" from itMethods 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, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.commands.IHandler
execute
-
Constructor Details
-
AbstractBslSpecCopyPasteHandler
public AbstractBslSpecCopyPasteHandler()
-
-
Method Details
-
isStringLiteralContext
protected boolean isStringLiteralContext(org.eclipse.jface.text.IDocument document, org.eclipse.swt.graphics.Point selectRange) Checks that selected range in the editor corresponding to the body of theStringLiteral- Parameters:
selectRange- checking selected range, cannot benull- Returns:
trueif selected range in the editor corresponding to the body of theStringLiteral,falseotherwise
-
transformCopyText
Transfroms text deleting symbols "|" from it- Parameters:
copyText- transforming text, can't benull- Returns:
- transformed text without symbols "|", never
null
-
copyToClipboard
protected void copyToClipboard(org.eclipse.jface.text.ITextSelection selection, boolean delete, org.eclipse.jface.text.source.SourceViewer viewer) Copy text fromselectionto the clipboard- Parameters:
selection- actualITextSelectionfor copying text, cannot benulldelete-trueif text should be deleted after copying,falsecopying without deletingviewer- actualSourceViewerfor copying, cannot benull
-