IntelliJ IDEA Plugin development, how can I get the MavenProjectsManager instance?

天涯浪子 提交于 2020-01-23 16:27:32

问题


How can I get the MavenProjectsManager instance?

  1. Is there a service, component or something else that goes in the plugin.xml to instantiate the MavenProjectsManager instance?

    MavenProjectsManager manager = MavenProjectsManager.getInstance(project);

My plugin.xml file so far:

<idea-plugin version="2">
    <id>com.arcbees.plugin.idea</id>
    <name>GWT-Platform (GWTP) IntelliJ IDEA Plugin</name>
    <version>1.0.0</version>
    <vendor email="support@arcbees.com" url="http://www.arcbees.com">ArcBees</vendor>

    <description><![CDATA[
      The GWTP IDEA plugin provides tools for GWT-Platform framework in IntelliJ IDEA.<br>
      ]]></description>

    <change-notes><![CDATA[
      Project Creation by Archetype added (8/30/2013).<br>
      ]]>
    </change-notes>

    <!-- please see http://confluence.jetbrains.net/display/IDEADEV/Build+Number+Ranges for description -->
    <idea-version since-build="107.105"/>

    <depends>org.jetbrains.idea.maven</depends>

    <application-components>
    </application-components>

    <project-components>
    </project-components>

    <actions>
    </actions>

    <extensions defaultExtensionNs="com.intellij">

        <moduleType id="GWTP_CREATE_PROJECT_MODULE"
                    implementationClass="com.arcbees.plugin.idea.moduletypes.CreateProjectModuleType"
                    classpathProvider="true"/>

        <wizardMode implementation="com.arcbees.plugin.idea.wizards.createproject.CreateProjectWizard"/>

    </extensions>

</idea-plugin>

回答1:


  1. Download the community version
  2. If on a mac, Show package contents of the Community Version
  3. Open the package, seek out the plugins directory with the maven plugin jar.
  4. Add that jar to a location where you can remember it in the file system.
  5. Goto the plugin, open module settings.
  6. Goto the SDK's and find the IntelliJ IDEA SDK and add the maven jar to the SDK jar list.


来源:https://stackoverflow.com/questions/18804953/intellij-idea-plugin-development-how-can-i-get-the-mavenprojectsmanager-instanc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!