Плагины для webstorm как установить
Перейти к содержимому

Плагины для webstorm как установить

  • автор:

Install plugins

Plugins extend the core functionality of WebStorm. For example, install plugins to get the following features:

Integration with version control systems, issue trackers, build management servers, and other tools.

Coding assistance support for various languages and frameworks.

Shortcut hints, live previews, File Watchers, and so on.

Coding exercises that can help you to learn a new programming language.

By default, WebStorm includes a number of bundled plugins. You can disable bundled plugins, but they cannot be removed. You can install additional plugins from the plugin repository or from a local archive file (ZIP or JAR).

Open plugin settings

Press Ctrl+Alt+S to open the IDE settings and select Plugins .

Use the Marketplace tab to browse and install plugins from the JetBrains Plugin Repository or from a custom plugin repository.

Use the Installed tab to browse bundled and installed plugins, enable, disable, update, or remove them. Disabling unnecessary plugins can increase performance.

If a plugin depends on some other plugin, WebStorm will notify you about the dependencies. If your project depends on certain plugins, add them to the list of required plugins.

Install plugin from Marketplace

Press Ctrl+Alt+S to open the IDE settings and select Plugins .

Find the plugin in the Marketplace and click Install .

To install a specific version, go to the plugin page in the JetBrains Plugin Repository, download and install it as described in Install plugin from disk. For example, you can do it if the most recent version of the plugin is broken.

Install plugin from disk

Download the plugin archive (ZIP or JAR).

Press Ctrl+Alt+S to open the IDE settings and select Plugins .

On the Plugins page, click and then click Install Plugin from Disk… .

Select the plugin archive file and click OK .

Click OK to apply the changes and restart the IDE if prompted.

Install plugin through command line

From the JetBrains Marketplace page, find a page of the required plugin, select the Versions tab, and click any version to copy pluginId .

pluginId is a short name of the plugin you want to install.

Open the terminal, go to the WebStorm instance where your project resides, and for which you want to download and install a third-party plugin.

The downloaded WebStorm instances are located in of the following directories depending on your OS.

Use the installPlugins PROJECT_PATH pluginId to install your plugin.

Remove plugin

You cannot remove bundled plugins.

Press Ctrl+Alt+S to open the IDE settings and select Plugins .

Open the Installed tab and find the plugin that you want to remove.

Click on the plugin’s description pane and select Uninstall .

Disable plugin

You can disable a plugin without removing it if you do not need the corresponding functionality.

Press Ctrl+Alt+S to open the IDE settings and select Plugins .

Open the Installed tab, find and select the plugin that you want to disable.

Click on the plugin’s description pane and select Disable .

Disabling an installed plugin

Alternatively, you can use the checkboxes in the list of plugins or the Disable all buttons for plugin categories.

You can disable or enable all manually installed plugins at once (non-bundled) in the menu under .

Disable all downloaded plugins

Required plugins

A project may require plugins that provide support for certain technologies or frameworks. You can add such plugins to the list of required plugins for the current project, so that WebStorm will verify that the plugins are installed and enabled. It will notify you if you forget about some plugin, or someone on your team is not aware about the dependency as they work on the project.

Add a required plugin for your current project

Make sure the required plugin is installed.

Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Required Plugins .

On the Required Plugins page, click and select the plugin. Optionally, specify the minimum and maximum version of the plugin.

To specify the required version of WebStorm itself, add IDE Core to the list of required plugins.

The list of required plugins is stored in the .idea/externalDependencies.xml file of your project. When you open the project in WebStorm, it will notify you if the required plugin is disabled, not installed, or requires an update.

Required plugin is disabled

Click the link in the notification message to quickly enable, install, or update the required plugin.

Suggested plugins

When you open a project, WebStorm can suggest installing and enabling plugins based on libraries used in your project. Do not confuse suggested plugins with required plugins that you can manually add to a project so that your teammates also use it.

If you don’t need a particular plugin, you can prevent WebStorm from suggesting it. You can also use your notification settings to disable or enable notifications of all plugin suggestions and the way they are displayed.

Disable suggestions of a plugin

When a notification of a suggested plugin appears, click Don’t suggest this plugin .

Next time when you open a project, WebStorm will not suggest this plugin. You can still check your project for suggested plugins.

Check a project for suggested plugins

Press Ctrl+Shift+A and start typing Check Suggested Plugins .

Select the Check Suggested Plugins action.

If WebStorm has a plugin applicable to your project, you’ll see the notification message. Click the link in the notification message to install or enable the suggested plugin.

Custom plugin repositories

By default, WebStorm is configured to use plugins from the JetBrains Plugin Repository. This is a public repository where everyone can host their plugins. However, if you develop plugins for internal use only, you can set up a custom plugin repository for them.

