-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
@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. |
@onewhl I tried different ways to visualise it: A hint could potentially be added to indicate that the class contains a reference to the extract class (since it is not visualized). |
@anchouls the first one is the best! |
@onewhl Updated the visualization as in the first picture. Hints are already there (I didn't notice them) |
@anchouls cool, thank you! I tested it and I don't see any hints in the diffs for this kind of refactoring, only toggles. |
@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. |
@anchouls I meant there is no a hint above the extracted class with information about the classes it was extracted from. |
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.
@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 I added this hint to the standard diff window. How to add hints to the refactoring diff window, I haven't figured out yet. |
#131
Unnecessary highlighting between the windows remains.
In the case of Two Side and More Side, we have a
SimpleDiffViewer
that has aSimpleTextDiffProvider
that has acompareRange
function that takes aDiffComputer diffComputer
that determines the changes to be highlighted. IfdiffComputer == null
, theSimpleTextDiffProvider
finds the changes itself.In the case of Three Side, we have
SimpleThreesideDiffViewer
, which has aSimpleThreesideTextDiffProvider
, which hasn't function that takes something to override the changes somehow. That's whySimpleThreesideTextDiffProvider
always finds the changes that need to be highlighted by itself.Currently
SimpleThreesideDiffViewer.getChanges()
returnsunmodifiableList
, so nothing can be changed here.