RunConfiguration (@Nullable String name, @NotNull RunConfiguration template) { PluginRunConfiguration pluginRunConfiguration = (PluginRunConfiguration)template; if (pluginRunConfiguration.getModule() == null) { Collection<Module> modules = ModuleUtil.getModulesOfType(pluginRunConfiguration.getProject(), PluginModuleType.getInstance()); pluginRunConfiguration.setModule(ContainerUtil.getFirstItem(modules)); } return super.createConfiguration(name, pluginRunConfiguration); }