New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[xtext generator] Migration of 'QuickfixProviderFragment' #653
Conversation
*/ | ||
class �grammar.quickfixProviderClass.simpleName� extends �grammar.quickfixProviderSuperClass� { | ||
|
||
// @Fix(MyDslValidator::INVALID_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The '.' notation is preferred also for static member access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Didn't pay attention to that.
Signed-off-by: Christian Schneider <christian.schneider@itemis.de>
…based quickfix provider stub according to review suggestion. Signed-off-by: Christian Schneider <christian.schneider@itemis.de>
I rebased this change to master a couple of minutes ago, and included Sebastian's suggestion. Please review and merge! |
*/ | ||
class �grammar.quickfixProviderClass.simpleName� extends �grammar.quickfixProviderSuperClass� { | ||
|
||
// @Fix(MyDslValidator.INVALID_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the real validator name in this code snippet or is it not important?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Decided with Miro to use the actual name.
We lazily ignore the case of generating a quickfix provider stub without generating a validator stub. Are you ok with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szarnekow what do you think about the commented imports (line 94-96);
IMO they are obsolete as 'organize imports' does the trick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, the commented imports do more harm than good.
…nt one in QuickfixProvider stub template, according to review suggestion Signed-off-by: Christian Schneider <christian.schneider@itemis.de>
…b template as discussed in the review Signed-off-by: Christian Schneider <christian.schneider@itemis.de>
…w QuickfixProviderFragment2 Signed-off-by: Christian Schneider <christian.schneider@itemis.de>
instanceClass | ||
).contributeTo(language.eclipsePluginGenModule); | ||
|
||
if (!generateStub) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the early exit pattern in long methods. If I add some logic to the end of this method I will wonder why it's not executed.
I'd suggest extracting a method
if (generateStub)
doGenerateStub
I think we should remove the commented imports from other fragments, too, if there are any. I didn't check that, though I remember that the old formatter fragment had those. |
…n review Signed-off-by: Christian Schneider <christian.schneider@itemis.de>
[xtext generator] Migration of 'QuickfixProviderFragment'
Signed-off-by: Christian Schneider christian.schneider@itemis.de