@@ -13,6 +13,7 @@ import com.emberjs.index.EmberNameIndex
1313import com.emberjs.resolver.EmberName
1414import com.emberjs.utils.EmberUtils
1515import com.emberjs.utils.ifTrue
16+ import com.intellij.extapi.psi.PsiFileBase
1617import com.intellij.formatting.*
1718import com.intellij.formatting.templateLanguages.DataLanguageBlockWrapper
1819import com.intellij.lang.*
@@ -25,9 +26,11 @@ import com.intellij.lang.javascript.*
2526import com.intellij.lang.javascript.config.JSImportResolveContext
2627import com.intellij.lang.javascript.dialects.ECMA6ParserDefinition
2728import com.intellij.lang.javascript.dialects.TypeScriptParserDefinition
29+ import com.intellij.lang.javascript.ecmascript6.TypeScriptAnnotatingVisitor
2830import com.intellij.lang.javascript.editing.JavascriptCommenter
2931import com.intellij.lang.javascript.formatter.JavascriptFormattingModelBuilder
3032import com.intellij.lang.javascript.highlighting.JSHighlighter
33+ import com.intellij.lang.javascript.highlighting.JSSemanticHighlightingVisitor
3134import com.intellij.lang.javascript.index.IndexedFileTypeProvider
3235import com.intellij.lang.javascript.modules.JSImportCandidateDescriptor
3336import com.intellij.lang.javascript.modules.JSImportPlaceInfo
@@ -41,6 +44,9 @@ import com.intellij.lang.javascript.psi.*
4144import com.intellij.lang.javascript.psi.ecmal4.JSClass
4245import com.intellij.lang.javascript.psi.impl.JSFileImpl
4346import com.intellij.lang.javascript.types.JSFileElementType
47+ import com.intellij.lang.javascript.validation.JSAnnotatingVisitor
48+ import com.intellij.lang.javascript.validation.JSAnnotator
49+ import com.intellij.lang.javascript.validation.TypeScriptKeywordHighlighterVisitor
4450import com.intellij.lang.typescript.tsconfig.*
4551import com.intellij.lang.xml.XMLLanguage
4652import com.intellij.lang.xml.XmlFormattingModel
@@ -49,7 +55,6 @@ import com.intellij.lexer.Lexer
4955import com.intellij.lexer.LookAheadLexer
5056import com.intellij.openapi.editor.Document
5157import com.intellij.openapi.editor.Editor
52- import com.intellij.openapi.editor.actions.lists.TrailingComma
5358import com.intellij.openapi.editor.colors.EditorColorsScheme
5459import com.intellij.openapi.editor.ex.util.LayerDescriptor
5560import com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter
@@ -137,6 +142,21 @@ class GtsFile(viewProvider: FileViewProvider?, val isJS: Boolean =false)
137142 }
138143
139144
145+ override fun accept (visitor : PsiElementVisitor ) {
146+ if (visitor is JSSemanticHighlightingVisitor ) {
147+ return
148+ }
149+ if (visitor is TypeScriptAnnotatingVisitor ) {
150+ return
151+ }
152+ if (visitor is TypeScriptKeywordHighlighterVisitor ) {
153+ return
154+ }
155+ if (visitor is JSAnnotatingVisitor ) {
156+ return
157+ }
158+ super .accept(visitor)
159+ }
140160}
141161
142162
0 commit comments