Cannot Open Play Framework 2.3.4 routes file

Hi,

I cannot open my Play Framework routes file, it does not open in the editor. It was working until a couple of days ago. Although back then, when I could open it, Command+B, to go to the declaration, did not work. But let's ignore the second problem for now. :)

I am on IntelliJ 15.0.3, Scala plugin 2.2.0

I see the following error in the IntelliJ logs. So something with formatting, but I don't know what. As far as I can recall, I did not recently change any of my formatting preferences.

java.lang.NullPointerException
at com.intellij.scala.play.language.formatting.Play2FormattingModelBuilder.createModel(Play2FormattingModelBuilder.scala:32)
at com.intellij.psi.codeStyle.autodetect.IndentOptionsDetectorImpl.a(IndentOptionsDetectorImpl.java:71)
at com.intellij.psi.codeStyle.autodetect.IndentOptionsDetectorImpl.getIndentOptions(IndentOptionsDetectorImpl.java:56)
at com.intellij.psi.codeStyle.autodetect.DetectableIndentOptionsProvider.getIndentOptions(DetectableIndentOptionsProvider.java:56)
at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:672)
at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:636)
at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:631)
at com.intellij.openapi.editor.impl.SettingsImpl.b(SettingsImpl.java:334)
at com.intellij.openapi.editor.impl.SettingsImpl.reinitSettings(SettingsImpl.java:319)
at com.intellij.openapi.editor.impl.EditorImpl.reinitSettings(EditorImpl.java:795)
at com.intellij.openapi.editor.impl.EditorImpl.setHighlighter(EditorImpl.java:1186)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.d(TextEditorComponent.java:168)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.<init>(TextEditorComponent.java:100)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:62)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:55)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:44)
at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.<init>(TextEditorImpl.java:46)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.<init>(PsiAwareTextEditorImpl.java:38)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider$1.build(PsiAwareTextEditorProvider.java:77)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$13.run(FileEditorManagerImpl.java:873)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2382)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:855)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:789)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$10.run(FileEditorManagerImpl.java:769)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:117)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:766)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:707)
at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:151)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$16.run(FileEditorManagerImpl.java:1143)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:124)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openEditor(FileEditorManagerImpl.java:1139)
at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigateInAnyFileEditor(OpenFileDescriptor.java:146)
at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigateInEditor(OpenFileDescriptor.java:132)
at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigateInEditorOrNativeApp(OpenFileDescriptor.java:128)
at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigate(OpenFileDescriptor.java:115)
at com.intellij.ide.actions.GotoFileAction$1$1.run(GotoFileAction.java:86)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:337)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:321)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:866)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

5 comments
Comment actions Permalink
Official comment

Please share route file source.

Comment actions Permalink

I deleted all routes except one, and it still happens. I wonder if it is some preference setting or something is corrupted? Here is my narrowed down version of the routes file, which I still can't open:

GET /platform controllers.Platform.index()

 

Other people on my team using IntelliJ can open the file.

 

Thanks,

 

Charles

0
Comment actions Permalink

I forwarded your problem to the responsible developer.

0
Comment actions Permalink

Hello, 

 

could you try disable indents detection? Settings/Editor/Code Style : http://puu.sh/n3ZvQ/4dd0094f9e.png

0
Comment actions Permalink

Hi Dmitry,

It now works when I disable indents detection.

 

Thanks,

 

Charles

0

Please sign in to leave a comment.