     # Hook up events
     @emitter.on "#{@packageName()}:identify-device", (event) =>
       @identifyCore(event.port)
+
+    @emitter.on "#{@packageName()}:select-device", (event) =>
+      @selectCore(event.callback)
 
     @emitter.on "#{@packageName()}:compile-cloud", (event) =>
       @compileCloud(event.thenFlash)

  # "Decorator" which runs callback only when user is logged in and has core selected
  deviceRequired: (callback) ->
    @loginRequired =>
      if !@SettingsHelper.hasCurrentCore()
        atom.notifications.addInfo 'Please select a device'
        return

      callback()

  # "Decorator" which runs callback only when there's project set

    @loginView.logout()

  # Show user's cores list
  selectCore: (callback) -> @loginRequired =>
    @initView 'select-core'
    @selectCoreView.spark ?= @spark
    @selectCoreView.requestErrorHandler = (error) =>
      @requestErrorHandler error

    @selectCoreView.show(callback)

  # Show rename core dialog
  renameCore: -> @deviceRequired =>
