Gruntfuggly / activitusbar

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

Showing Project Manager extension does not work #65

Closed ecstayalive closed 1 year ago

ecstayalive commented 1 year ago

For some unkonwn reason, after updating the activitusbar extension, it can't add an working project-manager icon to the bottom. Below is my settings.json file.

activitusbar.views": [
        {
            "name": "explorer",
            "codicon": "explorer-view-icon"
        },
        {
            "name": "search",
            "codicon": "search-view-icon"
        },
        {
            "name": "scm",
            "codicon": "source-control-view-icon"
        },
        {
            "name": "debug",
            "codicon": "run-view-icon"
        },
        {
            "name": "extensions",
            "codicon": "extensions-view-icon"
        },
        {
            "name": "extension.project-manager",
            "codicon": "folder"
        },
        {
            "name": "settings",
            "codicon": "gear"
        },
    ],
Gruntfuggly commented 1 year ago

Try it without 'extension.' - it now just uses the view name from the extension. You should be able to find it in the extension's package.json file, or have a look in the 'feature contributions' page of the extension within vscode.

ecstayalive commented 1 year ago

Try it without 'extension.' - it now just uses the view name from the extension. You should be able to find it in the extension's package.json file, or have a look in the 'feature contributions' page of the extension within vscode.

I have already changed it. But when i click the button, it just opens and closes the sidebar. Here is the content after changing.

{
    "name": "project-manager",
    "codicon": "folder"
},
Gruntfuggly commented 1 year ago

Is project-manager definitely the correct name for the view? What is the extension that you are trying to open?

ecstayalive commented 1 year ago

This time i understand what you mean, and it works. I am deeply grateful to you. Here is the steps and these steps may help others. First, i enter into the vscode extensions folder.

cd /home/USER_NAME/.vscode/extensions/EXTENSION_NAME/

Second, find and view the package.json. For example, in extension Project Manager, part of its package.json reads as follows:

{       
        "name": "project-manager",
    "displayName": "Project Manager",
    "description": "Easily switch between projects",
    "version": "12.7.0",
    "publisher": "alefragnani",
...
...
        "contributes": {
        "viewsContainers": {
            "activitybar": [
                {
                    "id": "project-manager",
                    "title": "%projectManager.activitybar.title%",
                    "icon": "images/project-manager-side-bar.svg"
                }
            ]
        },
        "views": {
            "project-manager": [
                {
                    "id": "projectsExplorerFavorites",
                    "name": "Favorites"
                },
                 ...
                 ...
}

In the 'feature contributions' page, you can find the id name in the keyword 'views'. Then add it to the settings.json, and it will work. Below is the settings.json file.

"activitusbar.views": [
        {
            "name": "explorer",
            "codicon": "explorer-view-icon"
        },
        {
            "name": "search",
            "codicon": "search-view-icon"
        },
        {
            "name": "scm",
            "codicon": "source-control-view-icon"
        },
        {
            "name": "debug",
            "codicon": "run-view-icon"
        },
        {
            "name": "extensions",
            "codicon": "extensions-view-icon"
        },
        {
            "name": "projectsExplorerFavorites",
            "codicon": "folder"
        },
        {
            "name": "settings",
            "codicon": "gear"
        },
    ],

Thanks again.

Gruntfuggly commented 1 year ago

Glad you got it working!