How to use @theia/navigator - 4 common examples

To help you get started, we’ve selected a few @theia/navigator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / search-in-workspace / src / browser / search-in-workspace-frontend-contribution.ts View on Github external
registerMenus(menus: MenuModelRegistry): void {
        super.registerMenus(menus);
        menus.registerMenuAction(NavigatorContextMenu.SEARCH, {
            commandId: SearchInWorkspaceCommands.FIND_IN_FOLDER.id
        });
        menus.registerMenuAction(CommonMenus.EDIT_FIND, {
            commandId: SearchInWorkspaceCommands.OPEN_SIW_WIDGET.id
        });
    }
github eclipse-theia / theia / packages / git / src / browser / history / git-history-contribution.ts View on Github external
registerMenus(menus: MenuModelRegistry): void {
        menus.registerMenuAction(NavigatorContextMenu.SEARCH, {
            commandId: GitHistoryCommands.OPEN_FILE_HISTORY.id,
            label: GIT_HISTORY_LABEL
        });
        menus.registerMenuAction(EDITOR_CONTEXT_MENU_GIT, {
            commandId: GitHistoryCommands.OPEN_FILE_HISTORY.id,
            label: GIT_HISTORY_LABEL
        });
        super.registerMenus(menus);
    }
github eclipse-theia / theia / packages / plugin-ext / src / main / browser / plugin-icon-theme-service.ts View on Github external
protected getClassNames(element: URI | URIIconReference | FileStat | FileStatNode | WorkspaceRootNode): string[] {
        if (WorkspaceRootNode.is(element)) {
            const name = this.labelProvider.getName(element);
            if (element.expanded) {
                return [this.rootFolderExpandedIcon, this.expandedFolderNameIcon(name)];
            }
            return [this.rootFolderIcon, this.folderNameIcon(name)];
        }
        if (DirNode.is(element)) {
            if (element.expanded) {
                const name = this.labelProvider.getName(element);
                return [this.folderExpandedIcon, this.expandedFolderNameIcon(name)];
            }
            return this.getFolderClassNames(element);
        }
        if (FileStatNode.is(element)) {
            return this.getFileClassNames(element, element.fileStat.uri);
        }
github eclipse-theia / theia / packages / git / src / browser / diff / git-diff-contribution.ts View on Github external
registerMenus(menus: MenuModelRegistry): void {
        menus.registerMenuAction(NavigatorContextMenu.COMPARE, {
            commandId: GitDiffCommands.OPEN_FILE_DIFF.id
        });
    }