summaryrefslogtreecommitdiff
path: root/plugins/github/src/org/jetbrains/plugins/github/pullrequest/comment/ui/GHPRReviewThreadComponent.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/github/src/org/jetbrains/plugins/github/pullrequest/comment/ui/GHPRReviewThreadComponent.kt')
-rw-r--r--plugins/github/src/org/jetbrains/plugins/github/pullrequest/comment/ui/GHPRReviewThreadComponent.kt22
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/github/src/org/jetbrains/plugins/github/pullrequest/comment/ui/GHPRReviewThreadComponent.kt b/plugins/github/src/org/jetbrains/plugins/github/pullrequest/comment/ui/GHPRReviewThreadComponent.kt
index 000f97f82672..0613c96b584b 100644
--- a/plugins/github/src/org/jetbrains/plugins/github/pullrequest/comment/ui/GHPRReviewThreadComponent.kt
+++ b/plugins/github/src/org/jetbrains/plugins/github/pullrequest/comment/ui/GHPRReviewThreadComponent.kt
@@ -29,8 +29,8 @@ import net.miginfocom.swing.MigLayout
import org.jetbrains.plugins.github.api.data.GHUser
import org.jetbrains.plugins.github.api.data.pullrequest.GHPullRequestReviewCommentState
import org.jetbrains.plugins.github.i18n.GithubBundle
-import org.jetbrains.plugins.github.pullrequest.data.provider.GHPRDetailsDataProvider
import org.jetbrains.plugins.github.pullrequest.data.provider.GHPRReviewDataProvider
+import org.jetbrains.plugins.github.pullrequest.ui.changes.GHPRSuggestedChangeHelper
import org.jetbrains.plugins.github.pullrequest.ui.timeline.GHPRReviewThreadDiffComponentFactory
import org.jetbrains.plugins.github.pullrequest.ui.timeline.GHPRSelectInToolWindowHelper
import org.jetbrains.plugins.github.ui.avatars.GHAvatarIconsProvider
@@ -46,15 +46,15 @@ object GHPRReviewThreadComponent {
fun create(project: Project,
thread: GHPRReviewThreadModel,
reviewDataProvider: GHPRReviewDataProvider,
- detailsDataProvider: GHPRDetailsDataProvider,
avatarIconsProvider: GHAvatarIconsProvider,
+ suggestedChangeHelper: GHPRSuggestedChangeHelper,
currentUser: GHUser): JComponent {
val panel = JPanel(VerticalLayout(12)).apply {
isOpaque = false
}
- panel.add(
- GHPRReviewThreadCommentsPanel.create(thread, GHPRReviewCommentComponent.factory(project, reviewDataProvider, avatarIconsProvider,
- detailsDataProvider, thread)))
+ panel.add(GHPRReviewThreadCommentsPanel.create(thread, GHPRReviewCommentComponent.factory(project, thread,
+ reviewDataProvider, avatarIconsProvider,
+ suggestedChangeHelper)))
if (reviewDataProvider.canComment()) {
panel.add(getThreadActionsComponent(project, reviewDataProvider, thread, avatarIconsProvider, currentUser))
@@ -65,10 +65,10 @@ object GHPRReviewThreadComponent {
fun createWithDiff(project: Project,
thread: GHPRReviewThreadModel,
reviewDataProvider: GHPRReviewDataProvider,
- detailsDataProvider: GHPRDetailsDataProvider,
- selectInToolWindowHelper: GHPRSelectInToolWindowHelper,
- diffComponentFactory: GHPRReviewThreadDiffComponentFactory,
avatarIconsProvider: GHAvatarIconsProvider,
+ diffComponentFactory: GHPRReviewThreadDiffComponentFactory,
+ selectInToolWindowHelper: GHPRSelectInToolWindowHelper,
+ suggestedChangeHelper: GHPRSuggestedChangeHelper,
currentUser: GHUser): JComponent {
val collapseButton = InlineIconButton(AllIcons.General.CollapseComponent, AllIcons.General.CollapseComponentHover,
@@ -94,8 +94,10 @@ object GHPRReviewThreadComponent {
val commentsComponent = JPanel(VerticalLayout(12)).apply {
isOpaque = false
- val reviewCommentComponent = GHPRReviewCommentComponent.factory(project, reviewDataProvider, avatarIconsProvider,
- detailsDataProvider, thread, false)
+ val reviewCommentComponent = GHPRReviewCommentComponent.factory(project, thread,
+ reviewDataProvider, avatarIconsProvider,
+ suggestedChangeHelper,
+ false)
add(GHPRReviewThreadCommentsPanel.create(thread, reviewCommentComponent))
if (reviewDataProvider.canComment()) {