 ParentProvider = require "./providers/parent-provider.coffee"
 SelfProvider = require "./providers/self-provider.coffee"
 
+GotoClass = require './goto/class-goto.coffee'
+GotoFunction = require './goto/function-goto.coffee'
+
 config = require './config.coffee'
 proxy = require './services/php-proxy.coffee'
-goto = require './services/goto.coffee'
+gotos = []
 
 module.exports =
   config:


  activate: ->
    @registerProviders()
    config.init()
    proxy.init()
    goto.init()

  deactivate: ->
    @providers = []


  getProvider: ->
    @providers

  registerGotos: ->
    @gotos = []
    @gotos.push new GotoClass()
    @gotos.push new GotoFunction()

    for goto in @gotos
      goto.init()

  deactivateGotos: ->
    for goto in @gotos
      goto.deactivate()
