improved completion sorting, fixes to ignore case completion

This commit is contained in:
Manindra Moharana
2013-07-14 19:49:28 +05:30
parent 28afea1c89
commit eeaa204cac
4 changed files with 75 additions and 66 deletions

View File

@@ -105,8 +105,10 @@ public class CompletionPanel {
String selectedSuggestion = ((CompletionCandidate) completionList
.getSelectedValue()).getCompletionString().substring(subWord.length());
System.err.println(subWord+" <= subword,Inserting suggestion=> " + selectedSuggestion);
textarea.getDocument().insertString(insertionPosition,
selectedSuggestion, null);
textarea.getDocument().remove(insertionPosition-subWord.length(), subWord.length());
textarea.getDocument().insertString(insertionPosition-subWord.length(),
((CompletionCandidate) completionList
.getSelectedValue()).getCompletionString(), null);
if(selectedSuggestion.endsWith(")"))
{
if(!selectedSuggestion.endsWith("()")){