<commit_before>// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.github.pullrequest.ui.timeline

import com.intellij.openapi.util.text.StringUtil
import com.intellij.ui.ColorUtil
import com.intellij.ui.JBColor
import com.intellij.ui.components.panels.VerticalBox
import com.intellij.ui.paint.LinePainter2D
import com.intellij.util.ui.*
import org.jetbrains.plugins.github.pullrequest.ui.timeline.GHPRTimelineItemComponentFactory.Item
import java.awt.Dimension
import java.awt.Graphics
import java.awt.Graphics2D
import javax.swing.event.ListDataEvent
import javax.swing.event.ListDataListener

class GHPRTimelineComponent(private val model: GHPRTimelineMergingModel,
                            private val itemComponentFactory: GHPRTimelineItemComponentFactory)
  : VerticalBox(), ComponentWithEmptyText {

  private val emptyText = object : StatusText(this) {
    override fun isStatusVisible() = model.size == 0
  }

  private val timeLineColor = JBColor(ColorUtil.fromHex("#F2F2F2"), ColorUtil.fromHex("#3E3E3E"))
  private val timeLineValues = JBValue.JBValueGroup()
  private val timeLineGap = timeLineValues.value(UIUtil.DEFAULT_VGAP.toFloat())
  private val timeLineWidth = timeLineValues.value(2f)
  private val timeLineX = timeLineValues.value(20f / 2 - 1)

  init {
    isOpaque = false<commit_msg>[github] Generify GHPRTimelineComponent<commit_after>// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.github.pullrequest.ui.timeline

import com.intellij.openapi.util.text.StringUtil
import com.intellij.ui.ColorUtil
import com.intellij.ui.JBColor
import com.intellij.ui.components.panels.VerticalBox
import com.intellij.ui.paint.LinePainter2D
import com.intellij.util.ui.*
import org.jetbrains.plugins.github.api.data.pullrequest.timeline.GHPRTimelineItem
import org.jetbrains.plugins.github.pullrequest.ui.timeline.GHPRTimelineItemComponentFactory.Item
import java.awt.Dimension
import java.awt.Graphics
import java.awt.Graphics2D
import javax.swing.ListModel
import javax.swing.event.ListDataEvent
import javax.swing.event.ListDataListener

class GHPRTimelineComponent(private val model: ListModel<GHPRTimelineItem>,
                            private val itemComponentFactory: GHPRTimelineItemComponentFactory)
  : VerticalBox(), ComponentWithEmptyText {

  private val emptyText = object : StatusText(this) {
    override fun isStatusVisible() = model.size == 0
  }

  private val timeLineColor = JBColor(ColorUtil.fromHex("#F2F2F2"), ColorUtil.fromHex("#3E3E3E"))
  private val timeLineValues = JBValue.JBValueGroup()
  private val timeLineGap = timeLineValues.value(UIUtil.DEFAULT_VGAP.toFloat())
  private val timeLineWidth = timeLineValues.value(2f)
  private val timeLineX = timeLineValues.value(20f / 2 - 1)

  init {
    isOpaque = false
{'fraction_non_alphanumeric': 0.08730423192269243, 'fraction_numerical': 0.01599466844385205, 'mean_word_length': 4.992015968063872, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4269261', 'n_tokens_mistral': 970, 'n_tokens_neox': 920, 'n_words': 201}