当前位置:   article > 正文

The IntelliJ Platform

intellij platform

The IntelliJ Platform is not a product in and of itself but provides a platform for building IDEs. It is used to power JetBrains products such as IntelliJ IDEA. It is also Open Source and can be used by third parties to build IDEs, such as Android Studio from Google.

IntelliJ平台本身并不是一个产品,而是一个构建IDE的平台。它用于为IntelliJ IDEA等JetBrains产品增强能力。它也是开源的,可以被第三方用来构建IDE,比如谷歌的Android Studio。

The IntelliJ Platform provides all the infrastructure that these IDEs need to provide rich language tooling support. It is a component-driven, cross-platform JVM based application host with a high-level user interface toolkit for creating tool windows, tree views, and lists (supporting fast search) as well as popup menus and dialogs.

IntelliJ平台为这些IDE提供丰富语言工具支持所需的所有基础设施。它是一个组件驱动、基于JVM的跨平台应用程序主机,具有用于创建工具窗口、树视图和列表(支持快速搜索)以及弹出菜单和对话框的高级用户界面工具包。

The IntelliJ Platform has a full-text editor with abstract implementations of syntax highlighting, code folding, code completion, and other rich text editing features. An image editor is also included.

IntelliJ平台有一个全文编辑器,具有语法高亮显示、代码折叠、代码完成和其他富文本编辑功能的抽象实现,还包括图片编辑器。

Furthermore, it includes open APIs to build standard IDE functionality, such as a project model and a build system. It also provides an infrastructure for a rich debugging experience, with language-agnostic advanced breakpoint support, call stacks, watch windows, and expression evaluation.

此外,它还包括用于构建标准IDE功能的开放API,如项目模型和构建系统。它还为丰富的调试体验提供了基础设施,具有语言无关的高级断点支持、调用堆栈、监视窗口和表达式求值。

But the IntelliJ Platform's real power comes from the Program Structure Interface (PSI). It is a set of functionalities used to parse files, build rich syntactic and semantic models of the code, and build indexes from this data. PSI powers a lot of functionalities, from quick navigating to files, types, and symbols, to the contents of code completion windows and find usages, code inspections, and code rewriting, for quick fixes or refactorings, as well as many other features.

The IntelliJ Platform

但IntelliJ平台的真正力量来自程序结构接口(PSI)。它是一组功能,用于解析文件,构建丰富的代码语法和语义模型,并根据这些数据构建索引。PSI提供了许多功能,从快速导航到文件、类型和符号,到代码完成窗口的内容和查找用法、代码检查和代码重写,用于快速修复或重构,以及许多其他功能。

The IntelliJ Platform includes parsers and a PSI model for many languages, and its extensible nature means that it is possible to add support for other languages.

IntelliJ平台包括用于多种语言的解析器和PSI模型,其可扩展性意味着可以添加对其他语言的支持。

Plugins

Products built on the IntelliJ Platform are extensible applications, with the platform being responsible for creating components and the injection of dependencies into classes. The IntelliJ Platform fully supports plugins, and JetBrains hosts the JetBrains Marketplace which can be used to distribute plugins that support one or more of the products. It is also possible to distribute plugins using Custom Plugin Repositories.

基于IntelliJ平台构建的产品是可扩展的应用程序,平台负责创建组件并将依赖项注入类。IntelliJ平台完全支持插件,JetBrains托管JetBrains市场,该市场可用于分发支持一个或多个产品的插件。还可以使用自定义插件库分发插件。

Plugins can extend the platform in many ways, from adding a simple menu item to adding support for a complete language, build system, and debugger. Many of the existing IntelliJ Platform features are implemented as plugins that can be included or excluded depending on the needs of the end product. See the Quick Start Guide for more details.

插件可以以多种方式扩展平台,从添加简单的菜单项到添加对完整语言、构建系统和调试器的支持。许多现有的IntelliJ平台功能被以插件的方式实现,可以根据最终产品的需要包括或排除插件。有关详细信息,请参阅《快速入门指南》。

The IntelliJ Platform is a JVM application, implemented mostly in Java and Kotlin. Developing plugins for products based on the IntelliJ Platform requires experience with at least one of these languages, its standard and third party libraries, and associated tooling. At this time, it's not possible to extend the IntelliJ Platform in non-JVM languages.

IntelliJ平台是一个JVM应用程序,主要用Java和Kotlin实现。为基于IntelliJ平台的产品开发插件需要至少使用其中一种语言包括其标准和第三方库以及相关工具的经验。此时,不可能用非JVM语言扩展IntelliJ平台。

  • In some cases, implementing an actual IntelliJ Platform plugin might not be necessary, as alternative solutions exist.
  • 在某些情况下,可能不需要实现某些IntelliJ平台插件,因为存在替代解决方案。
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/680734
推荐阅读
相关标签
  

闽ICP备14008679号