Dependency on 3rd party plugin (SonarLint)

Answered

Hi,

I would like to for users of our plugin to install also https://plugins.jetbrains.com/plugin/7973-sonarlint and it's API. I know there is depends tag but I suppose it's only for Jetbrains plugin?

Thank you. 

0
4 comments

No, 'depends' tag should work for all plugins. Just specify 'id' of the required plugin in it (org.sonarlint.idea for SonarLint plugin).

0

Thank for quick reply.

I am not sure but I saw message during installation of some plugin that is dependent on another plugin with confirm dialog that will be also installed. But when I use mentioned plugin id I am getting unresolved message on id text (it's red) and during installation there is only error message that another unknown plugin (but not mentioned which) and plugin won't load.

 

0

I am facing the same issue, my plugin depends on "org.eclipse.xtext.idea" plugin which is hosted at https://download.eclipse.org/modeling/tmf/xtext/idea/2.10.0/updatePlugins.xml

I am using <depends>org.eclipse.xtext.idea</depends> in my plugin's definition in plugins.xml file in my repository:

<?xml version="1.0" encoding="UTF-8"?>
<plugins>
    <!-- <plugin
        id="org.eclipse.xtext.idea"
        url="http://download.eclipse.org/modeling/tmf/xtext/idea/2.10.0/org.eclipse.xtext.idea-2.10.0.zip"
        version="2.10.0"
    /> -->
    <plugin
        id="my.plugin.id"
        url="my.plugin.url"
        version="1.0.0">
        <name>My Plugin Name</name>
        <description>
            My plugin description.
        </description>
        <depends>org.eclipse.xtext.idea</depends>
    </plugin>
</plugins>

Installation of my plugin fails (saying it couldn't load "org.eclipse.xtext.idea") until I uncomment the commented definition of the dependency "org.eclipse.xtext.idea" above. It'd be convenient if <depends> tag itself could support the url parameter in it like below:

<depends url="http://download.eclipse.org/modeling/tmf/xtext/idea/2.10.0/org.eclipse.xtext.idea-2.10.0.zip">org.eclipse.xtext.idea</depends>

This way we need not define a 3rd party (dependency) plugin inside our repository's plugins.xml. What do you think?

0

Also, how does the manifest file work for supporting depends tag? I see in this file that there are two kinds of depends:

  • <depends>(optional) com.intellij.modules.java</depends>
  • <depends>Subversion</depends>

Is this the standard format for supporting optional and non-optional dependencies?

0

Please sign in to leave a comment.