       unless line.endsWith('%')
         return completions
       fullLine = @getFullLine(editor, bufferPosition)
+      lineContext = @getLineContext(fullLine)
       lineScopes = @getLineScopes(editor, bufferPosition)
       cursorScope = @getClassScope(fullLine, lineScopes)
       if cursorScope?
         suggestions = @addChildren(cursorScope, suggestions, prefixLower, [])
-        return @buildCompletionList(suggestions)
-      completions = @buildCompletionList(suggestions)
+        return @buildCompletionList(suggestions,lineContext)
     return completions
 
   goToDef: (word, editor, bufferPosition) ->

      cursorScope = @getClassScope(fullLine, lineScopes)
      if cursorScope?
        suggestions = @addChildren(cursorScope, suggestions, prefixLower, [])
        return @buildCompletionList(suggestions)
      if prefix.length < @minPrefix and not activatedManually
        return completions
      for key in @globalObjInd when (@projectObjList[key]['name'].toLowerCase().startsWith(prefixLower))

      return null
    return objKey.substring(0,finalSep)

  buildCompletionList: (suggestions, contextFilter=0) ->
    subTestRegex = /^(TYP|CLA|PRO)/i
    completions = []
    for suggestion in suggestions
      compObj = @projectObjList[suggestion]
      if contextFilter == 3 and compObj['type'] != 4
        continue
      if contextFilter == 4
        if compObj['type'] == 3 or compObj['type'] == 4
          continue
        if compObj['type'] == 6
          unless @descList[compObj['desc']].match(subTestRegex)?
            continue
      if compObj['type'] == 7
        @resolveInterface(suggestion)
        repName = compObj['name']
