<idea-plugin>
<id>com.magicbytes.kotlin-converter-plugin</id>
<name>Kotlin Converter Gradle</name>
<vendor email="support@yourcompany.com" url="http://www.yourcompany.com">YourCompany</vendor>
<description>
<![CDATA[
Enter short description for your plugin here.<br>
<em>most HTML tags may be used</em>
]]></description>
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
<idea-version since-build="162" />
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
on how to target different products -->
<!-- uncomment to enable plugin in all products
<depends>com.intellij.modules.lang</depends>
-->
<extensions defaultExtensionNs="com.intellij">
</extensions>
<actions>
<group id="MyPlugin.SampleMenu" text="Greeting" description="Greeting menu">
<add-to-group group-id="MainMenu" anchor="last" />
<action id="Myplugin.Textboxes" class="ThirdAction" text="Hello" description="Says hello" />
</group>
</actions>
</idea-plugin>
plugins {
id 'org.jetbrains.intellij'
version '0.3.0'
}
group 'com.magicbytes'
version '0.0.1'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
intellij {
version '2017.3.5'
}
intellij {
plugins 'kotlin'
}
patchPluginXml {
changeNotes ""
}
当我使用 KtVisitor 时,我遇到的问题是以下异常:
Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.psi.KtVisitor PluginClassLoader[com.magicbytes.kotlin-converter-plugin, 0.0.1] com.intellij.ide.plugins.cl.PluginClassLoader@7591f7
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 28 mor**
答案 0 :(得分:0)
首先,您没有说您是如何运行调试IDE的。我假设你正在使用IDEA构建而不是gradle,我的猜测是正确的。请在下次给出更清晰的说明。
两个步骤(根据我的评论和你的回复):
id 'org.jetbrains.intellij'
更改为您的真实软件包名称,以避免与现有IDEA插件冲突(可能是IDEA核心使用此ID)。gradle runIde
命令启动调试IDE。