When I run my custom Idea plugin (spawning a new Idea instance) some changes I made are not showing up

Hello,

I have been developing a plugin that includes a new type of Run configuration and file types and the like, and that has been mostly successfull (Thanks to some of your help).  Now I am trying to make an Action in the form of a button or a right click context menu item.  I have watched the live coding demonstration with Dimitry and I copied almost exactly what he did.  This is what my plugin.xml looks like for the relatvent parts:

  <actions>     <!-- Add your actions here -->
      <action id="Foo" text="Foo" description="this is a test">           <add-to-group group-id="GenerateGroup" anchor="last"/>       </action>   </actions>



and I have a FooAction java class in the right package location:

public class FooAction extends AnAction {     public void actionPerformed(AnActionEvent e) {         System.out.println("Perform Foo action!!");     }     @Override     public void update(AnActionEvent e) {         System.out.println("Updating foo!");         e.getPresentation().setEnabled(true);     } }



I would expect that when I run the plugin and I right click in the editor I should get print statement of "Updateing foo!" and when I click on the Generate... item in the right click context menu I should see "Foo" as an option.  However I do not see these things.  The update method is not getting called, and I'm wondering if my changes are even being included when I'm running the plugin.

Is there anything any of you can tell that I'm doing wrong?  Anyone else see this happen before?

EDIT:
One thing I forgot to mention is that I made completely new plugin project where I only made the action that I have shown above.  When I ran the plugin, the action showed up propertly in the GenerateGroup action group (alt+insert; right click -> Generate...).  I don't know why in a seperate project this would work and in the old project it would not work.

Thanks,
Eric

2 comments

I seem to have fixed it, but it doesn't seem like it had anything to do with my code.  I ended up deleting the contents of my ~/.IdeaIC12/compile-server/[project-name]_[hash code] directory.  For whatever reason I see my new Action changes.  Does anyone know what that is? Or what may have happened to make it so I couldn't see my changes when I ran the plugin?

-Eric

0

This happened to me too, no idea why. I fixed it by removing the plugin in the spawned IntelliJ instance and adding it again.

Now it seems to work okay. A good way to test this is updating the version in your project's META-INF/plugin.xml and checking the version of your plugin in the spawned IntelliJ instance.

0

Please sign in to leave a comment.