[DQL] Added toggle button for external DQL validations#134
[DQL] Added toggle button for external DQL validations#134dorian-krefft-dt merged 4 commits intomainfrom
Conversation
…s nothing to validate
There was a problem hiding this comment.
Pull request overview
This pull request adds a toggle button to enable/disable external DQL validation on a per-file basis. Previously, this validation could only be controlled globally through plugin settings. The PR also includes a refactoring that changes several Objects.requireNonNullElse calls to Objects.requireNonNullElseGet for better performance by using lazy evaluation.
Changes:
- Added a new toggle action (
ToggleExternalValidationAction) that allows users to control external validation per file via the DQL Execution Toolbar - Modified
DQLVerificationAnnotatorto check per-file validation preference first, falling back to global settings - Refactored multiple instances of
Objects.requireNonNullElsetoObjects.requireNonNullElseGetfor lazy evaluation of default values
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/messages/DQLBundle.properties | Added localized strings for the new toggle validation action |
| src/main/java/pl/thedeem/intellij/dql/settings/DQLSettings.java | Added EXTERNAL_VALIDATION_ENABLED Key for storing per-file validation preference |
| src/main/java/pl/thedeem/intellij/dql/services/query/DQLQueryConfigurationServiceImpl.java | Refactored to use lazy evaluation in configuration creation methods |
| src/main/java/pl/thedeem/intellij/dql/inspections/external/DQLVerificationAnnotator.java | Updated to check per-file validation setting before global setting; added @NotNull annotations |
| src/main/java/pl/thedeem/intellij/dql/exec/panel/DQLQueryConsolePanel.java | Refactored to use lazy evaluation for query configuration |
| src/main/java/pl/thedeem/intellij/dql/editor/gutter/DQLQueryConfigurationLineMarkerProvider.java | Added data key to hide validation option in gutter marker context |
| src/main/java/pl/thedeem/intellij/dql/editor/actions/ToggleExternalValidationAction.java | New toggle action implementation for per-file external validation control |
| src/main/java/pl/thedeem/intellij/dql/editor/actions/StartStopDQLExecutionAction.java | Refactored to use lazy evaluation for configuration retrieval |
| src/main/java/pl/thedeem/intellij/dql/editor/actions/QueryConfigurationAction.java | Added toggle validation action to the query configuration menu |
| src/main/java/pl/thedeem/intellij/dql/documentation/providers/BaseDocumentationProvider.java | Refactored to use lazy evaluation for documentation message retrieval |
| src/main/java/pl/thedeem/intellij/dql/actions/ExecuteDQLQueryAction.java | Refactored to use lazy evaluation for execution name |
| src/main/java/pl/thedeem/intellij/dpl/psi/elements/impl/ExpressionElementImpl.java | Code formatting improvements (line breaks) |
| src/main/java/pl/thedeem/intellij/dpl/inspections/configuration/ConfigurationNotSupportedInspection.java | Code formatting improvements (line breaks) |
| src/main/java/pl/thedeem/intellij/dpl/documentation/providers/DPLConfigurationParameterDocumentationProvider.java | Refactored to use lazy evaluation for bundle message retrieval |
| src/main/java/pl/thedeem/intellij/dpl/definition/DPLDefinitionServiceImpl.java | Code formatting improvements (line breaks) |
| src/main/java/pl/thedeem/intellij/common/sdk/errors/DQLInvalidResponseException.java | Refactored to use lazy evaluation with method reference |
| src/main/java/pl/thedeem/intellij/common/sdk/errors/DQLDetailedErrorException.java | Code formatting improvements (line breaks) |
| CHANGELOG.md | Documented the new per-file validation toggle feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/pl/thedeem/intellij/dql/editor/actions/ToggleExternalValidationAction.java
Show resolved
Hide resolved
src/main/java/pl/thedeem/intellij/dql/settings/DQLSettings.java
Outdated
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
|
Uh oh!
There was an error while loading. Please reload this page.