language tutorial: remove obsolete SimpleFileTypeFactory approach

This commit is contained in:
Yann Cébron 2023-02-06 18:28:22 +01:00
parent 3377e534bf
commit 82e2722171
2 changed files with 1 additions and 31 deletions

View File

@ -1,23 +0,0 @@
// Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.intellij.sdk.language;
import com.intellij.openapi.fileTypes.FileTypeConsumer;
import com.intellij.openapi.fileTypes.FileTypeFactory;
import org.jetbrains.annotations.NotNull;
/**
* TODO: This class is only used with the {@code com.intellij.fileTypeFactory} extension point
* for versions of the IntelliJ Platform prior to v2019.2.
*
* @see <a href="https://plugins.jetbrains.com/docs/intellij/language-and-filetype.html#register-the-filetype">Custom Language Tutorial</a>
*/
@SuppressWarnings("deprecation")
public class SimpleFileTypeFactory extends FileTypeFactory {
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
fileTypeConsumer.consume(SimpleFileType.INSTANCE);
}
}

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. --> <!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html --> <!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin> <idea-plugin>
@ -39,13 +39,6 @@
<extensions defaultExtensionNs="com.intellij"> <extensions defaultExtensionNs="com.intellij">
<fileType name="Simple File" implementationClass="org.intellij.sdk.language.SimpleFileType" fieldName="INSTANCE" <fileType name="Simple File" implementationClass="org.intellij.sdk.language.SimpleFileType" fieldName="INSTANCE"
language="Simple" extensions="simple"/> language="Simple" extensions="simple"/>
<!--
Only required for versions of the IntelliJ Platform prior to v2019.2.
Use 'com.intellij.fileTypeFactory' extension point INSTEAD of above 'com.intellij.fileType'.
See https://plugins.jetbrains.com/docs/intellij/language-and-filetype.html#register-the-filetype for details.
<fileTypeFactory implementation="org.intellij.sdk.language.SimpleFileTypeFactory"/>
-->
<lang.parserDefinition language="Simple" implementationClass="org.intellij.sdk.language.SimpleParserDefinition"/> <lang.parserDefinition language="Simple" implementationClass="org.intellij.sdk.language.SimpleParserDefinition"/>
<lang.syntaxHighlighterFactory language="Simple" <lang.syntaxHighlighterFactory language="Simple"
implementationClass="org.intellij.sdk.language.SimpleSyntaxHighlighterFactory"/> implementationClass="org.intellij.sdk.language.SimpleSyntaxHighlighterFactory"/>