org.eclipse.xtext.ui.editor.autoedit
Class AbstractTerminalsEditStrategy
java.lang.Object
org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategy
org.eclipse.xtext.ui.editor.autoedit.AbstractTerminalsEditStrategy
- All Implemented Interfaces:
- java.util.EventListener, org.eclipse.jface.text.IAutoEditStrategy, org.eclipse.swt.custom.VerifyKeyListener, org.eclipse.swt.internal.SWTEventListener
- Direct Known Subclasses:
- MultiLineTerminalsEditStrategy, SingleLineTerminalsStrategy
public abstract class AbstractTerminalsEditStrategy
- extends AbstractEditStrategy
- Author:
- Sven Efftinge - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
util
@Inject
protected DocumentUtil util
AbstractTerminalsEditStrategy
public AbstractTerminalsEditStrategy(java.lang.String leftTerminal,
java.lang.String rightTerminal)
setDocumentUtil
public void setDocumentUtil(DocumentUtil util)
getLeftTerminal
public java.lang.String getLeftTerminal()
getRightTerminal
public java.lang.String getRightTerminal()
allowsEqualTerminals
protected boolean allowsEqualTerminals()
getDocumentUtil
protected DocumentUtil getDocumentUtil()
findStopTerminal
protected org.eclipse.jface.text.IRegion findStopTerminal(org.eclipse.jface.text.IDocument document,
int offset)
throws org.eclipse.jface.text.BadLocationException
- finds the first start terminal which is not closed before the cursor position.
- Throws:
org.eclipse.jface.text.BadLocationException
findStartTerminal
protected org.eclipse.jface.text.IRegion findStartTerminal(org.eclipse.jface.text.IDocument document,
int offset)
throws org.eclipse.jface.text.BadLocationException
- finds the first stop terminal which has not been started after the cursor position.
- Throws:
org.eclipse.jface.text.BadLocationException