Adding code completion in IntelliJ for existing Java-centric project

Hi all,

I’m using Gatling as a functional testing and load testing tool inside a Maven based Java EE 7 REST API project. I’m using IntelliJ 13 Ultimate as my IDE. The problem is, that Gatling was added after the project was already setup, so I couldn’t use the Maven Gatling archetype.
We’ve made a few simple Gatling scenarios, using only exec/http/get/post which are running just fine through the Gatling maven plugin. However, IntellIiJ doesn’t seem to “get” Gatling/Scala. I have the Scala plugin installed and other Scala-only projects do code-completion and formatting just fine. With this Java project, I can’t even command-click to get to a method definition. So far, nothing showed up as errors though, until I started using asLongAs, in which IntelliJ doesn’t recognize the session variable.

Anyone have any tips on how to fix this?

Regards,

Daan

Hi,

I can’t help with IntelliJ, sorry. Hopefully someone else will answer.
As you workaround, you could maybe move your Gatling tests into a dedicated pure Scala module?

Regards,

Stéphane

We managed to solve the issue!

Adding the following to the pom.xml of the respective module, solved the issue:

Ah, OK, so that was a maven issue more than an IntelliJ one.

I would have though that this solution would ditch the regular java directories.
Another solution is to use the build-helper-plugin.

Cheers,

Stéphane