201: TreeStructureProvider api changed: AbstractTreeNode<Any -> *>
This commit is contained in:
committed by
Nikolay Krasko
parent
9261f69dc8
commit
b425bf9a1b
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.projectView
|
||||
|
||||
import com.intellij.ide.util.treeView.AbstractTreeNode
|
||||
|
||||
// BUNCH: 193
|
||||
typealias AbstractTreeNodeAny = AbstractTreeNode<Any>
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.projectView
|
||||
|
||||
import com.intellij.ide.util.treeView.AbstractTreeNode
|
||||
|
||||
// BUNCH: 193
|
||||
typealias AbstractTreeNodeAny = AbstractTreeNode<*>
|
||||
@@ -28,8 +28,8 @@ class KotlinExpandNodeProjectViewProvider : TreeStructureProvider, DumbAware {
|
||||
|
||||
// should be called after ClassesTreeStructureProvider
|
||||
override fun modify(
|
||||
parent: AbstractTreeNode<Any>,
|
||||
children: Collection<AbstractTreeNode<Any>>,
|
||||
parent: AbstractTreeNodeAny,
|
||||
children: Collection<AbstractTreeNodeAny>,
|
||||
settings: ViewSettings
|
||||
): Collection<AbstractTreeNode<out Any>> {
|
||||
val result = ArrayList<AbstractTreeNode<out Any>>()
|
||||
@@ -60,16 +60,16 @@ class KotlinExpandNodeProjectViewProvider : TreeStructureProvider, DumbAware {
|
||||
else -> null
|
||||
}
|
||||
|
||||
override fun getData(selected: Collection<AbstractTreeNode<Any>>, dataName: String): Any? = null
|
||||
override fun getData(selected: Collection<AbstractTreeNodeAny>, dataName: String): Any? = null
|
||||
}
|
||||
|
||||
|
||||
class KotlinSelectInProjectViewProvider(private val project: Project) : SelectableTreeStructureProvider, DumbAware {
|
||||
override fun getData(selected: Collection<AbstractTreeNode<Any>>, dataName: String): Any? = null
|
||||
override fun getData(selected: Collection<AbstractTreeNodeAny>, dataName: String): Any? = null
|
||||
|
||||
override fun modify(
|
||||
parent: AbstractTreeNode<Any>,
|
||||
children: Collection<AbstractTreeNode<Any>>,
|
||||
parent: AbstractTreeNodeAny,
|
||||
children: Collection<AbstractTreeNodeAny>,
|
||||
settings: ViewSettings
|
||||
): Collection<AbstractTreeNode<out Any>> {
|
||||
return ArrayList(children)
|
||||
|
||||
Reference in New Issue
Block a user