var DeploymentManager = require('./DeploymentManager');
var MessageObserver = require('./observers/MessageObserver');
// DEV MODE
var ConsoleObserver = require('./observers/ConsoleObserver');
var manager = new DeploymentManager();
manager.registerObserver(new MessageObserver());
// DEV MODE
manager.registerObserver(new ConsoleObserver());

/**
 * Declare command palette to Atom
 * @type {Object}
 */
module.exports = {
    activate: function() {
        atom.commands.add(
            'atom-workspace',
            'sftp-deployment:mapToRemote',
            manager.generateConfigFile
        );
        atom.commands.add(
            'atom-workspace',
            'sftp-deployment:uploadCurrentFile',
            manager.uploadCurrentFile
        );
        atom.commands.add(
            'atom-workspace',
            'sftp-deployment:downloadCurrentFile',
            manager.downloadCurrentFile
        );
        atom.commands.add(
            'atom-workspace',
            'sftp-deployment:uploadOpenFiles',
            manager.uploadOpenFiles
        );
        atom.commands.add(
            'atom-workspace',
            'sftp-deployment:uploadSelection',
            manager.uploadSelection
        );
        atom.commands.add(
            'atom-workspace',
            'sftp-deployment:downloadSelection',
            manager.downloadSelection
        );
        // atom.commands.add(
        //     'atom-workspace',
        //     'core:save',
        //     manager.uploadCurrentFileOnSave
        // );
    }
};

@@ -415,16 +415,727 @@
 rts = %7B%0A
+    'config': %7B%0A        'uploadOnSave': %7B%0A            'title': 'Upload on save',%0A            'description': 'When enabled, remote files will be automatically uploaded when saved',%0A            'type': 'boolean',%0A            'default': true%0A        %7D,%0A        'messagePanel':%C2%A0%7B%0A            'title': 'Display message panel',%0A            'type': 'boolean',%0A            'default': true%0A        %7D,%0A        'sshPrivateKeyPath': %7B%0A            'title': 'Path to private SSH key',%0A            'type': 'string',%0A            'default': '~/.ssh/id_rsa'%0A        %7D,%0A        'messagePanelTimeout': %7B%0A            'title': 'Timeout for message panel',%0A            'type': 'integer',%0A            'default': 6000%0A        %7D%0A    %7D,%0A%0A
     acti

add some configuration settings