Skip to content

Fix Idea Plugin ClassCastException - CreateIndex and CreateView #5772

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

griffio
Copy link
Collaborator

@griffio griffio commented May 28, 2025

fixes #5773

Exception when using SqlDelight Plugin with PostgreSql Dialect statements CREATE INDEX or CREATE VIEW

Stuck in Analyzing state - means that annotation errors won't get displayed

java.lang.ClassCastException: Don't use #getElementType method. It is deprecated. 
Implement and use #getIElementType ...

Add SchemaContribStub constructor and add copy of ElementType class as sql-psi has internal visibility for existing SqlSchemaContributorElementType

Tested locally now shows green tick or any annotation errors are detected - some way to add test?

Further testing - sometimes I get error in Intellij - need to check new class CreateIndexElementType

java.lang.Throwable: All stub element types should be created before index initialization is complete.
Please add the class app.cash.sqldelight.dialects.postgresql.grammar.mixins.CreateIndexElementType with external ID sqldelight.null containing stub element type constants to "stubElementTypeHolder" extension.
Registered extensions: [com.intellij.util.xml.stubs.DomElementTypeHolder, ...

  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

griffio added 2 commits May 28, 2025 13:46
 CreateIndex and CreateView

java.lang.ClassCastException: Don't use #getElementType method. It is deprecated.
Implement and use #getIElementType
@griffio griffio marked this pull request as ready for review August 9, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Plugin with PostgreSql Dialect - CREATE INDEX and CREATE VIEW exception when 'analyzing'
1 participant