const { CompositeDisposable } = require('atom');

module.exports = {
  activate() {
    const atom = global.atom;
    this.subscriptions = new CompositeDisposable();
    this.subscriptions.add(atom.commands.add('atom-workspace', {
      'aquila:model': ({target}) => {
        atom.workspace.open(target.dataset.path)
        console.log('hello, atom');
      },
    }));
  },
  deactivate() {
    this.subscriptions.dispose();
  }
};

@@ -41,16 +41,77 @@
 'atom');
+%0Aconst TemplateEditorView = require('./views/templateEditor')
 %0A%0Amodule
@@ -313,105 +313,419 @@
 : (%7B
+ 
 target
-%7D) =%3E %7B%0A        atom.workspace.open(target.dataset.path)%0A        console.log('hello, atom')
+: %7B dataset: %7B path = '' %7D %7D %7D) =%3E %7B%0A        const uri = %60aquila://$%7Bpath%7D%60;%0A        atom.workspace.open(uri);%0A      %7D,%0A    %7D));%0A%0A    atom.workspace.addOpener((uri = '') =%3E %7B%0A      let %5Bprotocol, filePath = ''%5D = uri.split('://');%0A%0A      if (protocol !== 'aquila') %7B%0A        return;%0A      %7D%0A%0A      try %7B%0A        filePath = decodeURI(filePath);%0A      %7D catch (e) %7B%0A        console.error(e);%0A        return
 ;%0A  
@@ -733,24 +733,74 @@
    %7D
-,
 %0A
+%0A 
     
+ return new TemplateEditorView(%7B filePath %7D);%0A    
 %7D
-)
 );%0A  %7D,%0A
   de
@@ -795,16 +795,17 @@
 );%0A  %7D,%0A
+%0A
   deacti

use inner navigation for openening tab