Skip to content

Comments

Added support for DQLPart language#123

Merged
dorian-krefft-dt merged 4 commits intomainfrom
feature/dql/dql-part
Feb 8, 2026
Merged

Added support for DQLPart language#123
dorian-krefft-dt merged 4 commits intomainfrom
feature/dql/dql-part

Conversation

@dorian-krefft-dt
Copy link
Collaborator

The language is a better option than the DQL file name part as it is much easier to disable some parts of the language feature support when the file type is different.

Also, it allows to specify that this is a partial file for IntelliJ annotations:

public class Example {
    public static final String BASE_QUERY = /* language=DQL */ """
            fetch events, bucket: {"my-bucket"}, from: -1h
            """;

    public String generateQuery(boolean withFilter) {
        String query = BASE_QUERY;
        if (withFilter) {
            query += /* language=DQLPart */ """
                      | filter event.provider == "my-provider"
                    """;
        }
        return query;
    }
}

The language is a better option than the DQL file name part as it is much easier to disable some parts of the language feature support when the file type is different.
@dorian-krefft-dt dorian-krefft-dt self-assigned this Feb 8, 2026
Copilot AI review requested due to automatic review settings February 8, 2026 17:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated DQLPart language/file type (.dqlpart) to better support DQL query fragments (e.g., for string injection / dynamic query building), and introduces migration tooling away from legacy *.partial.dql naming.

Changes:

  • Register new DQLPart language + file type and reuse DQL lexer/parser/highlighting infrastructure for fragments.
  • Add an inspection + quick-fix to migrate .partial.dql suffix usage to .dqlpart.
  • Update existing inspections/docs/changelog to reference the new .dqlpart approach.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main/resources/messages/DQLBundle.properties Adds new inspection messages and renames metric series migration keys
src/main/resources/inspectionDescriptions/DQLPartialFileMigration.html Adds description for the new partial-file migration inspection
src/main/resources/META-INF/plugin.xml Registers DQLPart file type/language and new inspection; updates metric-series inspection key
src/main/java/pl/thedeem/intellij/dqlpart/DQLPartParserDefinition.java New parser definition for DQLPart using existing DQL lexer/parser
src/main/java/pl/thedeem/intellij/dqlpart/DQLPartLanguage.java New language ID declaration for DQLPart
src/main/java/pl/thedeem/intellij/dqlpart/DQLPartFileType.java New .dqlpart file type
src/main/java/pl/thedeem/intellij/dqlpart/DQLPartFile.java PSI file implementation for DQLPart
src/main/java/pl/thedeem/intellij/dql/inspections/migrations/PartialFileMigrationInspection.java New inspection to detect legacy .partial.dql files and offer rename
src/main/java/pl/thedeem/intellij/dql/inspections/migrations/MetricSeriesMigrationInspection.java Updates message key reference after bundle rename
src/main/java/pl/thedeem/intellij/dql/inspections/fixes/ReplaceFetchWithMetricsQuickFix.java Updates message key reference after bundle rename
src/main/java/pl/thedeem/intellij/dql/inspections/fixes/RenameFileQuickFix.java Adds empty intention preview implementation
src/main/java/pl/thedeem/intellij/dql/inspections/commands/InvalidCommandContextInspection.java Updates proposed partial filename logic to .dqlpart
src/main/java/pl/thedeem/intellij/dql/actions/ExecuteDQLQueryAction.java Prevents executing partial files by detecting .dqlpart/partial naming
src/main/java/pl/thedeem/intellij/dql/DQLUtil.java Updates partial-file detection to include DQLPart file type
docs/wiki/Home.md Updates wiki links and adds DQL Part documentation entry
docs/wiki/DQL-Part.md New documentation page for DQLPart usage
docs/wiki/DQL-Expression.md Clarifies/structures usage section and code fence identifier
CHANGELOG.md Documents new .dqlpart support and updated rename behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

Qodana for JVM

It 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 report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.1
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@dorian-krefft-dt dorian-krefft-dt merged commit e860fb2 into main Feb 8, 2026
9 checks passed
@dorian-krefft-dt dorian-krefft-dt deleted the feature/dql/dql-part branch February 8, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant