Hide outline in the editor through an extension

Hey I want to remove the outline view in the monaco editor within theia through an extension.

theia/packages/hide-outline/src/browser/hide-outline-contribution.ts

import { injectable } from 'inversify';

import { MonacoOutlineContribution } from '@theia/monaco/lib/browser/monaco-outline-contribution';

@injectable()

// Add contribution interface to be implemented, e.g. "HideOutlineContribution implements MonacoOutlineContribution"

export class HideOutlineContribution extends MonacoOutlineContribution {

}

theia/packages/hide-outline/src/browser/hide-outline-frontend-module.ts

/**
 * Generated using theia-extension-generator
 */
import { ContainerModule } from 'inversify';
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
import { MonacoOutlineContribution } from '@theia/monaco/lib/browser/monaco-outline-contribution';
import { OutlineViewContribution } from '@theia/outline-view/lib/browser/outline-view-contribution';
import { HideOutlineContribution } from './hide-outline-contribution';


export default new ContainerModule((bind, unbind, isBound, rebind) => {
    bind(FrontendApplicationContribution).toService(HideOutlineContribution);
    // Replace this line with the desired binding, e.g. "bind(CommandContribution).to(HideOutlineContribution)
    rebind(MonacoOutlineContribution).toConstantValue({
        registerCommands: () => { },
        registerMenus: () => { },
        registerKeybindings: () => { },
        registerToolbarItems: () => { }
    } as any);
    // unbind(MonacoOutlineContribution);
});

Updated the package.json for browser:

{
  "private": true,
  "name": "@theia/example-browser",
  "version": "1.9.0",
  "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
  "theia": {
    "frontend": {
      "config": {
        "applicationName": "Theia Browser Example",
        "preferences": {
          "files.enableTrash": false
        }
      }
    }
  },
  "dependencies": {
    "@theia/api-samples": "^1.9.0",
    "@theia/callhierarchy": "^1.9.0",
    "@theia/console": "^1.9.0",
    "@theia/core": "^1.9.0",
    "@theia/debug": "^1.9.0",
    "@theia/editor": "^1.9.0",
    "@theia/editor-preview": "^1.9.0",
    "@theia/file-search": "^1.9.0",
    "@theia/filesystem": "^1.9.0",
    "@theia/getting-started": "^1.9.0",
    "@theia/git": "^1.9.0",
    "@theia/keymaps": "^1.9.0",
    "@theia/markers": "^1.9.0",
    "@theia/messages": "^1.9.0",
    "@theia/metrics": "^1.9.0",
    "@theia/mini-browser": "^1.9.0",
    "@theia/monaco": "^1.9.0",
    "@theia/navigator": "^1.9.0",
    "@theia/output": "^1.9.0",
    "@theia/plugin-dev": "^1.9.0",
    "@theia/plugin-ext": "^1.9.0",
    "@theia/plugin-ext-vscode": "^1.9.0",
    "@theia/plugin-metrics": "^1.9.0",
    "@theia/preferences": "^1.9.0",
    "@theia/preview": "^1.9.0",
    "@theia/process": "^1.9.0",
    "@theia/scm": "^1.9.0",
    "@theia/scm-extra": "^1.9.0",
    "@theia/search-in-workspace": "^1.9.0",
    "@theia/task": "^1.9.0",
    "@theia/terminal": "^1.9.0",
    "@theia/timeline": "^1.9.0",
    "@theia/typehierarchy": "^1.9.0",
    "@theia/userstorage": "^1.9.0",
    "@theia/variable-resolver": "^1.9.0",
    "@theia/vsx-registry": "^1.9.0",
    "@theia/workspace": "^1.9.0",
    "hide-outline": "^0.0.0"
  },
  "scripts": {
    "prepare": "yarn run clean && yarn build",
    "clean": "theia clean",
    "build": "theia build --mode development",
    "watch": "yarn build --watch",
    "start": "theia start --plugins=local-dir:../../plugins",
    "start:debug": "yarn start --log-level=debug",
    "test": "theia test . --plugins=local-dir:../../plugins --test-spec=../api-tests/**/*.spec.js",
    "test:debug": "yarn test --test-inspect",
    "coverage": "yarn test --test-coverage && yarn coverage:report",
    "coverage:report": "nyc report --reporter=html",
    "coverage:clean": "rimraf .nyc_output && rimraf coverage"
  },
  "devDependencies": {
    "@theia/cli": "^1.9.0"
  }
}

Ran the following command: cd examples/browser && yarn install && yarn build && yarn start
The outline view is still there?
@akosyakov @svenefftinge @vince-fugnitto Any suggestion to hide the outline view in the editor through an extension? Also am I missing something here?

@vinayb21 it doesn’t look like you’re rebinding the view itself in your -module.ts:

/**
* Generated using theia-extension-generator
*/
import { ContainerModule } from 'inversify';
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
import { MonacoOutlineContribution } from '@theia/monaco/lib/browser/monaco-outline-contribution';
import { OutlineViewContribution } from '@theia/outline-view/lib/browser/outline-view-contribution';
import { HideOutlineContribution } from './hide-outline-contribution';


export default new ContainerModule((bind, unbind, isBound, rebind) => {
   bind(FrontendApplicationContribution).toService(HideOutlineContribution);
   // Replace this line with the desired binding, e.g. "bind(CommandContribution).to(HideOutlineContribution)
   rebind(MonacoOutlineContribution).toConstantValue({
       registerCommands: () => { },
       registerMenus: () => { },
       registerKeybindings: () => { },
       registerToolbarItems: () => { }
   } as any);
   // unbind(MonacoOutlineContribution);
});

You are importing it, but not using it (OutlineViewContribution).