org.eclipse.xtext.ui.editor.autoedit
Class ShortCutEditStrategy
java.lang.Object
org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategy
org.eclipse.xtext.ui.editor.autoedit.ShortCutEditStrategy
- All Implemented Interfaces:
- java.util.EventListener, org.eclipse.jface.text.IAutoEditStrategy, org.eclipse.swt.custom.VerifyKeyListener, org.eclipse.swt.internal.SWTEventListener, ISourceViewerAware
public class ShortCutEditStrategy
- extends AbstractEditStrategy
- implements ISourceViewerAware
A simple IAutoEditStrategy
for shortcuts. Replaces the given shortcut by the given replacement.
- 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 |
ShortCutEditStrategy
public ShortCutEditStrategy()
configure
public ShortCutEditStrategy configure(java.lang.String shortcut,
java.lang.String replacement)
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
setSourceViewer
public void setSourceViewer(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
- Specified by:
setSourceViewer
in interface ISourceViewerAware
verifyKey
public void verifyKey(org.eclipse.swt.events.VerifyEvent event)
- Specified by:
verifyKey
in interface org.eclipse.swt.custom.VerifyKeyListener
- Overrides:
verifyKey
in class AbstractEditStrategy