MavenAction (MavenProject mavenProject, String actionId, String goal) { MavenGoalAction mavenGoalAction = new MavenGoalAction(mavenProject, goal); ActionManager manager = ActionManager.getInstance(); AnAction anAction = manager.getAction(actionId); if (anAction instanceof MavenGoalAction) { return (MavenGoalAction)anAction; } manager.replaceAction(actionId, mavenGoalAction); return mavenGoalAction; }