<commit_before>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { localize } from 'vs/nls';
import { isFalsyOrWhitespace } from 'vs/base/common/strings';
import * as resources from 'vs/base/common/resources';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { forEach } from 'vs/base/common/collections';
import { IExtensionPointUser, ExtensionMessageCollector, ExtensionsRegistry } from 'vs/workbench/services/extensions/common/extensionsRegistry';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { MenuId, MenuRegistry, ILocalizedString, IMenuItem, ICommandAction } from 'vs/platform/actions/common/actions';
import { URI } from 'vs/base/common/uri';
import { DisposableStore } from 'vs/base/common/lifecycle';
import { ThemeIcon } from 'vs/platform/theme/common/themeService';

namespace schema {

	// --- menus contribution point

	export interface IUserFriendlyMenuItem {
		command: string;
		alt?: string;
		when?: string;
		group?: string;
	}

	export function parseMenuId(value: string): MenuId | undefined {
		switch (value) {
			case 'commandPalette': return MenuId.CommandPalette;
			case 'touchBar': return MenuId.TouchBarContext;
			case 'editor/title': return MenuId.EditorTitle;
			case 'editor/context': return MenuId.EditorContext;
			case 'explorer/context': return MenuId.ExplorerContext;
			case 'editor/title/context': return MenuId.EditorTitleContext;
			case 'debug/callstack/context': return MenuId.DebugCallStackContext;
			case 'debug/toolbar': return MenuId.DebugToolBar;
			case 'debug/toolBar': return MenuId.DebugToolBar;
			case 'menuBar/webNavigation': return MenuId.MenubarWebNavigationMenu;
			case 'scm/title': return MenuId.SCMTitle;
			case 'scm/sourceControl': return MenuId.SCMSourceControl;
			case 'scm/resourceState/context': return MenuId.SCMResourceContext;//
			case 'scm/resourceFolder/context': return MenuId.SCMResourceFolderContext;
			case 'scm/resourceGroup/context': return MenuId.SCMResourceGroupContext;
			case 'scm/change/title': return MenuId.SCMChangeContext;//
			case 'statusBar/windowIndicator': return MenuId.StatusBarWindowIndicatorMenu;
			case 'view/title': return MenuId.ViewTitle;
			case 'view/item/context': return MenuId.ViewItemContext;
			case 'comments/commentThread/title': return MenuId.CommentThreadTitle;
			case 'comments/commentThread/context': return MenuId.CommentThreadActions;
			case 'comments/comment/title': return MenuId.CommentTitle;
			case 'comments/comment/context': return MenuId.CommentActions;
			case 'notebook/cell/title': return MenuId.NotebookCellTitle;
			case 'extension/context': return MenuId.ExtensionContext;
			case 'timeline/title': return MenuId.TimelineTitle;
			case 'timeline/item/context': return MenuId.TimelineItemContext;
		}

		return undefined;
	}

	export function isProposedAPI(menuId: MenuId): boolean {
		switch (menuId) {
			case MenuId.StatusBarWindowIndicatorMenu:
			case MenuId.MenubarWebNavigationMenu:
			case MenuId.NotebookCellTitle:
				return true;
		}
		return false;
	}

	export function isValidMenuItems(menu: IUserFriendlyMenuItem[], collector: ExtensionMessageCollector): boolean {<commit_msg>:lipstick: dangling comment<commit_after>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { localize } from 'vs/nls';
import { isFalsyOrWhitespace } from 'vs/base/common/strings';
import * as resources from 'vs/base/common/resources';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { forEach } from 'vs/base/common/collections';
import { IExtensionPointUser, ExtensionMessageCollector, ExtensionsRegistry } from 'vs/workbench/services/extensions/common/extensionsRegistry';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { MenuId, MenuRegistry, ILocalizedString, IMenuItem, ICommandAction } from 'vs/platform/actions/common/actions';
import { URI } from 'vs/base/common/uri';
import { DisposableStore } from 'vs/base/common/lifecycle';
import { ThemeIcon } from 'vs/platform/theme/common/themeService';

namespace schema {

	// --- menus contribution point

	export interface IUserFriendlyMenuItem {
		command: string;
		alt?: string;
		when?: string;
		group?: string;
	}

	export function parseMenuId(value: string): MenuId | undefined {
		switch (value) {
			case 'commandPalette': return MenuId.CommandPalette;
			case 'touchBar': return MenuId.TouchBarContext;
			case 'editor/title': return MenuId.EditorTitle;
			case 'editor/context': return MenuId.EditorContext;
			case 'explorer/context': return MenuId.ExplorerContext;
			case 'editor/title/context': return MenuId.EditorTitleContext;
			case 'debug/callstack/context': return MenuId.DebugCallStackContext;
			case 'debug/toolbar': return MenuId.DebugToolBar;
			case 'debug/toolBar': return MenuId.DebugToolBar;
			case 'menuBar/webNavigation': return MenuId.MenubarWebNavigationMenu;
			case 'scm/title': return MenuId.SCMTitle;
			case 'scm/sourceControl': return MenuId.SCMSourceControl;
			case 'scm/resourceState/context': return MenuId.SCMResourceContext;
			case 'scm/resourceFolder/context': return MenuId.SCMResourceFolderContext;
			case 'scm/resourceGroup/context': return MenuId.SCMResourceGroupContext;
			case 'scm/change/title': return MenuId.SCMChangeContext;//
			case 'statusBar/windowIndicator': return MenuId.StatusBarWindowIndicatorMenu;
			case 'view/title': return MenuId.ViewTitle;
			case 'view/item/context': return MenuId.ViewItemContext;
			case 'comments/commentThread/title': return MenuId.CommentThreadTitle;
			case 'comments/commentThread/context': return MenuId.CommentThreadActions;
			case 'comments/comment/title': return MenuId.CommentTitle;
			case 'comments/comment/context': return MenuId.CommentActions;
			case 'notebook/cell/title': return MenuId.NotebookCellTitle;
			case 'extension/context': return MenuId.ExtensionContext;
			case 'timeline/title': return MenuId.TimelineTitle;
			case 'timeline/item/context': return MenuId.TimelineItemContext;
		}

		return undefined;
	}

	export function isProposedAPI(menuId: MenuId): boolean {
		switch (menuId) {
			case MenuId.StatusBarWindowIndicatorMenu:
			case MenuId.MenubarWebNavigationMenu:
			case MenuId.NotebookCellTitle:
				return true;
		}
		return false;
	}

	export function isValidMenuItems(menu: IUserFriendlyMenuItem[], collector: ExtensionMessageCollector): boolean {
{'fraction_non_alphanumeric': 0.1525035765379113, 'fraction_numerical': 0.0, 'mean_word_length': 3.926708949964764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4886455', 'n_tokens_mistral': 2075, 'n_tokens_neox': 1918, 'n_words': 464}