Conversation
In some contexts you're supposed to provide a simple DQL expression instead of the whole query. An example of such place would be the OpenPipeline matchers, where you need to provide a DQL expression returning boolean value, or Monaco scripts that are including any type of expression. To solve the issue of such files not being correctly supported, the plugin introduces the `.eqdl` file extension which contains "expression DQL".
There was a problem hiding this comment.
Pull request overview
This PR introduces support for "Expression DQL" (EDQL) files with the .edql extension, enabling DQL expressions to be defined without requiring a full query command context. This addresses use cases like OpenPipeline matchers and Monaco scripts where only expressions are needed.
Changes:
- Added new EDQL file type infrastructure including language definition, parser, file type, and completion contributor
- Modified DQL grammar to remove root-level comment handling and support expression-only parsing
- Updated several components to handle nullable parent queries for EDQL expressions that lack query context
- Enhanced documentation providers for string elements in both DQL and DPL
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/messages/DQLBundle.properties | Added documentation label for string content |
| src/main/resources/messages/DPLBundle.properties | Added documentation label for string content |
| src/main/resources/META-INF/plugin.xml | Registered EDQL file type and associated language services |
| src/main/java/pl/thedeem/intellij/edql/completion/EDQLCompletionContributor.java | Implemented code completion for EDQL files |
| src/main/java/pl/thedeem/intellij/edql/EDQLParserDefinition.java | Defined parser configuration for EDQL language |
| src/main/java/pl/thedeem/intellij/edql/EDQLLanguage.java | Created EDQL language definition |
| src/main/java/pl/thedeem/intellij/edql/EDQLFileType.java | Implemented file type descriptor for EDQL files |
| src/main/java/pl/thedeem/intellij/edql/EDQLFile.java | Created PSI file representation for EDQL |
| src/main/java/pl/thedeem/intellij/dql/style/DQLBlock.java | Fixed indentation for top-level expressions in EDQL files |
| src/main/java/pl/thedeem/intellij/dql/psi/elements/impl/FieldNameElementImpl.java | Changed parent query return type to nullable |
| src/main/java/pl/thedeem/intellij/dql/psi/elements/FieldElement.java | Updated interface to allow nullable parent queries |
| src/main/java/pl/thedeem/intellij/dql/inspections/expressions/SortingKeywordInspection.java | Adjusted validation logic for missing parameters owner |
| src/main/java/pl/thedeem/intellij/dql/inspections/expressions/InvalidFieldWriteOperationInspection.java | Fixed control flow for cases without parameters owner |
| src/main/java/pl/thedeem/intellij/dql/indexing/ReferenceVariantsCalculator.java | Added null checks for parent query |
| src/main/java/pl/thedeem/intellij/dql/documentation/providers/DQLStringDocumentationProvider.java | Created dedicated documentation provider for DQL strings |
| src/main/java/pl/thedeem/intellij/dql/documentation/DQLDocumentationProvider.java | Updated to use new string documentation provider |
| src/main/java/pl/thedeem/intellij/dql/actions/ActionUtils.java | Added check for DQL queries in files |
| src/main/java/pl/thedeem/intellij/dql/ExpressionDQLParser.java | Implemented parser for expression-only DQL |
| src/main/java/pl/thedeem/intellij/dpl/documentation/providers/DPLStringDocumentationProvider.java | Enhanced DPL string documentation with content section |
| src/main/java/pl/thedeem/intellij/common/psi/PsiUtils.java | Added null check to prevent empty list issues |
| src/main/grammar/dql.bnf | Simplified grammar by removing root-level comments |
| src/main/grammar/dpl.bnf | Removed root-level comment handling from grammar |
| CHANGELOG.md | Documented the new EDQL feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...va/pl/thedeem/intellij/dql/inspections/expressions/InvalidFieldWriteOperationInspection.java
Show resolved
Hide resolved
Qodana for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.3.1
with:
upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com
|
In some contexts you're supposed to provide a simple DQL expression instead of the whole query.
An example of such place would be the OpenPipeline matchers, where you need to provide a DQL expression returning boolean value, or Monaco scripts that are including any type of expression.
To solve the issue of such files not being correctly supported, the plugin introduces the
.eqdlfile extension which contains "expression DQL".