英文:
How do you trigger auto reloading of plugins in Intellij Idea CE 2020.1 build 201.6668.60
问题
以下是您要翻译的内容:
我有一个简单的IntelliJ平台插件项目,在构建或启用/禁用后似乎无法正确重新加载。需要哪些步骤来触发重新加载?
这是我的插件代码
package benconvey.adaideplugin.actions;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import org.jetbrains.annotations.NotNull;
public class BensAction extends AnAction {
@Override
public void actionPerformed(@NotNull AnActionEvent event) {
Project currentProject = event.getProject();
Messages.showMessageDialog(currentProject, "Hello", "Say Hello", Messages.getInformationIcon());
}
}
<idea-plugin>
<id>org.example.testing</id>
<name>在此处插件显示名称</name>
<vendor email="support@yourcompany.com" url="http://www.yourcompany.com">YourCompany</vendor>
<description><![CDATA[
在这里输入插件的简短描述。<br>
<em>可以使用大多数HTML标签</em>
]]></description>
<!-- 请参阅 https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
了解如何针对不同的产品进行定位 -->
<depends>com.intellij.modules.platform</depends>
<extensions defaultExtensionNs="com.intellij">
<!-- 在这里添加您的扩展 -->
</extensions>
<actions>
<action id="benconvey.adaideplugin.actions.BensAction" class="benconvey.adaideplugin.actions.BensAction"
text="Say Hello">
<add-to-group group-id="EditMenu" anchor="first"/>
</action>
</actions>
</idea-plugin>
英文:
I have a simple intellij platform plugin project that doesn't seem to reload properly after I build or enable / disable it. What steps are needed to tigger the reloading?
Here's my plugin code
package benconvey.adaideplugin.actions;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import org.jetbrains.annotations.NotNull;
public class BensAction extends AnAction {
@Override
public void actionPerformed(@NotNull AnActionEvent event) {
Project currentProject = event.getProject();
Messages.showMessageDialog(currentProject, "Hello", "Say Hello", Messages.getInformationIcon());
}
}
<idea-plugin>
<id>org.example.testing</id>
<name>Plugin display name here</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 https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
on how to target different products -->
<depends>com.intellij.modules.platform</depends>
<extensions defaultExtensionNs="com.intellij">
<!-- Add your extensions here -->
</extensions>
<actions>
<action id="benconvey.adaideplugin.actions.BensAction" class="benconvey.adaideplugin.actions.BensAction"
text="Say Hello">
<add-to-group group-id="EditMenu" anchor="first"/>
</action>
</actions>
</idea-plugin>
答案1
得分: 1
使用 "运行" | 重新加载更改的类
操作。有关更多上下文,请参阅重新加载修改后的类。
英文:
Use Run | Reload Changed Classes
action. See Reload modified classes for more context.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论