Esempio n. 1
0
    this.onSelectResult = function(selectedItems)
    {
        log.debug("Invoking Tools");

        var uris = [];
        for (let item in selectedItems)
        {
            let resultData = selectedItems[item].resultData;
            try
            {
                // Brute force async
                timers.setTimeout(function()
                           {
                    log.debug("Invoking tool: " + resultData.id);
                    ko.toolbox2.invokeTool(resultData.data.tool.koTool);
                }, 0)
            }
            catch(e)
            {
                log.exception(e, "Failed to invoke tool: ");
            }
        }

        commando.hideCommando();
    }
Esempio n. 2
0
 this.onSelectResult = function(selectedItems)
 {
     let data = selectedItems.slice(0)[0].resultData.data;
     window.xtk.domutils.fireEvent(
         data.editorView.parentNode._tab,
         'click'
     );
     commando.hideCommando();
 }
Esempio n. 3
0
    this.onSelectResult = function(selectedItems)
    {
        var item = selectedItems.slice(0)[0];
        var line = item.resultData.data.line;
        var e = editor();

        e.setCursor(e.getLineEndPos(line));

        commando.hideCommando();
        ko.commands.doCommandAsync('cmd_focusEditor');
    }
Esempio n. 4
0
    this.onSelectResult = function(selectedItems)
    {
        log.debug("Opening Files");

        var uris = []
        for (let item in selectedItems)
        {
            item = selectedItems[item];
            // Todo be a bit more intelligent
            uris.push(ko.uriparse.pathToURI(item.resultData.data.path));
        }

        log.debug("Opening files: " + uris.join(", "));

        ko.open.multipleURIs(uris);

        commando.hideCommando();
    }