5
votes

Image of the errors

I don't how to fix this red underlines I recently got in my routes files.

What I did: I split up my routes files into 3 files: - routes - rest.routes - web.routes And after I did, IntelliJ said something about "We have a new program that can handle .routes files" and I clicked yes to it. <-- Stupid me :(

Can also mention that I cant remember what addon that was installed, and I cant find any addons that differs from previous versions.

Before there was no "spellchecking" on the file, but now I get this box in top of the file saying "Project SDK is not defined 'Setup SDK' ". It also gives the red "undelining" similar to spellchecking under every single line of code in the file.

The code itself works great, its just very frustrating to have these red lines everywhere.

Anyone know how to get rid of it?

Highly appreciated!

3
can you add an image of the file from the intellijRon Badur
Please go to PreferencesEditorFile Types and search in the Recognized File Types table for Html Routing Support For Play 2 Framework. Make sure *.routes and Play 2 Framework routing file is registered as a pattern.Matthias A. Eckhart
I dont have that option "Html Routing Support For Play 2 Framework". However, under "Erlang Terms", I see a "*.routes" pattern registered. I cannot delete it. When I try, it just comes back.. do you know how to get the routing support thing to work? @MatthiasEckhartKristian N
@KristianN Can you please go to PreferencesEditorPlugins and check whether Playframework Support is listed in the table and enabled?Matthias A. Eckhart

3 Answers

3
votes

IntelliJ 2017.2 and Play Framework 1, I had this problem one day. Took me awhile to figure out but it was the Scala plugin that made this fail for me. After uninstalling the Scala plugin it works again.

1
votes

I also faced similar issue recently. The plugin that Intellij asks to install in this case is Erlang. You just have to uninstall it (or just suppress the warning).

To uninstall Erlang go to Preferences.. -> Plugins. Then search for Erlang and select. Then click uninstall (on the right pane).

enter image description here

0
votes
  1. First, setup Java SDK (even if you use scala)
  2. Second, try to compile code (run play application) and recheck routes files. I suggest that IDEA use compile routes classes to verify config.
  3. Third, check syntax of your conf/routes . Are you sure want use -> ?