This PR contributes the following things and closes #1309:
At the moment parser rules which are used not for parsing but whose type is used in cross-references are marked as "unused" for users. This message is not accurate and could confuse inexperienced users. Therefore, the message of the validation is improved to "This parser rule is not used for parsing, but referenced by cross-references. Consider to replace this rule by a type declaration.". See #1309 for details.
Additionally, a quick-fix is provided for users to replace such a parser rule by a type declaration.
While the two contributions above target a quite special case, this PR contributes also a generic helper functionality to check quick-fixes (testQuickFix in packages/langium/src/test/langium-test.ts). This function is tested by applying it to the mentioned new quick-fix for the Langium grammar.
This PR contributes the following things and closes #1309:
testQuickFix
inpackages/langium/src/test/langium-test.ts
). This function is tested by applying it to the mentioned new quick-fix for the Langium grammar.