     @editor = null
     @runtime = null
     @connected = false
+    @project = null
     @inPorts =
       editor: new noflo.Port 'object'
       project: new noflo.Port 'object'

    @inPorts.runtime.on 'data', (runtime) =>
      @runtime.stop() if @runtime
      @runtime = runtime
      @connect @editor, @runtime

  sendProject: (runtime, project) ->
    if project.components

    @outPorts =
      editor: new noflo.Port 'object'

    @inPorts.editor.on 'data', (@editor) =>
      @connect @editor, @runtime
      if @outPorts.editor.isAttached()
        @outPorts.editor.send @editor
        @outPorts.editor.disconnect()
      if @runtime
        @editor = null
    @inPorts.project.on 'data', (@project) =>
    @inPorts.newgraph.on 'data', (data) =>
      @sendGraph @runtime, data
    @inPorts.runtime.on 'connect', =>
