mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-29 09:47:50 +08:00
add warning about file type factory deprecation and simplify registration content in simple language tutorial
This commit is contained in:
parent
1bb8e970e9
commit
e00072f32d
@ -29,6 +29,10 @@ To associate the file type in the IDE, specify one or more associations as liste
|
||||
|
||||
<tab title="Pre-2019.2">
|
||||
|
||||
> The FileType Factory approach is deprecated. Use it only when the plugin requires support for platform versions older than 2019.2.
|
||||
>
|
||||
{type="warning"}
|
||||
|
||||
To register a file type, the plugin developer provides a subclass of [`FileTypeFactory`](upsource:///platform/ide-core/src/com/intellij/openapi/fileTypes/FileTypeFactory.java), which is registered via the `com.intellij.fileTypeFactory` extension point.
|
||||
|
||||
</tab>
|
||||
|
@ -48,9 +48,7 @@ The Simple Language file type is defined by subclassing [`LanguageFileType`](ups
|
||||
|
||||
<tab title="2019.2 and later">
|
||||
|
||||
Direct registration is possible - no `FileTypeFactory` is required.
|
||||
|
||||
Instead, the file type is registered via the `com.intellij.fileType` extension point in <path>plugin.xml</path> and registered with <path>*.simple</path> extension:
|
||||
The Simple Language file type is registered via the `com.intellij.fileType` extension point in <path>plugin.xml</path> and registered with <path>*.simple</path> extension:
|
||||
|
||||
```xml
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
@ -67,6 +65,10 @@ Instead, the file type is registered via the `com.intellij.fileType` extension p
|
||||
|
||||
<tab title="Pre-2019.2">
|
||||
|
||||
> The FileType Factory approach is deprecated. Use it only when the plugin requires support for platform versions older than 2019.2.
|
||||
>
|
||||
{type="warning"}
|
||||
|
||||
### Define a FileType Factory
|
||||
|
||||
First, define `SimpleFileTypeFactory` as a subclass of [`FileTypeFactory`](upsource:///platform/ide-core/src/com/intellij/openapi/fileTypes/FileTypeFactory.java).
|
||||
|
Loading…
x
Reference in New Issue
Block a user