Skip to content

Add initial support for simplified hover type information#230

Open
aosen-xiong wants to merge 25 commits intoeisopux:masterfrom
aosen-xiong:filterout-hover-info
Open

Add initial support for simplified hover type information#230
aosen-xiong wants to merge 25 commits intoeisopux:masterfrom
aosen-xiong:filterout-hover-info

Conversation

@aosen-xiong
Copy link
Copy Markdown
Member

@aosen-xiong aosen-xiong commented Sep 4, 2023

Now it looks like this, still working on more features.
image
I will rebase this PR to #238

@aosen-xiong
Copy link
Copy Markdown
Member Author

The type message looks like this now:
image
image
image
image

@aosen-xiong
Copy link
Copy Markdown
Member Author

@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.

Comment thread build.gradle Outdated
Copy link
Copy Markdown
Member

@wmdietl wmdietl left a 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?

Comment thread build.gradle Outdated
Comment thread src/main/java/org/checkerframework/languageserver/CFTextDocumentService.java Outdated
Comment thread src/main/java/org/checkerframework/languageserver/CheckerTypeKind.java Outdated
public class CheckerTypeKind {
private String checkername;

private Map<String, String> TypeKind;
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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.

Comment thread src/main/java/org/checkerframework/languageserver/CheckerTypeKind.java Outdated
for (CheckerTypeKind checkerTypeKind : checkerTypeKinds) {
if (checkerTypeKind.getCheckername().equals(checker)) {
foundChecker = true;
if (!checkerTypeKind.getTypeKind().containsKey(type)) {
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member Author

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.

@aosen-xiong aosen-xiong requested a review from wmdietl February 28, 2024 19:38
@aosen-xiong aosen-xiong assigned wmdietl and unassigned aosen-xiong Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants