While you can create a project from VCS sources in IntelliJ this is not recommended, it is better to use the Gradle tasks from the command line to do all the git cloning for the framework, runtime, and all the components you want. For instructions on this see the Source Management Guide and the Run and Deploy document. With the source all cloned:
Once the window comes up you should see a message that says Unregistered VCS roots detected. Click on that, or go to the Version Control pane in the Settings dialog (File => Settings). There is will list the directories for all git repositories under Unregistered roots. Click on each and then on the green plus sign on the right.
This will give you the basic setup. As you update moqui-framework and others getting new build.gradle files IntelliJ will tell you its Gradle configuration is out of date. Click on the notification or the Gradle button (usually on the far right), then click on the blue circle/arrows button on the left to Refresh all Gradle projects.
IntelliJ requires some configuration to tell it which local file has the XSD for a given schema location.
The easiest and best way to set up the XML Schemas is to run the following in a moqui-framework repo:
Thanks to Taher's PR here.
To do this manually, open an existing Entity Definition, Service Definition, XML Screen, Service REST API, or other XML file and copy the value of the
xsi:noNamespaceSchemaLocation attribute on the root element. Once you have the schema location copied, open the Settings dialog (File => Settings) and type in 'schema' in the search box to quickly get to the Languages & Frameworks => Schemas and DTDs pane. Once there:
In the Settings dialog (File => Settings) go to the Editor => Language Injections section. You will want one for at least the
script element and nice to have them for attributes like
script and other elements:
For attributes it is the same except use XML Attribute Injection and specify the XML Attribute => Local Name. You can limit this to the attribute on specific elements, but that extra work is probably only worth it if you run into issues when editing other (non-Moqui) XML files with the same attribute names.