Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException in TableGenerator.kt:129 uncaught in plugin #139

Closed
fallenarchon opened this issue Feb 19, 2016 · 6 comments · Fixed by #163
Closed

IllegalStateException in TableGenerator.kt:129 uncaught in plugin #139

fallenarchon opened this issue Feb 19, 2016 · 6 comments · Fixed by #163

Comments

@fallenarchon
Copy link
Contributor

Adding a .sq file outside of expected /src/main/sqldelight directory throws exception that plugin doesn't catch. Intellij/Android Studio 'helpfully' suggests disabling plugin.

Minimum fix would cause an error balloon to display. Desired fix would be to present user with action to move new file to desired file structure.

@fallenarchon
Copy link
Contributor Author

I'd try to submit a fix myself, but I'm having issues importing the gradle projects into Intellij 15 CE. Has anyone encountered something similar?

On mobile, so I can't give more details at the moment

@AlecKazakova
Copy link
Collaborator

What issues are you seeing trying to import?

@JakeWharton
Copy link
Member

Please include the full stack trace of the error from going to "Help > Show Log".

If you are having problems with developing the plugin please file another issue for that specific failure.

@fallenarchon
Copy link
Contributor Author

Files must be organized like src/main/sqldelight/...
java.lang.IllegalStateException: Files must be organized like src/main/sqldelight/...
    at com.squareup.sqldelight.TableGeneratorKt.relativePath(TableGenerator.kt:129)
    at com.squareup.sqldelight.generating.TableGenerator$Companion.create(TableGenerator.kt:112)
    at com.squareup.sqldelight.generating.SqlDocumentAnnotator.collectInformation(SqlDocumentAnnotator.kt:34)
    at com.squareup.sqldelight.generating.SqlDocumentAnnotator.collectInformation(SqlDocumentAnnotator.kt:30)
    at com.intellij.lang.annotation.ExternalAnnotator.collectInformation(ExternalAnnotator.java:55)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.collectInformationWithProgress(ExternalToolPass.java:99)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1103)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:432)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:189)
    at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
    at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
    at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
    at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)

@JakeWharton
Copy link
Member

👍

We just need to flag it in the project view as erroneous with a red squiggly if possible.

@fallenarchon
Copy link
Contributor Author

That works too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants