-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add initial support for simplified hover type information #230
base: master
Are you sure you want to change the base?
Conversation
@wmdietl Hi Werner, I have complete the feature of simpler type hover information. Please review it. I am not sure why I can request review or assign you directly. |
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.
These hovers look much nicer!
Can you fix the CI failures and look at me initial comments?
src/main/java/org/checkerframework/languageserver/CFTextDocumentService.java
Outdated
Show resolved
Hide resolved
src/main/java/org/checkerframework/languageserver/CheckerTypeKind.java
Outdated
Show resolved
Hide resolved
public class CheckerTypeKind { | ||
private String checkername; | ||
|
||
private Map<String, String> TypeKind; |
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.
What is this mapping from/to?
Field names should start lower case.
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 map stores type information in the key of the map and type kind information e.g. used/declared in the value of the map.
src/main/java/org/checkerframework/languageserver/CheckerTypeKind.java
Outdated
Show resolved
Hide resolved
for (CheckerTypeKind checkerTypeKind : checkerTypeKinds) { | ||
if (checkerTypeKind.getCheckername().equals(checker)) { | ||
foundChecker = true; | ||
if (!checkerTypeKind.getTypeKind().containsKey(type)) { |
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.
These methods have a very deep nesting level. Can you try to split off smaller helper methods? Or at least add some comments to make the flow understandable?
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.
already refactored and added comment.
Now it looks like this, still working on more features.
I will rebase this PR to #238