org.eclipse.xtext.ui.editor.autoedit
Class PartitionEndSkippingEditStrategy

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategy
      extended by org.eclipse.xtext.ui.editor.autoedit.PartitionEndSkippingEditStrategy
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.text.IAutoEditStrategy, org.eclipse.swt.custom.VerifyKeyListener, org.eclipse.swt.internal.SWTEventListener

public class PartitionEndSkippingEditStrategy
extends AbstractEditStrategy

Author:
Sven Efftinge - Initial contribution and API skips inserting the closing terminal of a partition if it already exists.

Field Summary
 
Fields inherited from class org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategy
debug, DEBUG
 
Constructor Summary
PartitionEndSkippingEditStrategy()
           
 
Method Summary
protected  void internalCustomizeDocumentCommand(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command)
           
 PartitionEndSkippingEditStrategy withRightDelimiter(java.lang.String end)
           
 
Methods inherited from class org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategy
count, customizeDocumentCommand, getDocumentContent, handleBadLocationException, isIdentifierPart, verifyKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitionEndSkippingEditStrategy

public PartitionEndSkippingEditStrategy()
Method Detail

withRightDelimiter

public PartitionEndSkippingEditStrategy withRightDelimiter(java.lang.String end)

internalCustomizeDocumentCommand

protected void internalCustomizeDocumentCommand(org.eclipse.jface.text.IDocument document,
                                                org.eclipse.jface.text.DocumentCommand command)
                                         throws org.eclipse.jface.text.BadLocationException
Specified by:
internalCustomizeDocumentCommand in class AbstractEditStrategy
Throws:
org.eclipse.jface.text.BadLocationException