This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 251037
Collapse All | Expand All

(-)a/editor.completion/src/org/netbeans/modules/editor/completion/CompletionImpl.java (-4 / +10 lines)
Lines 879-892 Link Here
879
                        if(baseDoc != null)
879
                        if(baseDoc != null)
880
                            baseDoc.atomicUnlock();
880
                            baseDoc.atomicUnlock();
881
                    }
881
                    }
882
                    return;
882
                    if(useTabToComplete())
883
                        return;
883
                }
884
                }
884
            }
885
            }
885
            CompletionItem item = layout.getSelectedCompletionItem();
886
            if(useTabToComplete()) {
886
            if (item != null)
887
                CompletionItem item = layout.getSelectedCompletionItem();
887
                item.defaultAction(c);
888
                if (item != null)
889
                    item.defaultAction(c);
890
            }
888
        }
891
        }
889
    }
892
    }
893
    private boolean useTabToComplete() {
894
        return !Boolean.getBoolean("editor.completion.TabOnlyForPrefix");
895
    }
890
    
896
    
891
    /**
897
    /**
892
     * May be called from any thread but it will be rescheduled into AWT.
898
     * May be called from any thread but it will be rescheduled into AWT.

Return to bug 251037