mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
Multi-file merge: Simplify action creation code
IDEA-CR-32596
This commit is contained in:
@@ -213,7 +213,6 @@ open class MultipleFileMergeDialog2(
|
||||
mergeButton.isEnabled = haveSelection && !haveUnmergeableFiles
|
||||
}
|
||||
|
||||
|
||||
private fun getSelectedFiles(): List<VirtualFile> {
|
||||
return TreeUtil.collectSelectedObjectsOfType(table.tree, VirtualFile::class.java)
|
||||
}
|
||||
@@ -222,11 +221,9 @@ open class MultipleFileMergeDialog2(
|
||||
return true
|
||||
}
|
||||
|
||||
override fun createActions(): Array<Action> = arrayOf(cancelAction)
|
||||
|
||||
|
||||
override fun getCancelAction(): Action = super.getCancelAction().apply {
|
||||
putValue(Action.NAME, CommonBundle.getCloseButtonText())
|
||||
override fun createActions(): Array<Action> {
|
||||
cancelAction.putValue(Action.NAME, CommonBundle.getCloseButtonText())
|
||||
return arrayOf(cancelAction)
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
|
||||
Reference in New Issue
Block a user