     if attribute == 'id' or attribute == 'class'
       sourceEditor = util.getFileEditor related.getTargetPath('tss')
       if(!sourceEditor.isEmpty())
-        values = tokenTextForSelector(sourceEditor.displayBuffer.tokenizedBuffer, attribute)
+        values = tokenTextForSelector(sourceEditor, attribute)
         fileName = _.last(sourceEditor.getPath().split('/'))
         for value in values when not prefix or firstCharsEqual(value, prefix)
           completions.push @buildStyleSelectorCompletion(attribute, value, fileName)

trailingWhitespace = /\s$/
attributePattern = /\s+([a-zA-Z][-a-zA-Z]*)\s*=\s*$/
tagPattern = /<([a-zA-Z][-a-zA-Z]*)(?:\s|$)/

module.exports =
  selector: '.text.alloyxml, .text.xml'

capitalizeFirstLetter = (string) ->
  string.charAt(0).toUpperCase() + string.slice(1)

tokenTextForSelector = (editor, selectorType) ->
  matchingTokens = []
  editor.scan(selectorPatterns[selectorType],(item) ->
    matchingTokens.push(item.match[2].split('[')[0]);
  );
  matchingTokens

hasScope = (scopesArray, scope) ->
