 
       { machineLabel, workspaceSlug, username } = data.params
 
-      loadWorkspace machineLabel, workspaceSlug, username
+      loadWorkspace machineLabel, workspaceSlug, username
do ->

  loadWorkspace = (machineLabel, workspaceSlug, username) ->
    workspace = ws  for ws in KD.userWorkspaces when ws.slug is workspaceSlug
    machine   = getMachineByLabel machineLabel

    if workspace
      loadIDE { machine, workspace, username }

    mainView.activitySidebar.selectWorkspace data


  getMachine = (label, username) ->
    machine = null

    for m in KD.userMachines
      hasSameLabel = (m.label is label) or (m.slug is label)
      hasSameUser  = m.data.credential is username

      if hasSameLabel and hasSameUser
        machine = m

    return machine


  loadIDE = (data) ->
