Skip to content

Commit

Permalink
more booish idioms
Browse files Browse the repository at this point in the history
  • Loading branch information
bamboo committed Jan 16, 2011
1 parent a5bf670 commit ba9d625
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Boo.MonoDevelop.Util/BooCompletionTextEditorExtension.boo
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class BooCompletionTextEditorExtension(CompletionTextEditorExtension):
return ShouldEnableCompletionFor(doc.Name)

override def HandleParameterCompletion(context as CodeCompletionContext, completionChar as char):
if("(" != completionChar.ToString()):
if completionChar == char('('):
return null

methodName = GetToken(context)
Expand Down Expand Up @@ -175,14 +175,13 @@ class BooCompletionTextEditorExtension(CompletionTextEditorExtension):
AddGloballyVisibleAndImportedSymbolsTo(completions)
work = def():
locals = _index.LocalsAt(Document.FileName.FullPath, text, context.TriggerLine-1)
if (0 == locals.Count):
if len(locals) == 0:
callback = def():
completions.IsChanging = false
else:
callback = def():
completions.IsChanging = true
for local in locals:
completions.Add(CompletionData(local, Stock.Field))
completions.AddRange(CompletionData(local, Stock.Field) for local in locals)
completions.IsChanging = false
DispatchService.GuiDispatch(callback)
ThreadPool.QueueUserWorkItem (work)
Expand Down

0 comments on commit ba9d625

Please sign in to comment.