You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tkobayas (via GitHub)" <gi...@apache.org> on 2026/10/15 06:29:27 UTC

[PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

tkobayas opened a new pull request, #63:
URL: https://github.com/apache/incubator-kie-website/pull/63

   This is a draft version of a blog. This PR will be ready after the 10.3.0 release. Then,
   - Replace the date in the filename: `2026-10-14-drl-editor-vscode-extension-kie-10-3.md`
   - In `Getting started` section, add a link to the VS Code Marketplace DRL editor extension 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4291434373


##########
static/img/blogs/drl-editor-problem.png:
##########


Review Comment:
   applied



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "drccrd (via GitHub)" <gi...@apache.org>.
drccrd commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4285003851


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,108 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+DRL files have always been text files, and for years "support" in an editor meant little more than syntax colouring — if you were lucky. Completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.

Review Comment:
   @tkobayas do you want to mention the old redhat eclipse extension? I don't think I ever saw it fully functional and can't remember what was in it other than a working memory debugging pane...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4291330669


##########
static/img/blogs/drl-editor-problem.png:
##########


Review Comment:
   good!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4311279722


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,132 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+While a few DRL-aware editors have existed over the years, they have either offered limited language support or fallen behind on maintenance. In practice, completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.
+
+The DRL Editor closes that gap. It connects VS Code to a full Language Server that indexes both the DRL workspace and the project's Java types, so the feedback loop tightens considerably.
+
+## What's in the box
+
+### Code editing
+
+The language server provides completion for every part of a rule: grammar keywords (`rule`, `when`, `then`, `end`, `declare`, `accumulate`, …), Java class names resolved from the project's Maven classpath, field names and property accessors for matched types, and `declare`-defined types from within the same rule group. Inlay hints show the inferred type of each bound variable directly in the editor, eliminating the need to mentally track `$p: Person(…)` across a long `when` block.
+
+![Field completion inside a pattern constraint](/img/blogs/drl-editor-completion.png)
+*Completion inside `Person( )` — the language server resolves `age` and `name` directly from the Java source, no build required.*
+
+### Navigation
+
+- **Go-to-definition** — jump from a DRL type reference to its `declare` block or its Java source file.
+- **Find references** — see every use of a declared type or bound variable across the group.
+- **Rename** — safe rename for declared types and bound variables in scope.
+- **Document symbols** — the outline view lists every rule, query, function, and declared type in the file.
+- **Type hierarchy** — browse the extends hierarchy of declared types.
+- **Folding** — rule blocks and block comments fold cleanly.
+
+![Hover tooltip for a Java type](/img/blogs/drl-editor-hover.png)
+*Hovering over `Employee` shows getters, field types, and constructors resolved from the project's Java sources.*
+
+### Diagnostics
+
+Three layers of error reporting work together:
+
+1. **Syntax errors** — reported as you type, before a save.
+2. **Lint diagnostics** — missing `end`, unbalanced parentheses, missing constraint separators, unknown type references (with a "Did you mean?" quick-fix for likely typos).
+3. **Compile diagnostics** — on save, the file's group is compiled using the Drools engine on the project's own classpath and the compiler's messages appear in the Problems panel. This gives you the same errors the build would produce, without leaving the editor.
+
+![Lint diagnostic with a typo quick-fix](/img/blogs/drl-editor-problem-quickfix.png)
+*A typo in a type name (`Employer` instead of `Employee`) is caught immediately — the Quick Fix menu offers "Replace with 'Employee'" in one click.*
+
+Compile diagnostics require `drools-compiler` and `drools-mvel` on the classpath — a project that already compiles rules at runtime has them. A workspace without them gets syntax and lint feedback, just not compile feedback.
+
+Completion, navigation and diagnostics all work across file boundaries. The extension scopes them to the files a rule compiles with — picked up automatically from `META-INF/kmodule.xml` when it exists, or configurable via `drl-lsp-kbases.json` or the `drools.lsp.grouping` setting for projects that don't use one.
+
+### Formatter
+
+`Format Document` and `Format Selection` rewrite a `.drl` file into a canonical shape. The formatter is built on the ANTLR4 `DRL10` parser (see [Which parser the editor uses](#which-parser-the-editor-uses)), so it only formats files it can verify will re-parse correctly — it refuses a file entirely rather than writing partial or ambiguous output. Formatting is idempotent.
+
+Key defaults (all configurable):
+
+| Setting | Default | Effect |
+|---|---|---|
+| `lineLength` | `110` | Wrap trigger for constraints and headers |
+| `parenPadding` | `true` | `Person( age > 18 )` |
+| `alignDeclarations` | `true` | `declare` fields as aligned columns |
+| `normalizeTerminators` | `true` | Adds `;` to `import`, removes from `global` |
+
+A `// @formatter:off` / `// @formatter:on` pair freezes a region verbatim. The formatter is also available as a standalone CLI (to be built from the source code as required) for pre-commit hooks and CI.
+
+## Which parser the editor uses
+
+Drools 10 ships two DRL parsers. The engine compiles with the legacy `DRL6` parser by default; the new ANTLR4-based `DRL10` parser is opt-in, enabled with `-Ddrools.drl.antlr4.parser.enabled=true`, and accepts a slimmer syntax ([apache/incubator-kie#6220](https://github.com/apache/incubator-kie/issues/6220)). The DRL Editor parses with `DRL10`, so its syntax errors, lint and formatter already follow the language Drools is moving to, while compile diagnostics on save come from the project's own engine and its default parser.
+
+For most rule sets the two parsers agree. Where a rule set still uses syntax that `DRL10` drops, the editor reports a parse error (`no viable alternative`) at that spot even though the build succeeds, and the formatter refuses the file. The dropped constructs are:
+
+| Construct | Deprecated form | Replacement |
+|---|---|---|
+| Half constraint | `age > 18 && < 65` | `age > 18 && age < 65` |
+| Patterns joined with `&&` / `\|\|` | `not( A() && B() )` | `not( A() and B() )` |
+| Annotation after an LHS `and` / `or` | `A() or @Annot B()` | Move or drop the annotation |
+| `agenda-group` | `agenda-group "g"` | `ruleflow-group "g"` |
+| Custom operator without its prefix | `addresses supersetOf $a.addresses` | `addresses ##supersetOf $a.addresses` |
+
+`&&` and `||` between constraints inside a pattern, as in `Person( age > 18 && age < 65 )`, are unaffected.
+
+### The migration path
+
+Drools is introducing `DRL10` gradually ([apache/incubator-kie#6221](https://github.com/apache/incubator-kie/issues/6221)). Today the legacy parser logs a deprecation warning when it meets dropped syntax. `DRL10` is planned to become the default parser in a later release, and the legacy `DRL6` parser to be removed in Drools 12, after which the deprecated syntax no longer compiles.
+
+To check a rule set now, build it once with `-Ddrools.drl.antlr4.parser.enabled=true`; the constructs it rejects are the ones the editor flags. Migrating them early keeps the editor, the formatter and the build in agreement, and removes the work from a future upgrade.
+
+The editor includes a deprecated-syntax lint, which replaces the raw parse errors with a warning that names the construct, offers a quick fixes, and reads custom operators from the project's `META-INF/kie.properties.conf` so that `##id` is accepted as the engine accepts it. Its severity is set with `drools.lsp.lint.deprecated`.

Review Comment:
   https://github.com/apache/incubator-kie-tools/pull/4007 has been merged.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "drccrd (via GitHub)" <gi...@apache.org>.
drccrd commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4285714428


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,108 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+DRL files have always been text files, and for years "support" in an editor meant little more than syntax colouring — if you were lucky. Completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.
+
+The DRL Editor closes that gap. It connects VS Code to a full Language Server that indexes both the DRL workspace and the project's Java types, so the feedback loop tightens considerably.
+
+## What's in the box

Review Comment:
   Suggestion: https://github.com/tkobayas/incubator-kie-website/pull/2



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4293034712


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,132 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+While a few DRL-aware editors have existed over the years, they have either offered limited language support or fallen behind on maintenance. In practice, completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.
+
+The DRL Editor closes that gap. It connects VS Code to a full Language Server that indexes both the DRL workspace and the project's Java types, so the feedback loop tightens considerably.
+
+## What's in the box
+
+### Code editing
+
+The language server provides completion for every part of a rule: grammar keywords (`rule`, `when`, `then`, `end`, `declare`, `accumulate`, …), Java class names resolved from the project's Maven classpath, field names and property accessors for matched types, and `declare`-defined types from within the same rule group. Inlay hints show the inferred type of each bound variable directly in the editor, eliminating the need to mentally track `$p: Person(…)` across a long `when` block.
+
+![Field completion inside a pattern constraint](/img/blogs/drl-editor-completion.png)
+*Completion inside `Person( )` — the language server resolves `age` and `name` directly from the Java source, no build required.*
+
+### Navigation
+
+- **Go-to-definition** — jump from a DRL type reference to its `declare` block or its Java source file.
+- **Find references** — see every use of a declared type or bound variable across the group.
+- **Rename** — safe rename for declared types and bound variables in scope.
+- **Document symbols** — the outline view lists every rule, query, function, and declared type in the file.
+- **Type hierarchy** — browse the extends hierarchy of declared types.
+- **Folding** — rule blocks and block comments fold cleanly.
+
+![Hover tooltip for a Java type](/img/blogs/drl-editor-hover.png)
+*Hovering over `Employee` shows getters, field types, and constructors resolved from the project's Java sources.*
+
+### Diagnostics
+
+Three layers of error reporting work together:
+
+1. **Syntax errors** — reported as you type, before a save.
+2. **Lint diagnostics** — missing `end`, unbalanced parentheses, missing constraint separators, unknown type references (with a "Did you mean?" quick-fix for likely typos).
+3. **Compile diagnostics** — on save, the file's group is compiled using the Drools engine on the project's own classpath and the compiler's messages appear in the Problems panel. This gives you the same errors the build would produce, without leaving the editor.
+
+![Lint diagnostic with a typo quick-fix](/img/blogs/drl-editor-problem-quickfix.png)
+*A typo in a type name (`Employer` instead of `Employee`) is caught immediately — the Quick Fix menu offers "Replace with 'Employee'" in one click.*
+
+Compile diagnostics require `drools-compiler` and `drools-mvel` on the classpath — a project that already compiles rules at runtime has them. A workspace without them gets syntax and lint feedback, just not compile feedback.
+
+Completion, navigation and diagnostics all work across file boundaries. The extension scopes them to the files a rule compiles with — picked up automatically from `META-INF/kmodule.xml` when it exists, or configurable via `drl-lsp-kbases.json` or the `drools.lsp.grouping` setting for projects that don't use one.
+
+### Formatter
+
+`Format Document` and `Format Selection` rewrite a `.drl` file into a canonical shape. The formatter is built on the ANTLR4 `DRL10` parser (see [Which parser the editor uses](#which-parser-the-editor-uses)), so it only formats files it can verify will re-parse correctly — it refuses a file entirely rather than writing partial or ambiguous output. Formatting is idempotent.
+
+Key defaults (all configurable):
+
+| Setting | Default | Effect |
+|---|---|---|
+| `lineLength` | `110` | Wrap trigger for constraints and headers |
+| `parenPadding` | `true` | `Person( age > 18 )` |
+| `alignDeclarations` | `true` | `declare` fields as aligned columns |
+| `normalizeTerminators` | `true` | Adds `;` to `import`, removes from `global` |
+
+A `// @formatter:off` / `// @formatter:on` pair freezes a region verbatim. The formatter is also available as a standalone CLI (to be built from the source code as required) for pre-commit hooks and CI.
+
+## Which parser the editor uses
+
+Drools 10 ships two DRL parsers. The engine compiles with the legacy `DRL6` parser by default; the new ANTLR4-based `DRL10` parser is opt-in, enabled with `-Ddrools.drl.antlr4.parser.enabled=true`, and accepts a slimmer syntax ([apache/incubator-kie#6220](https://github.com/apache/incubator-kie/issues/6220)). The DRL Editor parses with `DRL10`, so its syntax errors, lint and formatter already follow the language Drools is moving to, while compile diagnostics on save come from the project's own engine and its default parser.
+
+For most rule sets the two parsers agree. Where a rule set still uses syntax that `DRL10` drops, the editor reports a parse error (`no viable alternative`) at that spot even though the build succeeds, and the formatter refuses the file. The dropped constructs are:
+
+| Construct | Deprecated form | Replacement |
+|---|---|---|
+| Half constraint | `age > 18 && < 65` | `age > 18 && age < 65` |
+| Patterns joined with `&&` / `\|\|` | `not( A() && B() )` | `not( A() and B() )` |
+| Annotation after an LHS `and` / `or` | `A() or @Annot B()` | Move or drop the annotation |
+| `agenda-group` | `agenda-group "g"` | `ruleflow-group "g"` |
+| Custom operator without its prefix | `addresses supersetOf $a.addresses` | `addresses ##supersetOf $a.addresses` |
+
+`&&` and `||` between constraints inside a pattern, as in `Person( age > 18 && age < 65 )`, are unaffected.
+
+### The migration path
+
+Drools is introducing `DRL10` gradually ([apache/incubator-kie#6221](https://github.com/apache/incubator-kie/issues/6221)). Today the legacy parser logs a deprecation warning when it meets dropped syntax. `DRL10` is planned to become the default parser in a later release, and the legacy `DRL6` parser to be removed in Drools 12, after which the deprecated syntax no longer compiles.
+
+To check a rule set now, build it once with `-Ddrools.drl.antlr4.parser.enabled=true`; the constructs it rejects are the ones the editor flags. Migrating them early keeps the editor, the formatter and the build in agreement, and removes the work from a future upgrade.
+
+The editor includes a deprecated-syntax lint, which replaces the raw parse errors with a warning that names the construct, offers a quick fixes, and reads custom operators from the project's `META-INF/kie.properties.conf` so that `##id` is accepted as the engine accepts it. Its severity is set with `drools.lsp.lint.deprecated`.
+
+## Requirements
+
+- Java 17 or later (`JAVA_HOME` set or `java` on `PATH`)
+- Maven (for classpath resolution of Java types)
+- `drools-compiler` and `drools-mvel` on the project's classpath — only for compile diagnostics; everything else works without them
+
+## Getting started
+
+1. **Install the extension** from the VS Code Marketplace: search for *DRL Editor* by `kie-group`.
+2. **Open your project** — the extension activates automatically when a `.drl` file is opened.
+3. **Check the status bar** — the active file group is shown at the bottom. If the extension picks up your `kmodule.xml` correctly, no additional configuration is needed. If a DRL file belongs to several groups, a selection list lets you pick one.
+4. **Try a save** — if Drools is on the classpath, compile diagnostics appear in the Problems panel within a few seconds.

Review Comment:
   applied



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4291194816


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,108 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+DRL files have always been text files, and for years "support" in an editor meant little more than syntax colouring — if you were lucky. Completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.

Review Comment:
   I'll revise that part to say something like, "While a few DRL-aware editors have existed over the years, they have either offered limited language support or fallen behind on maintenance," without mentioning specific product names.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#issuecomment-6186185578

   Hi @drccrd ,
   
   This is a draft version of a blog to introduce the DRL editor. Feel free to let me know any updates or corrections.
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4291430666


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,108 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+DRL files have always been text files, and for years "support" in an editor meant little more than syntax colouring — if you were lucky. Completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.

Review Comment:
   applied



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4291433031


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,108 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+DRL files have always been text files, and for years "support" in an editor meant little more than syntax colouring — if you were lucky. Completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.
+
+The DRL Editor closes that gap. It connects VS Code to a full Language Server that indexes both the DRL workspace and the project's Java types, so the feedback loop tightens considerably.
+
+## What's in the box

Review Comment:
   merged. thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "drccrd (via GitHub)" <gi...@apache.org>.
drccrd commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4285015448


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,108 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+DRL files have always been text files, and for years "support" in an editor meant little more than syntax colouring — if you were lucky. Completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.
+
+The DRL Editor closes that gap. It connects VS Code to a full Language Server that indexes both the DRL workspace and the project's Java types, so the feedback loop tightens considerably.
+
+## What's in the box

Review Comment:
   I think it might be important to note the parser used is not the default, I will submit a PR with some suggested text.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "drccrd (via GitHub)" <gi...@apache.org>.
drccrd commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4285611132


##########
static/img/blogs/drl-editor-problem.png:
##########


Review Comment:
   Maybe this image could show the quick-fix link in the hover window?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4292239746


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,132 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+While a few DRL-aware editors have existed over the years, they have either offered limited language support or fallen behind on maintenance. In practice, completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.
+
+The DRL Editor closes that gap. It connects VS Code to a full Language Server that indexes both the DRL workspace and the project's Java types, so the feedback loop tightens considerably.
+
+## What's in the box
+
+### Code editing
+
+The language server provides completion for every part of a rule: grammar keywords (`rule`, `when`, `then`, `end`, `declare`, `accumulate`, …), Java class names resolved from the project's Maven classpath, field names and property accessors for matched types, and `declare`-defined types from within the same rule group. Inlay hints show the inferred type of each bound variable directly in the editor, eliminating the need to mentally track `$p: Person(…)` across a long `when` block.
+
+![Field completion inside a pattern constraint](/img/blogs/drl-editor-completion.png)
+*Completion inside `Person( )` — the language server resolves `age` and `name` directly from the Java source, no build required.*
+
+### Navigation
+
+- **Go-to-definition** — jump from a DRL type reference to its `declare` block or its Java source file.
+- **Find references** — see every use of a declared type or bound variable across the group.
+- **Rename** — safe rename for declared types and bound variables in scope.
+- **Document symbols** — the outline view lists every rule, query, function, and declared type in the file.
+- **Type hierarchy** — browse the extends hierarchy of declared types.
+- **Folding** — rule blocks and block comments fold cleanly.
+
+![Hover tooltip for a Java type](/img/blogs/drl-editor-hover.png)
+*Hovering over `Employee` shows getters, field types, and constructors resolved from the project's Java sources.*
+
+### Diagnostics
+
+Three layers of error reporting work together:
+
+1. **Syntax errors** — reported as you type, before a save.
+2. **Lint diagnostics** — missing `end`, unbalanced parentheses, missing constraint separators, unknown type references (with a "Did you mean?" quick-fix for likely typos).
+3. **Compile diagnostics** — on save, the file's group is compiled using the Drools engine on the project's own classpath and the compiler's messages appear in the Problems panel. This gives you the same errors the build would produce, without leaving the editor.
+
+![Lint diagnostic with a typo quick-fix](/img/blogs/drl-editor-problem-quickfix.png)
+*A typo in a type name (`Employer` instead of `Employee`) is caught immediately — the Quick Fix menu offers "Replace with 'Employee'" in one click.*
+
+Compile diagnostics require `drools-compiler` and `drools-mvel` on the classpath — a project that already compiles rules at runtime has them. A workspace without them gets syntax and lint feedback, just not compile feedback.
+
+Completion, navigation and diagnostics all work across file boundaries. The extension scopes them to the files a rule compiles with — picked up automatically from `META-INF/kmodule.xml` when it exists, or configurable via `drl-lsp-kbases.json` or the `drools.lsp.grouping` setting for projects that don't use one.
+
+### Formatter
+
+`Format Document` and `Format Selection` rewrite a `.drl` file into a canonical shape. The formatter is built on the ANTLR4 `DRL10` parser (see [Which parser the editor uses](#which-parser-the-editor-uses)), so it only formats files it can verify will re-parse correctly — it refuses a file entirely rather than writing partial or ambiguous output. Formatting is idempotent.
+
+Key defaults (all configurable):
+
+| Setting | Default | Effect |
+|---|---|---|
+| `lineLength` | `110` | Wrap trigger for constraints and headers |
+| `parenPadding` | `true` | `Person( age > 18 )` |
+| `alignDeclarations` | `true` | `declare` fields as aligned columns |
+| `normalizeTerminators` | `true` | Adds `;` to `import`, removes from `global` |
+
+A `// @formatter:off` / `// @formatter:on` pair freezes a region verbatim. The formatter is also available as a standalone CLI (to be built from the source code as required) for pre-commit hooks and CI.
+
+## Which parser the editor uses
+
+Drools 10 ships two DRL parsers. The engine compiles with the legacy `DRL6` parser by default; the new ANTLR4-based `DRL10` parser is opt-in, enabled with `-Ddrools.drl.antlr4.parser.enabled=true`, and accepts a slimmer syntax ([apache/incubator-kie#6220](https://github.com/apache/incubator-kie/issues/6220)). The DRL Editor parses with `DRL10`, so its syntax errors, lint and formatter already follow the language Drools is moving to, while compile diagnostics on save come from the project's own engine and its default parser.
+
+For most rule sets the two parsers agree. Where a rule set still uses syntax that `DRL10` drops, the editor reports a parse error (`no viable alternative`) at that spot even though the build succeeds, and the formatter refuses the file. The dropped constructs are:
+
+| Construct | Deprecated form | Replacement |
+|---|---|---|
+| Half constraint | `age > 18 && < 65` | `age > 18 && age < 65` |
+| Patterns joined with `&&` / `\|\|` | `not( A() && B() )` | `not( A() and B() )` |
+| Annotation after an LHS `and` / `or` | `A() or @Annot B()` | Move or drop the annotation |
+| `agenda-group` | `agenda-group "g"` | `ruleflow-group "g"` |
+| Custom operator without its prefix | `addresses supersetOf $a.addresses` | `addresses ##supersetOf $a.addresses` |
+
+`&&` and `||` between constraints inside a pattern, as in `Person( age > 18 && age < 65 )`, are unaffected.
+
+### The migration path
+
+Drools is introducing `DRL10` gradually ([apache/incubator-kie#6221](https://github.com/apache/incubator-kie/issues/6221)). Today the legacy parser logs a deprecation warning when it meets dropped syntax. `DRL10` is planned to become the default parser in a later release, and the legacy `DRL6` parser to be removed in Drools 12, after which the deprecated syntax no longer compiles.
+
+To check a rule set now, build it once with `-Ddrools.drl.antlr4.parser.enabled=true`; the constructs it rejects are the ones the editor flags. Migrating them early keeps the editor, the formatter and the build in agreement, and removes the work from a future upgrade.
+
+The editor includes a deprecated-syntax lint, which replaces the raw parse errors with a warning that names the construct, offers a quick fixes, and reads custom operators from the project's `META-INF/kie.properties.conf` so that `##id` is accepted as the engine accepts it. Its severity is set with `drools.lsp.lint.deprecated`.

Review Comment:
   The current Apache KIE extension does not expose `drools.lsp.lint.deprecated` in `packages/drl-vscode-extension/package.json`, and `DRLLintHelper` has no deprecated-syntax lint pass. This paragraph promises migration warnings and quick fixes that readers cannot use. Remove it unless that functionality is included and verified in the final 10.3.0 release; the preceding paragraphs already explain the parser errors and manual migration.



##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,132 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+While a few DRL-aware editors have existed over the years, they have either offered limited language support or fallen behind on maintenance. In practice, completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.
+
+The DRL Editor closes that gap. It connects VS Code to a full Language Server that indexes both the DRL workspace and the project's Java types, so the feedback loop tightens considerably.
+
+## What's in the box
+
+### Code editing
+
+The language server provides completion for every part of a rule: grammar keywords (`rule`, `when`, `then`, `end`, `declare`, `accumulate`, …), Java class names resolved from the project's Maven classpath, field names and property accessors for matched types, and `declare`-defined types from within the same rule group. Inlay hints show the inferred type of each bound variable directly in the editor, eliminating the need to mentally track `$p: Person(…)` across a long `when` block.
+
+![Field completion inside a pattern constraint](/img/blogs/drl-editor-completion.png)
+*Completion inside `Person( )` — the language server resolves `age` and `name` directly from the Java source, no build required.*
+
+### Navigation
+
+- **Go-to-definition** — jump from a DRL type reference to its `declare` block or its Java source file.
+- **Find references** — see every use of a declared type or bound variable across the group.
+- **Rename** — safe rename for declared types and bound variables in scope.
+- **Document symbols** — the outline view lists every rule, query, function, and declared type in the file.
+- **Type hierarchy** — browse the extends hierarchy of declared types.
+- **Folding** — rule blocks and block comments fold cleanly.
+
+![Hover tooltip for a Java type](/img/blogs/drl-editor-hover.png)
+*Hovering over `Employee` shows getters, field types, and constructors resolved from the project's Java sources.*
+
+### Diagnostics
+
+Three layers of error reporting work together:
+
+1. **Syntax errors** — reported as you type, before a save.
+2. **Lint diagnostics** — missing `end`, unbalanced parentheses, missing constraint separators, unknown type references (with a "Did you mean?" quick-fix for likely typos).
+3. **Compile diagnostics** — on save, the file's group is compiled using the Drools engine on the project's own classpath and the compiler's messages appear in the Problems panel. This gives you the same errors the build would produce, without leaving the editor.
+
+![Lint diagnostic with a typo quick-fix](/img/blogs/drl-editor-problem-quickfix.png)
+*A typo in a type name (`Employer` instead of `Employee`) is caught immediately — the Quick Fix menu offers "Replace with 'Employee'" in one click.*
+
+Compile diagnostics require `drools-compiler` and `drools-mvel` on the classpath — a project that already compiles rules at runtime has them. A workspace without them gets syntax and lint feedback, just not compile feedback.
+
+Completion, navigation and diagnostics all work across file boundaries. The extension scopes them to the files a rule compiles with — picked up automatically from `META-INF/kmodule.xml` when it exists, or configurable via `drl-lsp-kbases.json` or the `drools.lsp.grouping` setting for projects that don't use one.
+
+### Formatter
+
+`Format Document` and `Format Selection` rewrite a `.drl` file into a canonical shape. The formatter is built on the ANTLR4 `DRL10` parser (see [Which parser the editor uses](#which-parser-the-editor-uses)), so it only formats files it can verify will re-parse correctly — it refuses a file entirely rather than writing partial or ambiguous output. Formatting is idempotent.
+
+Key defaults (all configurable):
+
+| Setting | Default | Effect |
+|---|---|---|
+| `lineLength` | `110` | Wrap trigger for constraints and headers |
+| `parenPadding` | `true` | `Person( age > 18 )` |
+| `alignDeclarations` | `true` | `declare` fields as aligned columns |
+| `normalizeTerminators` | `true` | Adds `;` to `import`, removes from `global` |
+
+A `// @formatter:off` / `// @formatter:on` pair freezes a region verbatim. The formatter is also available as a standalone CLI (to be built from the source code as required) for pre-commit hooks and CI.
+
+## Which parser the editor uses
+
+Drools 10 ships two DRL parsers. The engine compiles with the legacy `DRL6` parser by default; the new ANTLR4-based `DRL10` parser is opt-in, enabled with `-Ddrools.drl.antlr4.parser.enabled=true`, and accepts a slimmer syntax ([apache/incubator-kie#6220](https://github.com/apache/incubator-kie/issues/6220)). The DRL Editor parses with `DRL10`, so its syntax errors, lint and formatter already follow the language Drools is moving to, while compile diagnostics on save come from the project's own engine and its default parser.
+
+For most rule sets the two parsers agree. Where a rule set still uses syntax that `DRL10` drops, the editor reports a parse error (`no viable alternative`) at that spot even though the build succeeds, and the formatter refuses the file. The dropped constructs are:
+
+| Construct | Deprecated form | Replacement |
+|---|---|---|
+| Half constraint | `age > 18 && < 65` | `age > 18 && age < 65` |
+| Patterns joined with `&&` / `\|\|` | `not( A() && B() )` | `not( A() and B() )` |
+| Annotation after an LHS `and` / `or` | `A() or @Annot B()` | Move or drop the annotation |
+| `agenda-group` | `agenda-group "g"` | `ruleflow-group "g"` |
+| Custom operator without its prefix | `addresses supersetOf $a.addresses` | `addresses ##supersetOf $a.addresses` |
+
+`&&` and `||` between constraints inside a pattern, as in `Person( age > 18 && age < 65 )`, are unaffected.
+
+### The migration path
+
+Drools is introducing `DRL10` gradually ([apache/incubator-kie#6221](https://github.com/apache/incubator-kie/issues/6221)). Today the legacy parser logs a deprecation warning when it meets dropped syntax. `DRL10` is planned to become the default parser in a later release, and the legacy `DRL6` parser to be removed in Drools 12, after which the deprecated syntax no longer compiles.
+
+To check a rule set now, build it once with `-Ddrools.drl.antlr4.parser.enabled=true`; the constructs it rejects are the ones the editor flags. Migrating them early keeps the editor, the formatter and the build in agreement, and removes the work from a future upgrade.
+
+The editor includes a deprecated-syntax lint, which replaces the raw parse errors with a warning that names the construct, offers a quick fixes, and reads custom operators from the project's `META-INF/kie.properties.conf` so that `##id` is accepted as the engine accepts it. Its severity is set with `drools.lsp.lint.deprecated`.
+
+## Requirements
+
+- Java 17 or later (`JAVA_HOME` set or `java` on `PATH`)
+- Maven (for classpath resolution of Java types)
+- `drools-compiler` and `drools-mvel` on the project's classpath — only for compile diagnostics; everything else works without them
+
+## Getting started
+
+1. **Install the extension** from the VS Code Marketplace: search for *DRL Editor* by `kie-group`.
+2. **Open your project** — the extension activates automatically when a `.drl` file is opened.
+3. **Check the status bar** — the active file group is shown at the bottom. If the extension picks up your `kmodule.xml` correctly, no additional configuration is needed. If a DRL file belongs to several groups, a selection list lets you pick one.
+4. **Try a save** — if Drools is on the classpath, compile diagnostics appear in the Problems panel within a few seconds.

Review Comment:
   The extension's README (`packages/drl-vscode-extension/README.md`, “Compile Diagnostics”) says compilation is skipped when a workspace has Java sources but no build output. Drools dependencies alone therefore do not produce the promised feedback on a fresh checkout. Include an initial Java build before this save step.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [DO-NOT-MERGE] blog post: DRL editor [incubator-kie-website]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #63:
URL: https://github.com/apache/incubator-kie-website/pull/63#discussion_r4292401414


##########
blog/2026-10-14-drl-editor-vscode-extension-kie-10-3.md:
##########
@@ -0,0 +1,132 @@
+---
+slug: drl-editor-vscode-extension-kie-10-3
+title: "DRL Editor for VS Code: First-class language support for Drools Rule Language in Apache KIE 10.3"
+authors: [tkobayas]
+tags: [tools, drools, deep-dive]
+---
+
+Apache KIE 10.3.0 ships the first official release of the **DRL Editor** — a Visual Studio Code extension bringing full language-server-backed support for Drools Rule Language (`.drl`) files. It turns VS Code into a productive environment for writing, navigating, and maintaining rules.
+
+<!-- truncate -->
+
+## Why a dedicated DRL extension?
+
+While a few DRL-aware editors have existed over the years, they have either offered limited language support or fallen behind on maintenance. In practice, completion, navigation, and error feedback all required running the build just to know whether a rule compiled. For teams with large rule sets this friction adds up: a rule that refers to a renamed Java class, a missing `end`, a typo in a declared type — all silent until `mvn test`.
+
+The DRL Editor closes that gap. It connects VS Code to a full Language Server that indexes both the DRL workspace and the project's Java types, so the feedback loop tightens considerably.
+
+## What's in the box
+
+### Code editing
+
+The language server provides completion for every part of a rule: grammar keywords (`rule`, `when`, `then`, `end`, `declare`, `accumulate`, …), Java class names resolved from the project's Maven classpath, field names and property accessors for matched types, and `declare`-defined types from within the same rule group. Inlay hints show the inferred type of each bound variable directly in the editor, eliminating the need to mentally track `$p: Person(…)` across a long `when` block.
+
+![Field completion inside a pattern constraint](/img/blogs/drl-editor-completion.png)
+*Completion inside `Person( )` — the language server resolves `age` and `name` directly from the Java source, no build required.*
+
+### Navigation
+
+- **Go-to-definition** — jump from a DRL type reference to its `declare` block or its Java source file.
+- **Find references** — see every use of a declared type or bound variable across the group.
+- **Rename** — safe rename for declared types and bound variables in scope.
+- **Document symbols** — the outline view lists every rule, query, function, and declared type in the file.
+- **Type hierarchy** — browse the extends hierarchy of declared types.
+- **Folding** — rule blocks and block comments fold cleanly.
+
+![Hover tooltip for a Java type](/img/blogs/drl-editor-hover.png)
+*Hovering over `Employee` shows getters, field types, and constructors resolved from the project's Java sources.*
+
+### Diagnostics
+
+Three layers of error reporting work together:
+
+1. **Syntax errors** — reported as you type, before a save.
+2. **Lint diagnostics** — missing `end`, unbalanced parentheses, missing constraint separators, unknown type references (with a "Did you mean?" quick-fix for likely typos).
+3. **Compile diagnostics** — on save, the file's group is compiled using the Drools engine on the project's own classpath and the compiler's messages appear in the Problems panel. This gives you the same errors the build would produce, without leaving the editor.
+
+![Lint diagnostic with a typo quick-fix](/img/blogs/drl-editor-problem-quickfix.png)
+*A typo in a type name (`Employer` instead of `Employee`) is caught immediately — the Quick Fix menu offers "Replace with 'Employee'" in one click.*
+
+Compile diagnostics require `drools-compiler` and `drools-mvel` on the classpath — a project that already compiles rules at runtime has them. A workspace without them gets syntax and lint feedback, just not compile feedback.
+
+Completion, navigation and diagnostics all work across file boundaries. The extension scopes them to the files a rule compiles with — picked up automatically from `META-INF/kmodule.xml` when it exists, or configurable via `drl-lsp-kbases.json` or the `drools.lsp.grouping` setting for projects that don't use one.
+
+### Formatter
+
+`Format Document` and `Format Selection` rewrite a `.drl` file into a canonical shape. The formatter is built on the ANTLR4 `DRL10` parser (see [Which parser the editor uses](#which-parser-the-editor-uses)), so it only formats files it can verify will re-parse correctly — it refuses a file entirely rather than writing partial or ambiguous output. Formatting is idempotent.
+
+Key defaults (all configurable):
+
+| Setting | Default | Effect |
+|---|---|---|
+| `lineLength` | `110` | Wrap trigger for constraints and headers |
+| `parenPadding` | `true` | `Person( age > 18 )` |
+| `alignDeclarations` | `true` | `declare` fields as aligned columns |
+| `normalizeTerminators` | `true` | Adds `;` to `import`, removes from `global` |
+
+A `// @formatter:off` / `// @formatter:on` pair freezes a region verbatim. The formatter is also available as a standalone CLI (to be built from the source code as required) for pre-commit hooks and CI.
+
+## Which parser the editor uses
+
+Drools 10 ships two DRL parsers. The engine compiles with the legacy `DRL6` parser by default; the new ANTLR4-based `DRL10` parser is opt-in, enabled with `-Ddrools.drl.antlr4.parser.enabled=true`, and accepts a slimmer syntax ([apache/incubator-kie#6220](https://github.com/apache/incubator-kie/issues/6220)). The DRL Editor parses with `DRL10`, so its syntax errors, lint and formatter already follow the language Drools is moving to, while compile diagnostics on save come from the project's own engine and its default parser.
+
+For most rule sets the two parsers agree. Where a rule set still uses syntax that `DRL10` drops, the editor reports a parse error (`no viable alternative`) at that spot even though the build succeeds, and the formatter refuses the file. The dropped constructs are:
+
+| Construct | Deprecated form | Replacement |
+|---|---|---|
+| Half constraint | `age > 18 && < 65` | `age > 18 && age < 65` |
+| Patterns joined with `&&` / `\|\|` | `not( A() && B() )` | `not( A() and B() )` |
+| Annotation after an LHS `and` / `or` | `A() or @Annot B()` | Move or drop the annotation |
+| `agenda-group` | `agenda-group "g"` | `ruleflow-group "g"` |
+| Custom operator without its prefix | `addresses supersetOf $a.addresses` | `addresses ##supersetOf $a.addresses` |
+
+`&&` and `||` between constraints inside a pattern, as in `Person( age > 18 && age < 65 )`, are unaffected.
+
+### The migration path
+
+Drools is introducing `DRL10` gradually ([apache/incubator-kie#6221](https://github.com/apache/incubator-kie/issues/6221)). Today the legacy parser logs a deprecation warning when it meets dropped syntax. `DRL10` is planned to become the default parser in a later release, and the legacy `DRL6` parser to be removed in Drools 12, after which the deprecated syntax no longer compiles.
+
+To check a rule set now, build it once with `-Ddrools.drl.antlr4.parser.enabled=true`; the constructs it rejects are the ones the editor flags. Migrating them early keeps the editor, the formatter and the build in agreement, and removes the work from a future upgrade.
+
+The editor includes a deprecated-syntax lint, which replaces the raw parse errors with a warning that names the construct, offers a quick fixes, and reads custom operators from the project's `META-INF/kie.properties.conf` so that `##id` is accepted as the engine accepts it. Its severity is set with `drools.lsp.lint.deprecated`.

Review Comment:
   https://github.com/apache/incubator-kie-tools/pull/4007 is about to merge. Let's keep it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org