Gruntfuggly / activitusbar

A VSCode extension to save some real estate by recreating the activity bar buttons on the status bar
Other
116 stars 15 forks source link

"command 'activitusbar.showExtensionsView' not found" since Code 1.37 #20

Closed apaleslimghost closed 5 years ago

apaleslimghost commented 5 years ago

I have keyboard shortcuts set up to trigger activitusbar.showExtensionsView and activitusbar.showScmView, but since updating to Code 1.37 it's saying these commands don't exist.

apaleslimghost commented 5 years ago

actually this looks like it's all the activitusbar.showWhateverView commands, even the default keybindings

Gruntfuggly commented 5 years ago

Do the buttons on the status bar work?

apaleslimghost commented 5 years ago

Yes, they do

Gruntfuggly commented 5 years ago

Can you post your settings.json (or the appropriate part of it for activitusbar)? I don't know what is going on as it works fine for me - I can see the commands in the keyboard shortcuts view. Could you post you keybindings.json too, so I can recreate your shortcuts.

apaleslimghost commented 5 years ago

settings.json:

{
    "activitusbar.views": [
        {
            "name": "explorer",
            "octicon": "file"
        },
        {
            "name": "search",
            "octicon": "search"
        },
        {
            "name": "extension.liveshare",
            "octicon": "telescope"
        },
        {
            "name": "extension.chatActivityViewSlack",
            "octicon": "comment"
        }
    ],
    "activitusbar.alignment": "Right",
    "activitusbar.activeColour": "#03A9F4",
    "activitusbar.priority": -99999,
    "activitusbar.searchViewInPanel": true
}

example keybinding (note that all the activitusbar commands in that file have yellow squiggly "Value is not accepted" warnings):

{
    "key": "shift+cmd+g",
    "command": "activitusbar.showScmView"
}
Gruntfuggly commented 5 years ago

I'm not sure why they are showing with yellow squiggles - they seem to work regardless, but I can see that some of them aren't working. Explorer, Find work OK for me but the other don't. Stay tuned...

Gruntfuggly commented 5 years ago

Actually - I think the reason they have squiggles is because they are not declared in the package.json, but are created dynamically.

Gruntfuggly commented 5 years ago

Hang on - the reason that the command is not available is that you haven't got the scm view in your views settings?

apaleslimghost commented 5 years ago

it's all the commands, not just the ones missing from settings.json

Gruntfuggly commented 5 years ago

That's odd - they work for me when they are defined.

Would you be prepared to try a bit of hacking to try and work out what is going on?

If so, please can you edit ~/.vscode/extensions/gruntfuggly.activitusbar-0.0.21/extension.js (or wherever it is for you) and add two console.log lines to the block starting at line 223, line this:

var commandKey = view.name.capitalize() + 'View'
command = 'activitusbar.toggle' + commandKey;
viewNames.push( view.name );
buttons[ view.name ] = addButton( view.octicon, command, view.name, view.tooltip );
console.log( "registerCommand: " + command ); // HERE
commands.push( vscode.commands.registerCommand( command, makeToggleView( view.name ) ) );

if( view.name !== 'search' )
{
     console.log( "registerCommand: " + 'activitusbar.show' + commandKey ); // AND HERE
     commands.push( vscode.commands.registerCommand( 'activitusbar.show' + commandKey, makeShowView( view.name ) ) );
}

then reload the window and look in the developer console (Help -> Toggle Developer Tools) and see what is shown.

Gruntfuggly commented 5 years ago

Hi - have you had any luck with this?

apaleslimghost commented 5 years ago

sorry, i didn't get chance to debug it, and i'm not using the extension any more. feel free to close the issue if you can't reproduce

Gruntfuggly commented 5 years ago

OK - Thanks for letting me know. I'll close it, but if you ever come back to it, feel free to re-open it.