For information about setting up a custom plugin repository, see the IntelliJ Platform SDK documentation.

Once you set up your plugin repository, add it to WebStorm:

Add custom repositories

Press Ctrl+Alt+S to open the IDE settings and select Plugins .

On the Plugins page, click and select Manage Plugin Repositories… .

In the Custom Plugin Repositories dialog, click and specify your repository URL. It must point to the location of the XML file that describes your plugin, for example, updatePlugins.xml . The file can be on the same server as your custom plugins, or on a dedicated one.

Click OK in the Custom Plugin Repositories dialog to save the list of plugin repositories.

Click OK in the Settings dialog to apply the changes.

When you search for plugins, WebStorm will show you results both from the default JetBrains Plugin Repository and any custom repositories that you specify. To browse only a certain custom plugin repository, type repository: followed by the URL of the repository in the search field on the Marketplace tab of the Plugins page. For example:

Alternatively, you can add your custom plugin repositories using the idea.plugin.hosts property:

From the main menu, select Help | Edit Custom Properties .

Add the idea.plugin.hosts property to the platform properties file and specify the URL of the XML file that describes your plugin. For example:

To add multiple URLs, separate them with semicolons ; .

You may want to replace the default JetBrains Plugin Repository with your custom plugin repository. This can be helpful if you want only your custom repository plugins to be available from WebStorm.

Replace the default plugin repository

From the main menu, select Help | Edit Custom Properties .

Add the idea.plugins.host property to the platform properties file and specify the URL of the application that can properly handle requests from WebStorm, that is, act as the default plugin repository application instead of JetBrains Plugin Repository.

In particular, it should handle the following requests:

If you replace the default plugin repository, the search field on the Marketplace tab of the Plugins dialog will browse only the plugins in the new default repository and any custom repositories that you add.

Productivity tips

Filter and sort search results

Type a forward slash / in the search string to see options for filtering and sorting search results. For example, you can add the following options to your search string to list only language-related plugins and sort them alphabetically by name:

Or you can search for all outdated plugins among the installed by typing:

Создание плагина для Intellij Platform (IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm and AppCode)

Привет, Хабр!
В данном топике я расскажу как создать простой плагин для IntelliJ IDEA и PyCharm. Так как все IDE содержат одинаковый интерфейс для работы с плагинами, то модификация его для других систем не требует значительных усилий (подробнее), в отличии от процесса непосредственной разработки.

Предупреждаю, что если вы решите создать свой плагин, то ожидаемый результат может сильно не соответствовать задуманному или потребует значительного времени. Если бы я знал, что получится и сколько я затратил времени, то вряд ли взялся бы.

Плагины пишутся на Java, UI создается на SWING. Документация для разработки плагинов состоит всего лишь из нескольких страниц и горстки примеров. На просторах интернета данная тематика не отражена совсем. Единственное, что слегка помогает это наличие исходных кодов у некоторых уже созданных плагинов.

Изначально я хотел создать окно в котором можно быстро и удобно выбрать описание стандартной библиотеки питона, но получилось плохо. Добавить ещё можно многое, хотя бы поиск и подсветку документации питона. Доделывать желания нет, пока проще по старинке использовать браузер.

Тогда начнем:

1) Подготовка среды

Плагины для IDE пишутся в IDE. Их придется установить и настроить.

Установка инструментов:

Нам потребуются:
— Java ( разработчики рекомендуют 1.6);
— IntelliJ IDEA Community Edition или Ultimate.(Я использовал первую, так как она бесплатная. Скачать можно здесь)

Настройка инструментов:

Необходимо настроить Java SDK и IntelliJ IDEA Plugin SDK:
— запускаем IntelliJ IDEA
— открываем пункт меню File | Project Structure
— выбираем вкладку SDKs, жмем на плюсик и выбираем путь к Java

— выбираем вкладку Project
— нажимаем на new, далее IntelliJ IDEA Plugin SDK и в открывшемся меню — выбираем путь к IntelliJ IDEA

Теперь можно создавать проекты плагинов.

2) Создание плагина

Плагин является обычной java программой, которая использует специальный открытый интерфейс для взаимодействия с IDE (это он только называется открытым, лучше бы closeapi назвали). Существует несколько основных видов плагинов: действие пользователя(AnAction), сервис(Service), расширения для других плагинов(Extension) и просто компоненты. Подробнее в документации. И хотя я не расширил ни одного плагина, в файле конфигурации я регистрировал именно его.

Создадим проект плагина

File | new project: Вводим имя, выбираем тип Plugin Module, выбираем SDK настроенный в шаге 1, создаем проект.


