// Editor hint support
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
public void eventDispatched(AWTEvent evt) {
HierarchyEvent e = (HierarchyEvent) evt;
if (e.getChangeFlags() == HierarchyEvent.DISPLAYABILITY_CHANGED) {
Object source = e.getSource();
// Is this the code completion window?
if (source instanceof JList && source.getClass().getName().equals("org.netbeans.modules.editor.completion.CompletionJList")) {
JList jl = (JList)source;
if (jl.isDisplayable()) {