本文介绍了IntelliJ IDEA插件开发,如何获得MavenProjectsManager实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取MavenProjectsManager实例?

How can I get the MavenProjectsManager instance?

  1. plugin.xml中是否存在用于实例化MavenProjectsManager实例的服务,组件或其他东西?

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

MavenProjectsManager管理器= MavenProjectsManager.getInstance(project);

MavenProjectsManager manager = MavenProjectsManager.getInstance(project);

到目前为止,我的plugin.xml文件:

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="[email protected]" 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. 下载社区版本
  2. 如果在Mac上,请显示社区版本的软件包内容
  3. 打开软件包,使用maven插件jar查找plugins目录.
  4. 将该罐子添加到可以在文件系统中记住它的位置.
  5. 转到插件,打开模块设置.
  6. 转到SDK并找到IntelliJ IDEA SDK并将Maven jar添加到SDK jar列表中.

这篇关于IntelliJ IDEA插件开发,如何获得MavenProjectsManager实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-18 12:49