Skip to content
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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Ao-senXiong
Copy link
Member

@Ao-senXiong Ao-senXiong commented Sep 4, 2023

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

@Ao-senXiong
Copy link
Member Author

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

@Ao-senXiong
Copy link
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.

build.gradle Outdated Show resolved Hide resolved
Copy link
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?

build.gradle Outdated Show resolved Hide resolved
public class CheckerTypeKind {
private String checkername;

private Map<String, String> TypeKind;
Copy link
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
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.

for (CheckerTypeKind checkerTypeKind : checkerTypeKinds) {
if (checkerTypeKind.getCheckername().equals(checker)) {
foundChecker = true;
if (!checkerTypeKind.getTypeKind().containsKey(type)) {
Copy link
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
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.

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.

None yet

2 participants