mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[java] Make extension classes final
GitOrigin-RevId: 1aae04982598568a111e8c78b9a71c9d2b4aa150
This commit is contained in:
committed by
intellij-monorepo-bot
parent
06342a71b3
commit
019a6852f4
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AutoFormatTypedHandler extends TypedHandlerDelegate {
|
||||
public final class AutoFormatTypedHandler extends TypedHandlerDelegate {
|
||||
private static boolean myIsEnabledInTests;
|
||||
|
||||
private static final char[] NO_SPACE_AFTER = {
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.intellij.psi.PsiFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class JavaBackspaceHandler extends BackspaceHandlerDelegate {
|
||||
public final class JavaBackspaceHandler extends BackspaceHandlerDelegate {
|
||||
private boolean myToDeleteGt;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_EXPRESSION_LIST_STATEMENT;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.EXPRESSION_SET;
|
||||
|
||||
public class JavaEnterAfterUnmatchedBraceHandler extends EnterAfterUnmatchedBraceHandler {
|
||||
public final class JavaEnterAfterUnmatchedBraceHandler extends EnterAfterUnmatchedBraceHandler {
|
||||
|
||||
protected JavaEnterAfterUnmatchedBraceHandler() {
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_LITERAL_EXPRESSION;
|
||||
|
||||
public class JavaEnterInTextBlockHandler extends EnterInStringLiteralHandler {
|
||||
public final class JavaEnterInTextBlockHandler extends EnterInStringLiteralHandler {
|
||||
|
||||
@Override
|
||||
public Result preprocessEnter(@NotNull PsiFile file,
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.HashMap;
|
||||
import static com.intellij.formatting.Indent.Type.CONTINUATION;
|
||||
import static com.intellij.psi.impl.source.codeStyle.lineIndent.JavaLikeLangLineIndentProvider.JavaLikeElement.*;
|
||||
|
||||
public class JavaLineIndentProvider extends JavaLikeLangLineIndentProvider {
|
||||
public final class JavaLineIndentProvider extends JavaLikeLangLineIndentProvider {
|
||||
private final static HashMap<IElementType, SemanticEditorPosition.SyntaxElement> SYNTAX_MAP = new HashMap<>();
|
||||
static {
|
||||
SYNTAX_MAP.put(TokenType.WHITE_SPACE, Whitespace);
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.intellij.psi.JavaTokenType;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaWordBoundaryFilter extends WordBoundaryFilter {
|
||||
public final class JavaWordBoundaryFilter extends WordBoundaryFilter {
|
||||
@Override
|
||||
public boolean isWordBoundary(@NotNull IElementType previousTokenType, @NotNull IElementType tokenType) {
|
||||
if (previousTokenType == JavaTokenType.GT && tokenType == JavaTokenType.EQ) return false;
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.intellij.codeInsight.editorActions;
|
||||
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||
|
||||
public class JavadocLineStartWithSelectionHandler extends JavadocLineStartHandler {
|
||||
public final class JavadocLineStartWithSelectionHandler extends JavadocLineStartHandler {
|
||||
public JavadocLineStartWithSelectionHandler(EditorActionHandler originalHandler) {
|
||||
super(originalHandler, true);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicElementTypes.BASIC_JAVA_COMMENT_BIT_SET;
|
||||
|
||||
public class AntLikePropertySelectionHandler extends ExtendWordSelectionHandlerBase {
|
||||
public final class AntLikePropertySelectionHandler extends ExtendWordSelectionHandlerBase {
|
||||
@Override
|
||||
public List<TextRange> select(@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) {
|
||||
TextRange range = e.getTextRange();
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.*;
|
||||
|
||||
public class CaseStatementsSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class CaseStatementsSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.*;
|
||||
|
||||
public class CodeBlockOrInitializerSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class CodeBlockOrInitializerSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
ASTNode node = BasicJavaAstTreeUtil.toNode(e);
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaDocElementType.BASIC_DOC_COMMENT;
|
||||
|
||||
public class DocCommentSelectioner extends LineCommentSelectioner {
|
||||
public final class DocCommentSelectioner extends LineCommentSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaDocElementType.*;
|
||||
|
||||
public class DocTagSelectioner extends WordSelectioner {
|
||||
public final class DocTagSelectioner extends WordSelectioner {
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
ASTNode node = BasicJavaAstTreeUtil.toNode(e);
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_ENUM_CONSTANT;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_FIELD;
|
||||
|
||||
public class FieldSelectioner extends WordSelectioner {
|
||||
public final class FieldSelectioner extends WordSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_TRY_STATEMENT;
|
||||
|
||||
public class FinallyBlockSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class FinallyBlockSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
return BasicJavaAstTreeUtil.is(BasicJavaAstTreeUtil.toNode(e), JavaTokenType.FINALLY_KEYWORD);
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_FOREACH_STATEMENT;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_FOR_STATEMENT;
|
||||
|
||||
public class ForStatementHeaderSelectioner implements ExtendWordSelectionHandler {
|
||||
public final class ForStatementHeaderSelectioner implements ExtendWordSelectionHandler {
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
ASTNode node = BasicJavaAstTreeUtil.toNode(e);
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_IF_STATEMENT;
|
||||
|
||||
public class IfStatementSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class IfStatementSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import static com.intellij.psi.impl.source.BasicJavaDocElementType.*;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.*;
|
||||
|
||||
|
||||
public class JavaBasicWordSelectionFilter implements Condition<PsiElement> {
|
||||
public final class JavaBasicWordSelectionFilter implements Condition<PsiElement> {
|
||||
|
||||
public JavaBasicWordSelectionFilter() {
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_CODE_BLOCK;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.CLASS_SET;
|
||||
|
||||
public class JavaTokenSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class JavaTokenSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class JavaWordSelectioner extends AbstractWordSelectioner {
|
||||
public final class JavaWordSelectioner extends AbstractWordSelectioner {
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
ASTNode node = BasicJavaAstTreeUtil.toNode(e);
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.*;
|
||||
|
||||
public class ListSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class ListSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
ASTNode node = BasicJavaAstTreeUtil.toNode(e);
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LiteralSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class LiteralSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_METHOD_CALL_EXPRESSION;
|
||||
|
||||
public class MethodCallSelectioner implements ExtendWordSelectionHandler {
|
||||
public final class MethodCallSelectioner implements ExtendWordSelectionHandler {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import static com.intellij.psi.impl.source.BasicElementTypes.BASIC_JAVA_COMMENT_
|
||||
import static com.intellij.psi.impl.source.BasicJavaDocElementType.BASIC_DOC_COMMENT;
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.*;
|
||||
|
||||
public class MethodOrClassSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class MethodOrClassSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.*;
|
||||
|
||||
public class ReferenceSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class ReferenceSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.*;
|
||||
|
||||
public class StatementGroupSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class StatementGroupSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
return BasicJavaAstTreeUtil.is(BasicJavaAstTreeUtil.toNode(e), STATEMENT_SET);
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.psi.impl.source.BasicJavaElementType.BASIC_TYPE_CAST_EXPRESSION;
|
||||
|
||||
public class TypeCastSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
public final class TypeCastSelectioner extends AbstractBasicBackBasicSelectioner {
|
||||
|
||||
@Override
|
||||
public boolean canSelect(@NotNull PsiElement e) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.tree.ParentAwareTokenSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaPairedBraceMatcher extends PairedBraceAndAnglesMatcher {
|
||||
public final class JavaPairedBraceMatcher extends PairedBraceAndAnglesMatcher {
|
||||
|
||||
private static class Holder {
|
||||
private static final ParentAwareTokenSet TYPE_TOKENS =
|
||||
|
||||
@@ -46,7 +46,7 @@ public class JavaFileCodeStyleFacadeImpl extends DefaultCodeStyleSettingsFacade
|
||||
return myJavaSettings.GENERATE_FINAL_LOCALS;
|
||||
}
|
||||
|
||||
public static class Factory implements JavaFileCodeStyleFacadeFactory {
|
||||
public static final class Factory implements JavaFileCodeStyleFacadeFactory {
|
||||
|
||||
@Override
|
||||
public @NotNull JavaFileCodeStyleFacade createFacade(@NotNull PsiFile psiFile) {
|
||||
|
||||
Reference in New Issue
Block a user