Updates to IntelliJ config files in develop

LabKey Support Forum
Updates to IntelliJ config files in develop Susan Hert  2021-04-26 11:43
Status: Closed
 

I have just merged PR #66 in the LabKey/server repository to bring in some changes to the IntelliJ configuration files and to add a couple of tasks for setting up IntelliJ to use the LabKey default configurations.  These changes should mean you have to adjust fewer IntelliJ configurations manually when starting with a new enlistment and have fewer files in your "Never Commit These" change list.  The changes work best with IntelliJ Version 2021.1 or later.  Older (but not ancient) versions work as well but require more manual adjustment.

To avoid conflicts between the configuration files that this change deleted and the ones that get modified by Intellij for your local installation, please do the following before pulling down these changes:

  • Shut down IntelliJ
  • Make a copy of your .idea directory (just in case)
  • Stash the current changes in the .idea directory using git stash push -- .idea/ from the root of your LabKey enlistment
  • git pull
  • ./gradlew ijConfigure
  • Open your existing project in IntelliJ

Then:

  • Open your project in IntelliJ
  • Do a Refresh in the Gradle window.
  • If you are not using IntelliJ version 2021.1 or later
    • Edit the LabKey Dev configuration to fix the module classpath so it uses labkey-server.server.modules.platform.api.main
    • Edit the LabKey Production configuration to fix the module classpath so it uses labkey-server.server.modules.platform.api.main

If you are developing with TypeScript:

  • Go to Preferences -> Appearance & Behavior -> Path Variables and set a value for NODE_PATH that will point to the node binary used by the build (e.g., C:\Development\labkeyHome\build.node\node-v12.16.0\bin\node, or, for Mac or Linux, use the symlink created by the build that is version-independent: /Users/develop/labkeyHome/.node/node/bin/node).
  • Go to Preferences -> Languages & Frameworks -> Typescript and verify the Node interpreter settings. The interpreter should be pointing to the node version that you set as the NODE_PATH variable. If not, or if you need to change this at some point, you can do that here.

For instructions on setting up a development environment from scratch, see this page.

If you have any problems that seem related to these changes, please let us know.

Susan