⬆️ ⬇️

fasten Idea plugins to WebIde

Today, successfully completing the writing of one small but very useful plug-in for IDEA for me personally, I was upset by the inability to fasten it to WebIDE, although the Idea 7/8/9 flight is normal.

So, having risen and taken up a comparative analysis of the “old” and “new / kosher” plug-ins, I found a way to tie almost any IDEA plugin to JetBrains WebIDE, and I hurry to share it :)



I used “ almost ” because it was far from being tested on everything, but on everything I tried it worked. I don’t promise to give you a 100% performance method, and it’s difficult to predict how the plugin will behave, but I haven’t found any problems so far.



We will fasten on the example of EmbeddedBrowser , because a few days ago I had an urgent need for it, which I successfully satisfied only today.



so:

  1. Swinging
  2. Unpack the folder with the plugin in {webide_home} / plugins /
  3. We launch WebIde. plugin is not picked up? ay-ay, i knew it: P
  4. In {webide_home} / plugins / EmbeddedBrowser / META-INF open the plugin.xml file

    which looks like this:

    <! DOCTYPE idea-plugin PUBLIC "Plugin/DTD" "http://plugins.intellij.net/plugin.dtd" >

    < idea-plugin >

    < name > EmbeddedBrowser </ name >




    * This source code was highlighted with Source Code Highlighter .


    and add a little bit of new:

    ')

    <! DOCTYPE idea-plugin PUBLIC "Plugin/DTD" "http://plugins.intellij.net/plugin.dtd" >

    < idea-plugin version ="2" >

    < depends > com.intellij.modules.xml </ depends >


    < name > EmbeddedBrowser </ name >

    ...




    * This source code was highlighted with Source Code Highlighter .




  5. Save
  6. Run
  7. Hooray! The plugin was successfully picked up, in the Tools menu a wonderful item Embedded Browser appeared
  8. urgently setapayem all that was in IDEA and what was lacking in WebIDE




If it is not difficult, unsubscribe from someone that has “taken off”, and who does not. to deliver if necessary

Anyone could search for the result of an attempt to comment and not make unnecessary movements.



... and may the WebIDE developers forgive me for "burning the topic"



ZY: and finally about the mentioned small, but useful plugin:

I am lazy and breaks every time I type the same type of text like " function () {} ", " this. / $ this-> ", etc. If earlier I, in general, had enough “macros” in UltraEdit and IDEA, then in WebIDE, macros still do not work, and in IDEA 8 they do not depend on the context in which context they are executed.



Behind this, I made a plugin for myself, which by clicking on a hotkey inserts into the editor corresponding "phrases" that may differ depending on the language (Java - "this.", PHP - "$ this->").



in the current incarnation, the plugin allows:

- specify in the template where to put the cursor after insertion

- where inside the template to insert the selected piece of text (if there was a selection)

- and allows you to re-read the configuration without opening / closing the IDE.



configs are stored in an XML file inside a folder with a plugin and are corrected "in notepad". made clumsy and rude, but it seems reliably and, so far, suits me. if you want to try - let me know. although this is a “trick for an amateur”, I'm not sure that many will like it.

Source: https://habr.com/ru/post/76622/



All Articles