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

Updated Three Side visualisation #132

Merged
merged 3 commits into from
Apr 23, 2023
Merged

Updated Three Side visualisation #132

merged 3 commits into from
Apr 23, 2023

Conversation

anchouls
Copy link
Collaborator

#131

Unnecessary highlighting between the windows remains.

Screenshot 2023-03-31 at 03 12 13

In the case of Two Side and More Side, we have a SimpleDiffViewer that has a SimpleTextDiffProvider that has a compareRange function that takes a DiffComputer diffComputer that determines the changes to be highlighted. If diffComputer == null, the SimpleTextDiffProvider finds the changes itself.

In the case of Three Side, we have SimpleThreesideDiffViewer, which has a SimpleThreesideTextDiffProvider, which hasn't function that takes something to override the changes somehow. That's why SimpleThreesideTextDiffProvider always finds the changes that need to be highlighted by itself.

Currently SimpleThreesideDiffViewer.getChanges() returns unmodifiableList, so nothing can be changed here.

@anchouls anchouls requested a review from onewhl March 31, 2023 01:47
@onewhl
Copy link
Collaborator

onewhl commented Apr 10, 2023

@anchouls maybe we can get away from the idea of showing three-sided diff for such types of refactoring and come up with something that would be more intuitive? The example on the screenshot doesn't look intuitive. What if we show the old class on the left side with highlighted removed items with grey color, and the new class on the right side highlighted with green color? Please, checkout on RefactorInsight version of the 2021 year and check how it worked.

@anchouls
Copy link
Collaborator Author

@onewhl I tried different ways to visualise it:

Screenshot 2023-04-14 at 22 39 01

Screenshot 2023-04-14 at 21 37 01

Screenshot 2023-04-14 at 22 31 12

A hint could potentially be added to indicate that the class contains a reference to the extract class (since it is not visualized).

@onewhl
Copy link
Collaborator

onewhl commented Apr 18, 2023

@anchouls the first one is the best!

@anchouls
Copy link
Collaborator Author

@onewhl Updated the visualization as in the first picture. Hints are already there (I didn't notice them)

@onewhl
Copy link
Collaborator

onewhl commented Apr 20, 2023

@anchouls cool, thank you! I tested it and I don't see any hints in the diffs for this kind of refactoring, only toggles.

@anchouls
Copy link
Collaborator Author

@onewhl It finds Move Method refactorings and therefore shows the hints. At the same time, the Move Method refactorings are not shown in the list of refactorings, since they all belong to the Extract Class refactoring.
Screenshot 2023-04-20 at 18 50 41

@onewhl
Copy link
Collaborator

onewhl commented Apr 20, 2023

@anchouls I meant there is no a hint above the extracted class with information about the classes it was extracted from.
Extracted from A, B, C classes.

Copy link
Collaborator

@onewhl onewhl left a comment

Choose a reason for hiding this comment

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

@anchouls cool, thank you! Please, investigate if it's possible to add a hint above the extracted class with information about the classes it was extracted from.
Extracted from A, B, C classes.

@onewhl onewhl added this to In progress in Internship 2023 Apr 21, 2023
@anchouls
Copy link
Collaborator Author

@onewhl I added this hint to the standard diff window. How to add hints to the refactoring diff window, I haven't figured out yet.

@onewhl onewhl merged commit 63f5a65 into master Apr 23, 2023
2 checks passed
@anchouls anchouls moved this from In progress to Done in Internship 2023 Apr 24, 2023
@onewhl onewhl deleted the update-three-sided-view branch April 25, 2023 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants