mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 17:27:49 +08:00
Proofread and minor language changes.
This commit is contained in:
parent
6277af0c4b
commit
353670c7c1
@ -4,7 +4,8 @@ title: Run Configurations
|
||||
|
||||
*Run Configurations* allow users to run a certain type of external processes from within the IDE, e.g. a script, an application, a server, etc. You can provide UI for the user to specify execution options, as well as an option to create a run configuration based on a specific location in the source code.
|
||||
|
||||
If you want IDEs to advertise that your plugin supports to run configuration look at the page about [feature extractor](/plugin_repository/feature_extractor.md).
|
||||
If you want IDEs to advertise that your plugin supports run configurations, look at the page about
|
||||
[feature extractor](/plugin_repository/feature_extractor.md).
|
||||
|
||||
# Architectural overview
|
||||
|
||||
|
@ -2,21 +2,29 @@
|
||||
title: Feature Extractor
|
||||
---
|
||||
|
||||
Products based on the *IntelliJ Platform* may advertise a plugin for installation if it supports an additional feature from the list:
|
||||
The IntelliJ Platform IDEs will advertise a plugin for installation if the plugin provides additional features from this list:
|
||||
* Configuration Type
|
||||
* Facet Type
|
||||
* File Extensions Type
|
||||
* Module Type
|
||||
* Artifact Type
|
||||
|
||||
For it, there is a tool called [`feature extractor`](https://github.com/JetBrains/intellij-plugin-verifier/tree/master/intellij-feature-extractor/), which statically analyzes bytecode of a plugin and tries to extract values that are passed to IntelliJ API.
|
||||
However, if values are dynamically evaluated, *the extractor* may return incomplete results. If you cannot find your plugin in [the list of features](https://plugins.jetbrains.com/feature/), you can make your code easier for the analyses or ask us to manually add missed features.
|
||||
IntelliJ Platform IDEs only show plugin advertisements in the appropriate context so they are meaningful to the user.
|
||||
|
||||
The [`feature extractor`](https://github.com/JetBrains/intellij-plugin-verifier/tree/master/intellij-feature-extractor/) tool
|
||||
catalogs these types of features for a plugin. It works by statically analyzing the bytecode of a plugin to extract values
|
||||
passed to the IntelliJ Platform APIs that support extending features in the above list.
|
||||
However, if values are dynamically evaluated in a plugin, the `feature extractor` may return incomplete results.
|
||||
If you cannot find your plugin in [the list of features](https://plugins.jetbrains.com/feature/), you can either make your code
|
||||
easier for the analysis, or ask JetBrains to manually add any missed feature types.
|
||||
|
||||
## Configuration Type
|
||||
|
||||
When you want IDEs to show that your plugin provides to *make run configuration*, you need to implement [ConfigurationType](https://github.com/JetBrains/intellij-community/blob/master/platform/lang-api/src/com/intellij/execution/configurations/ConfigurationType.java) and implement `getId()`. The feature extractor analyzes value of `getId()`.
|
||||
When you want IDEs to show that your plugin supports Run Configuration Type, you need to implement
|
||||
[ConfigurationType](https://github.com/JetBrains/intellij-community/blob/master/platform/lang-api/src/com/intellij/execution/configurations/ConfigurationType.java)
|
||||
and implement the `getId()` method. The `feature extractor` analyzes the value of `getId()`.
|
||||
|
||||
The example of an advertisement for plugins which support *D Run Configuration*:
|
||||
An advertisement for a plugin that supports the *Run D App* Configuration Type:
|
||||
|
||||

|
||||
|
||||
@ -24,9 +32,10 @@ Refer to [Run Configurations](/basics/run_configurations.md) to get more informa
|
||||
|
||||
## Facet Type
|
||||
|
||||
To introduce this feature you should extend [FacetType](https://github.com/JetBrains/intellij-community/blob/master/platform/lang-api/src/com/intellij/facet/FacetType.java) and pass `stringId` to its constructor. Value of `stringId` parameter will be analyzed by *the feature extractor*.
|
||||
To support a Facet Type feature you should extend [FacetType](https://github.com/JetBrains/intellij-community/blob/master/platform/lang-api/src/com/intellij/facet/FacetType.java),
|
||||
and pass `stringId` to its constructor. The value of the `stringId` parameter will be analyzed by the `feature extractor`.
|
||||
|
||||
The example of plugins suggestion for *jangaroo facet*:
|
||||
An advertisement for a plugin that supports the *jangaroo* Facet Type:
|
||||
|
||||

|
||||
|
||||
@ -34,26 +43,31 @@ Refer to [Facet](/reference_guide/project_model/facet.md) for additional informa
|
||||
|
||||
## File Extensions Type
|
||||
|
||||
The plugin can support specific file extensions. When there is a file with this extension in IDEs the hint will be shown to users to install your plugin.
|
||||
You should extend [FileTypeFactory](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/fileTypes/FileTypeFactory.java) and feed supported file extensions in *createFileTypes(FileTypeConsumer)*. Values that get fed to *FileTypeConsumer's* methods are analyzed.
|
||||
A plugin can support specific types of file extensions. When there is a file with a specific extension open in an IDE, a hint will be shown to users prompting them to install your plugin.
|
||||
You should extend [FileTypeFactory](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/fileTypes/FileTypeFactory.java)
|
||||
and feed supported file extensions in `createFileTypes(FileTypeConsumer)`. Values of `FileTypeConsumer` are analyzed by the `feature extractor`.
|
||||
|
||||
The example of an advertisement for plugins which support *.d extension:
|
||||
An advertisement for plugins which support the _\*.d_ Extension Type:
|
||||
|
||||

|
||||
|
||||
Refer to [Registering a File Type](/reference_guide/custom_language_support/registering_file_type.md) to provide this feature in the plugin.
|
||||
Refer to [Registering a File Type](/reference_guide/custom_language_support/registering_file_type.md) to provide this feature in a plugin.
|
||||
|
||||
## Module Type
|
||||
|
||||
If you want IDEs to advertise that your plugin can allow creating a specific module you should extend [ModuleType](https://github.com/JetBrains/intellij-community/blob/master/platform/lang-api/src/com/intellij/openapi/module/ModuleType.java) and pass `id` parameter to its constructor.
|
||||
If you want IDEs to advertise that your plugin can support creating specific Module Types, you should extend
|
||||
[ModuleType](https://github.com/JetBrains/intellij-community/blob/master/platform/lang-api/src/com/intellij/openapi/module/ModuleType.java)
|
||||
and pass the `id` parameter for your Module Type to its constructor. The `feature extractor` will evaluate the values of `id`.
|
||||
|
||||
Look [Module](/reference_guide/project_model/module.md) and [Supporting Module Types](/tutorials/project_wizard/module_types.md) for more information about this type of features.
|
||||
See [Module](/reference_guide/project_model/module.md) and [Supporting Module Types](/tutorials/project_wizard/module_types.md)
|
||||
for more information about supporting Module Types.
|
||||
|
||||
|
||||
## Artifact Type
|
||||
|
||||
To add this feature you should extend [ArtifactType](https://github.com/JetBrains/intellij-community/blob/master/java/compiler/openapi/src/com/intellij/packaging/artifacts/ArtifactType.java) and pass `id` parameter to its constructor. Value of `id` parameter passed to *ModuleType's* constructor is analyzed by *the extractor*.
|
||||
To support specific Artifact Types, extend [ArtifactType](https://github.com/JetBrains/intellij-community/blob/master/java/compiler/openapi/src/com/intellij/packaging/artifacts/ArtifactType.java),
|
||||
and pass an `id` parameter to its constructor. The value of the `id` parameter is analyzed by the `feature extractor`.
|
||||
|
||||
The example of suggestion to install plugins which support a necessary *artifact*:
|
||||
An example suggestion to enable a plugin which supports a *dm.bundle* Artifact Type:
|
||||
|
||||

|
||||
|
@ -2,19 +2,23 @@
|
||||
title: Plugin Repository (plugins.jetbrains.com)
|
||||
---
|
||||
|
||||
Plugins are extensions to JetBrains products core functionality. They provide various integrations (e.g. with a VCS or application servers), add support for various development technologies, frameworks and programming languages, and so on.
|
||||
Plugins extend the core functionality of JetBrains products. They provide various integrations (e.g. with a VCS or application servers),
|
||||
add support for various development technologies, frameworks and programming languages, and so on.
|
||||
|
||||
Plugin Repository is a service responsible for:
|
||||
The Plugin Repository is a service responsible for:
|
||||
|
||||
* Providing a product (e.g. IntelliJ IDEA) with a list of compatible plugins and their updates;
|
||||
|
||||
* Facilitating the download of the compatible plugin update;
|
||||
* Facilitating the download of compatible plugin updates;
|
||||
|
||||
* Storage, uploading, and management of the plugins and their updates developed and published by third-party vendors or JetBrains.
|
||||
|
||||
JetBrains provides an official plugins repository [plugins.jetbrains.com](https://plugins.jetbrains.com) service for all IntelliJ Platform-based IDEs, as well as TeamCity (limited functionality).
|
||||
JetBrains provides an official plugins repository [plugins.jetbrains.com](https://plugins.jetbrains.com) for all IntelliJ Platform-based IDEs,
|
||||
as well as TeamCity (limited functionality).
|
||||
|
||||
You can set up your own, enterprise plugin repositories for IntelliJ Platform based IDEs (also known as custom plugin repositories), for example, to store plugins that you want to reserve for your company's internal use only. [Read more](https://www.jetbrains.com/help/idea/managing-enterprise-plugin-repositories.html) about IntelliJ Platform-based IDEs enterprise repositories support.
|
||||
You can set up your own enterprise plugin repositories for IntelliJ Platform based IDEs (also known as custom plugin repositories).
|
||||
For example, to store plugins that you want to reserve for your company's internal use only.
|
||||
[Read more](https://www.jetbrains.com/help/idea/managing-enterprise-plugin-repositories.html) about IntelliJ Platform-based IDEs enterprise repositories support.
|
||||
|
||||
This documentation section includes articles, FAQs, and tutorials on [JetBrains plugin repository](https://plugins.jetbrains.com) operations.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Registering a File Type
|
||||
---
|
||||
|
||||
The first step in developing a custom language plugin is registering a file type the language will be associated with.
|
||||
The first step in developing a custom language plugin is registering a file type associated with the language.
|
||||
The IDE normally determines the type of a file by looking at its file name.
|
||||
|
||||
A custom language file type is a class derived from
|
||||
@ -23,6 +23,6 @@ To verify that the file type is registered correctly, you can implement the
|
||||
[LanguageFileType.getIcon()](upsource:///platform/core-api/src/com/intellij/openapi/fileTypes/LanguageFileType.java)
|
||||
method and verify that the correct icon is displayed for files which have the extension(s) associated with your file type.
|
||||
|
||||
If you want IDEs to advertise that your plugin supports some extensions such in the example below look at the information about [the feature extractor](/plugin_repository/feature_extractor.md).
|
||||
If you want IDEs to advertise that your plugin supports some extensions as in the example below, look at the information about [the feature extractor](/plugin_repository/feature_extractor.md).
|
||||
|
||||

|
||||
|
@ -12,6 +12,6 @@ To access the list of facets for a module, use the [FacetManager](upsource:///pl
|
||||
and [Facet](upsource:///platform/lang-api/src/com/intellij/facet/Facet.java) classes.
|
||||
|
||||
|
||||
If you want IDEs to advertise that your plugin supports a facet such in the example below look at the information about [the feature extractor](/plugin_repository/feature_extractor.md).
|
||||
If you want IDEs to advertise that your plugin supports a facet as in the example below, look at the information about [the feature extractor](/plugin_repository/feature_extractor.md).
|
||||
|
||||

|
||||
|
@ -5,7 +5,7 @@ title: Supporting Module Types
|
||||
*IntelliJ Platform* provides a set of standard module types which can be chosen, however, you might need to create a module of a type that isn't supported yet.
|
||||
This tutorial shows how to register a new module type and link it to the project creation procedure and the UI.
|
||||
|
||||
If you want IDEs to advertise that your plugin supports some module look at the page about [feature extractor](/plugin_repository/feature_extractor.md).
|
||||
If you want IDEs to advertise that your plugin supports a module type, look at the page about [feature extractor](/plugin_repository/feature_extractor.md).
|
||||
## Pre-requirements
|
||||
|
||||
Create an empty plugin project,
|
||||
|
@ -13,7 +13,7 @@ Welcome to the _IntelliJ Platform_ SDK. This is the primary source of documentat
|
||||
* [**Key Topics**](intro/key_topics.md)
|
||||
* [**Getting Help**](intro/getting_help.md)
|
||||
* [**Getting Started**](/basics/getting_started.md)
|
||||
* [**Plugins Features**](/plugin_repository/feature_extractor.md)
|
||||
* [**Plugin Features**](/plugin_repository/feature_extractor.md)
|
||||
* [**Resources**](resources.md)
|
||||
|
||||
## Open Source
|
||||
|
Loading…
x
Reference in New Issue
Block a user