1

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 a video of what I mean

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>
BenC
  • 98
  • 4

1 Answers1

1

Use Run | Reload Changed Classes action. See Reload modified classes for more context.

Andrey
  • 15,144
  • 25
  • 91
  • 187
  • Thanks! It just took me a day to figure out. Though I would add it's only works when running the `runIde` task in Debug – mati.o Jul 09 '20 at 20:38