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:
Nikolay Krasko
2014-02-05 17:22:06 +04:00
parent e46c19b3f8
commit 3b3f9f7022
@@ -14,16 +14,20 @@
* limitations under the License.
*/
package org.jetbrains.jet.plugin.codeInsight
package org.jetbrains.jet.plugin.codeInsight;
import com.intellij.ide.util.FQNameCellRenderer
import javax.swing.JList
import java.awt.Component
import com.intellij.ide.util.FQNameCellRenderer;
import org.jetbrains.annotations.NotNull;
class KotlinImportListRenderer: FQNameCellRenderer() {
override fun getListCellRendererComponent(list: JList?, value: Any?, index: Int, isSelected: Boolean, cellHasFocus: Boolean): Component? {
val component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus)
setIcon(null)
return component
import javax.swing.*;
import java.awt.*;
/* package */ final class KotlinImportListRenderer extends FQNameCellRenderer {
@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;
}
}
}