Rewrite KotlinImportListRenderer to Java to make it compilable with both JDK 1.6 and JDK 1.7
In JDK 1.7 JList has generic parameter
This commit is contained in:
+13
-9
@@ -14,16 +14,20 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.jet.plugin.codeInsight
|
package org.jetbrains.jet.plugin.codeInsight;
|
||||||
|
|
||||||
import com.intellij.ide.util.FQNameCellRenderer
|
import com.intellij.ide.util.FQNameCellRenderer;
|
||||||
import javax.swing.JList
|
import org.jetbrains.annotations.NotNull;
|
||||||
import java.awt.Component
|
|
||||||
|
|
||||||
class KotlinImportListRenderer: FQNameCellRenderer() {
|
import javax.swing.*;
|
||||||
override fun getListCellRendererComponent(list: JList?, value: Any?, index: Int, isSelected: Boolean, cellHasFocus: Boolean): Component? {
|
import java.awt.*;
|
||||||
val component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus)
|
|
||||||
setIcon(null)
|
/* package */ final class KotlinImportListRenderer extends FQNameCellRenderer {
|
||||||
return component
|
@NotNull
|
||||||
|
@Override
|
||||||
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||||
|
Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
||||||
|
setIcon(null);
|
||||||
|
return component;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user