diff --git a/java/java-psi-api/src/com/intellij/psi/JavaTokenType.java b/java/java-psi-api/src/com/intellij/psi/JavaTokenType.java index e84731c709fb..70f3e2aa0485 100644 --- a/java/java-psi-api/src/com/intellij/psi/JavaTokenType.java +++ b/java/java-psi-api/src/com/intellij/psi/JavaTokenType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -19,6 +19,7 @@ import com.intellij.psi.tree.IElementType; import com.intellij.psi.tree.java.IJavaElementType; import com.intellij.psi.tree.java.IKeywordElementType; +@SuppressWarnings("SpellCheckingInspection") public interface JavaTokenType extends TokenType { IElementType IDENTIFIER = new IJavaElementType("IDENTIFIER"); IElementType C_STYLE_COMMENT = new IJavaElementType("C_STYLE_COMMENT"); @@ -140,11 +141,13 @@ public interface JavaTokenType extends TokenType { IElementType DOUBLE_COLON = new IJavaElementType("DOUBLE_COLON"); IElementType ARROW = new IJavaElementType("ARROW"); + IElementType OPEN_KEYWORD = new IJavaElementType("OPEN"); IElementType MODULE_KEYWORD = new IJavaElementType("MODULE"); IElementType REQUIRES_KEYWORD = new IJavaElementType("REQUIRES"); IElementType EXPORTS_KEYWORD = new IJavaElementType("EXPORTS"); IElementType USES_KEYWORD = new IJavaElementType("USES"); IElementType PROVIDES_KEYWORD = new IJavaElementType("PROVIDES"); + IElementType TRANSITIVE_KEYWORD = new IJavaElementType("TO"); IElementType TO_KEYWORD = new IJavaElementType("TO"); IElementType WITH_KEYWORD = new IJavaElementType("WITH"); } \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/PsiKeyword.java b/java/java-psi-api/src/com/intellij/psi/PsiKeyword.java index 5ce10a1ee9b9..9e3def51f0ee 100644 --- a/java/java-psi-api/src/com/intellij/psi/PsiKeyword.java +++ b/java/java-psi-api/src/com/intellij/psi/PsiKeyword.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -74,11 +74,13 @@ public interface PsiKeyword extends PsiJavaToken { String FALSE = "false"; String NULL = "null"; + String OPEN = "open"; String MODULE = "module"; String REQUIRES = "requires"; String EXPORTS = "exports"; String USES = "uses"; String PROVIDES = "provides"; + String TRANSITIVE = "transitive"; String TO = "to"; String WITH = "with"; } \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/lang/java/lexer/JavaLexer.java b/java/java-psi-impl/src/com/intellij/lang/java/lexer/JavaLexer.java index ff11af0624c8..b5e699995785 100644 --- a/java/java-psi-impl/src/com/intellij/lang/java/lexer/JavaLexer.java +++ b/java/java-psi-impl/src/com/intellij/lang/java/lexer/JavaLexer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -40,7 +40,7 @@ public class JavaLexer extends LexerBase { private static final Set JAVA9_KEYWORDS = ContainerUtil.newTroveSet( CharSequenceHashingStrategy.CASE_SENSITIVE, - MODULE, REQUIRES, EXPORTS, USES, PROVIDES, TO, WITH); + OPEN, MODULE, REQUIRES, EXPORTS, USES, PROVIDES, TRANSITIVE, TO, WITH); public static boolean isKeyword(String id, @NotNull LanguageLevel level) { return KEYWORDS.contains(id) ||