JetBrains-Research / JetBrains-Research/RefactorInsight

Suggestions for improving `RefactoringHistoryToolbar`

Open
#58 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
110
Forks
12
PR merge metrics
No merged PRs in 30d

Description

I've noticed potential issues with the `RefactoringHistoryToolbar`:
1. New instance of `VcsLogUi` is created on every double click on the leaf node with `RefactoringInfo`, this is not good performance-wise.
2. Each time `RefactoringHistoryAction` is executed, new ui components are created, even though ui for the same element may exist already. `RefactoringHistoryToolbar#showContent` even finds the old content, but still replaces the old ui with the new one, instead of just refreshing it.

I think that that the code could be improved by extracting a class that represents one single tab with refactorings for a single element, let's call this `RefactoringHistoryTab`. This `RefactoringHistoryTab` would have one `Tree` instance, and one `VcsLogUi` (created on demand). The `RefactoringHistoryAction` would either find an existing `RefactoringHistoryTab` and focus it, or create a new one if nothing was found.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.