import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
import com.intellij.openapi.editor.ex.EditorEx;
<BUG>import com.intellij.psi.*;
public class PlainEnterProcessor implements EnterProcessor {</BUG>
public boolean doEnter(Editor editor, PsiElement psiElement, boolean isModified) {
<BUG>PsiCodeBlock block = getControlStatementBlock(editor.getCaretModel().getOffset(), psiElement);
if (block != null) {</BUG>
PsiElement firstElement = block.getFirstBodyElement();

import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
import com.intellij.openapi.editor.ex.EditorEx;
import com.intellij.psi.*;
import org.jetbrains.annotations.Nullable;
public class PlainEnterProcessor implements EnterProcessor {
public boolean doEnter(Editor editor, PsiElement psiElement, boolean isModified) {
PsiCodeBlock block = getControlStatementBlock(editor.getCaretModel().getOffset(), psiElement);
EditorActionHandler enterHandler = getEnterHandler(IdeActions.ACTION_EDITOR_START_NEW_LINE);
if (block != null) {
