Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Add new Xtext editor quickfixes on *.xtext files #1523

Closed
wants to merge 2 commits into from

Conversation

nbhusare
Copy link
Contributor

Signed-off-by: nbhusare neerajbhusare@gmail.com

Passing issue code in the method XtextValidator#checkTerminalFragmentCalledFromTerminalRule
Updated the XtextLinkingDiagnosticMessageProvider

Signed-off-by: nbhusare <neerajbhusare@gmail.com>
@@ -810,7 +810,7 @@ public void checkTerminalFragmentCalledFromTerminalRule(final RuleCall call) {
call,
XtextPackage.Literals.RULE_CALL__RULE,
ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
null);
ILLEGAL_RULE_REFERENCE);
Copy link
Contributor

Choose a reason for hiding this comment

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

There are other validations, that appear to do similar validation, e.g. in line 796. Please use a more specific field name or provide an issue code for the other cases, too.

@@ -44,6 +44,7 @@
public static final String BIDIRECTIONAL_REFERENCE = ISSUE_CODE_PREFIX + "BidirectionalReference";
public static final String CROSS_REFERENCE_IN_ALTERNATIVES = ISSUE_CODE_PREFIX + "CrossReferenceInAlternatives";
public static final String INVALID_FRAGMENT_AS_FIRST_RULE = ISSUE_CODE_PREFIX + "InvalidFragmentFirstRule";
public static final String ILLEGAL_RULE_REFERENCE = ISSUE_CODE_PREFIX + "InvalidTerminalRuleCall";
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe ILLEGAL_RULE_REFERENCE_IN_TERMINAL?

Copy link
Contributor

@szarnekow szarnekow left a comment

Choose a reason for hiding this comment

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

The direction looks correct to me, but I'd like to sharpen the details of the change.

@cdietrich
Copy link
Member

@szarnekow @nbhusare what is the current state of this PR?

@nbhusare
Copy link
Contributor Author

nbhusare commented Jul 6, 2020

@cdietrich I'll be pushing the updated code today.

@nbhusare nbhusare closed this Jul 6, 2020
@nbhusare
Copy link
Contributor Author

nbhusare commented Jul 6, 2020

@cdietrich I have raised another PR as I was facing some issues with this branch - #1540

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants