Package com.intellij.codeInsight.lookup

Examples of com.intellij.codeInsight.lookup.LookupElementPresentation


        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {

            JLabel renderer = (JLabel) defaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);

            if(value instanceof LookupElement) {
                LookupElementPresentation lookupElementPresentation = new LookupElementPresentation();
                ((LookupElement) value).renderElement(lookupElementPresentation);

                renderer.setText(lookupElementPresentation.getItemText());
                renderer.setIcon(lookupElementPresentation.getIcon());
                renderer.setToolTipText(lookupElementPresentation.getTypeText());
            }

            return renderer;
        }
View Full Code Here

TOP

Related Classes of com.intellij.codeInsight.lookup.LookupElementPresentation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.