Add custom module dependency to UnrealEd module

I need to extend the editor by adding some processing over the currently loaded world. I’ve added all the UI things (under the Build toolbar menu), now it’s turn to actually call functionality.

The functionality itself is in the custom editor module. So I’ve added dependency to the UnrealEd module pointing to my custom module. However, it’s not working. When I call generateprojectfile.bat

Binding IntelliSense data… 0%ERROR: Couldn’t find module rules file for module ‘MyCustomModule’.
GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files.
Press any key to continue . . .

module rules file is of course where it should be and everything builds fine until I add

PrivateIncludePathModuleNames.Add(“MyCustomModule”) to the UnrealEd.Build.cs

Is it possible to add dependency to the engine/editor module pointing to the custom module? Or the only way is to create the module right near the UnrealEd module (or even add code in the module itself)?