Show tooltips above columns in the MultipleFileMergeDialog

In case of short branch names, they will repeat the table header, but if branch name is long it might be more convenient to see a tooltip instead of resizing columns.

Relates to IDEA-195517
This commit is contained in:
Kirill Likhodedov
2018-07-23 14:17:05 +03:00
parent aae821963a
commit 024c7d82ed
@@ -176,10 +176,11 @@ open class MultipleFileMergeDialog(
}
private class ColumnInfoAdapter(private val base: ColumnInfo<Any, Any>,
columnName: String) : ColumnInfo<DefaultMutableTreeNode, Any>(columnName) {
private val columnName: String) : ColumnInfo<DefaultMutableTreeNode, Any>(columnName) {
override fun valueOf(node: DefaultMutableTreeNode) = (node.userObject as? VirtualFile)?.let { base.valueOf(it) }
override fun getMaxStringValue() = base.maxStringValue
override fun getAdditionalWidth() = base.additionalWidth
override fun getTooltipText() = base.tooltipText ?: columnName
}
private class MyTable(private val tableModel: ListTreeTableModelOnColumns) : TreeTable(tableModel) {