How to trigger an action on Application startup or restart
已回答
Hi team,
I am working on a plugin, where I have a requirement to run an action on Application StartUp, So I tried the following code but did not worked for me
package com.dbs.codeshare.handlers;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupActivity;
import com.intellij.openapi.ui.Messages;
import org.jetbrains.annotations.NotNull;
public class StartUpWork implements StartupActivity{
@Override
public void runActivity(@NotNull Project project) {
Messages.showInfoMessage("Triggering action","Demo");
}
}
Tried this for sample demo didn't work for us......Can you please help what else I have to do or If I am using wrong approach please correct us.
Please respond us asap this is an urgent requirement to finish this plugin
Thank you :)
请先登录再写评论。
Thanks :)