Далее в зависимости от разрабатываемого плагина действия будут индивидуальными. Я буду описывать как создавал свой плагин. За основу я взял пример плагина из документации — Tool Window. Чтобы получить его исходный код и код других примеров, необходимо скачать исходный код IDE.

Редактируем plugin.xml

После создания проекта появилась структура плагина и основной файл конфигурации — plugin.xml.

В нем мы будем регистрировать наши классы и производить их настройку. Подробнее об этом файле можно прочитать в документации.
Код файла:

Для своего плагина я добавил две строчки:

в секции idea-plugin:
com.intellij.modules.lang — для того чтобы данный плагин работал в PyCharme, если не указывать ни одной зависимости плагин будет работать только в IntelliJ IDEA. В этой секции также можно указывать необходимые зависимости для работы плагина.

в секции extensions:
— для запуска класса при старте IDE и его начальное расположение: anchor — положение окна, factoryClass — наш класс

Cоздаем класс и графический интерфейс

Так как у меня простое графическое окно, то я создаю класс из шаблона Gui Form, что позволит мне воспользоваться удобным графическим редактором для создания интерфейса. Добавляю необходимые элементы:

Получился вот такой класс:

Тут у нас панель с двумя вкладками, на первой список файлов, на второй текст из этого файла.
Расширяем данный класс интерфейсом ToolWindowFactory. При помощи него можно мой класс сделать частью IDE и добавить стандартные средства управления(иконки, возможность расположения в произвольном месте, масштабирование и тд)

Как я узнал о данном интерфейсе? — спросите вы.
Скопировал из примера, какие ещё бывают неизвестно и нигде не написано, один из путей — искать в исходниках других плагинов.

Реализуем требуемый метод данного интерфейса — createToolWindowContent, который вызывается при создании нашего окна. Интересные в нем только последние три строчки.

После добавления ещё двух функций( получение списка файлов и чтение из файла) плагин готов для следующего этапа.

3) Сборка плагина

Для использования плагина необходимо его определенным образом собрать:
Build | Prepare Plugin Module PyDoc for Deployment

Получаем в директории проекта jar файл с именем нашего проекта.

4) Устанавливаем плагин в IDE

Через настройки->Плагины->Загрузить с диска(выбираем jar полученный на предыдущем шаге) или jar файл копируем в папку plugins.

Выводы

К сожалению, разработчики и сообщество популярной линейки IDE, мало пишут о процессе создания плагинов, что не содействует их появлению и развитию. В итоге это похоже на поиск выхода из комнаты без единого источника света. Надеюсь мой пост даст некоторый толчок в данном направлении.

Так как почти все приходилось делать вслепую, возможно я где-то допустил ошибки. Буду благодарен если поправите в комментах или через личку.

Name already in use

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Example: How to setup a WebStorm-Plugin

This is an example how to setup a plugin for WebStorm or IntelliJ IDEA Ultimate.

The plugin only purpose is to add the action «TSLint Format» to the code menu of the main menu, which invokes com.intellij.lang.javascript.linter.tslint.fix.TsLintFileFixAction .

The plugin wants to access code from the TSLint plugin (provided only by the commercial JetBrains products above) and thus there was some more setup to do.

Setup your own plugin

  1. Create a new plugin via File->New. -> New Project. -> IntelliJ Platform Plugin
  2. Setup your target platform/SDK to Webstorm
  3. Add plugin-dependencies, you like to link to, to the SDK
    • The dependencies are located in the plugin-folder of the target-platform
    • Do not add them as separate dependency to the plugin module, but to the SDK — see forum
  4. Add dependencies to the plugin.xml
  • at compile time (provided by step 3)
  • at runtime (provided by step 3 and 4)

About

This is an example how to setup a plugin for WebStorm or IntelliJ IDEA Ultimate.

Русские Блоги

Веб -стор достаточно сильна, но иногда я надеюсь иметь другие дополнительные функции.

К счастью, есть достаточно плагинов.

Найдите нужный плагин, возьмите плагин миниатюр кода в качестве примера:https://plugins.jetbrains.com/plugin/7275-codeglance

Миниатюра кода может быть очень интуитивно понятным увидеть код кода, быстро найдите код в соответствующую позицию.

Нажмите на страницу плагина, вы можете увидеть этот плагин очень высокий: 5-звездочные похвалы

скачать:

Выберите версии (версия), нажмите на последнюю версию загрузки. Загрузите плагин в свой локально.

Установить

Выберите в полосу меню веб-таблицы File->Settings(Файл — настройка), затем найдите интерфейс настройкиПлагины-> Установите плагин с диска (плагин — плагин установки с диска)Затем выберите загруженный пакет плагинов. После завершения установки перезапустите веб-магазин, и вы не будете.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *