public class EnterHandler extends BaseEnterHandler
Constructor and Description |
---|
EnterHandler(EditorActionHandler originalHandler) |
Modifier and Type | Method and Description |
---|---|
static int |
adjustLineIndentNoCommit(Language language,
Document document,
Editor editor,
int offset)
Adjusts indentation of the line with
offset in document . |
void |
executeWriteAction(Editor editor,
Caret caret,
DataContext dataContext) |
static Language |
getLanguage(DataContext dataContext) |
static boolean |
isCommentComplete(PsiComment comment,
CodeDocumentationAwareCommenter commenter,
Editor editor) |
boolean |
isEnabledForCaret(Editor editor,
Caret caret,
DataContext dataContext)
Implementations can override this method to define whether handler is enabled for a specific caret in a given editor.
|
getCommandGroupId
doExecute, executeWriteAction
execute, execute, executeInCommand, isEnabled, isEnabled, runForAllCarets
public EnterHandler(EditorActionHandler originalHandler)
public boolean isEnabledForCaret(Editor editor, Caret caret, DataContext dataContext)
EditorActionHandler
isEnabledForCaret
in class EditorActionHandler
public void executeWriteAction(Editor editor, Caret caret, DataContext dataContext)
executeWriteAction
in class EditorWriteActionHandler
public static boolean isCommentComplete(PsiComment comment, CodeDocumentationAwareCommenter commenter, Editor editor)
public static int adjustLineIndentNoCommit(Language language, Document document, Editor editor, int offset)
offset
in document
.language
- used for code style extractiondocument
- for indent adjustmenteditor
- used for code style extractionoffset
- in document
for indent adjustmentdocument
after commit-free indent adjustment or
-1
if commit-free indent adjustment is unavailable in position.public static Language getLanguage(DataContext dataContext)