mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
language tutorial: remove obsolete SimpleFileTypeFactory approach
This commit is contained in:
parent
3377e534bf
commit
82e2722171
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -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"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user