/platform/lang-impl/src/com/intellij/codeInsight/editorActions/enter/EnterHandlerDelegate.java
https://bitbucket.org/nbargnesi/idea · Java · 43 lines · 19 code · 6 blank · 18 comment · 0 complexity · 5dd6345570a3e8075e8fa0a51bd7f7ae MD5 · raw file
- /*
- * Copyright 2000-2009 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- package com.intellij.codeInsight.editorActions.enter;
- import com.intellij.openapi.extensions.ExtensionPointName;
- import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
- import com.intellij.openapi.editor.Editor;
- import com.intellij.openapi.actionSystem.DataContext;
- import com.intellij.openapi.util.Ref;
- import com.intellij.psi.PsiFile;
- import org.jetbrains.annotations.NotNull;
- import org.jetbrains.annotations.Nullable;
- /**
- * @author yole
- */
- public interface EnterHandlerDelegate {
- ExtensionPointName<EnterHandlerDelegate> EP_NAME = ExtensionPointName.create("com.intellij.enterHandlerDelegate");
- enum Result {
- Default, Continue, DefaultForceIndent, DefaultSkipIndent, Stop
- }
- Result preprocessEnter(@NotNull final PsiFile file, @NotNull final Editor editor, @NotNull final Ref<Integer> caretOffset,
- @NotNull final Ref<Integer> caretAdvance, @NotNull final DataContext dataContext,
- @Nullable final EditorActionHandler originalHandler);
- Result postProcessEnter(@NotNull PsiFile file, @NotNull Editor editor, @NotNull DataContext dataContext);
- }