<commit_before>// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from "vscode";
import * as commenter from "../commenter";
import { VSCOBOLConfiguration } from "../vsconfiguration";
import { ICOBOLSettings } from "../iconfiguration";
import { VSExtensionUtils } from "../vsextutis";
import { CobolSymbolInformationProvider } from "../symbolprovider";
import { VSExternalFeatures } from "../vsexternalfeatures";
import { COBOLProgramCommands } from "../cobolprogram";
import { TabUtils } from "../tabstopper";
import { VSLogger } from "../vslogger";

export function activate(context: vscode.ExtensionContext) {
    VSCOBOLConfiguration.externalFeatures = VSExternalFeatures;

    const commands = vscode.commands;
    const settings: ICOBOLSettings = VSCOBOLConfiguration.reinit();

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2pd", function () {
        COBOLProgramCommands.move2pd();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2dd", function () {
        COBOLProgramCommands.move2dd();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2ws", function () {
        COBOLProgramCommands.move2ws();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2anyforward", function () {
        COBOLProgramCommands.move2anyforward();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2anybackwards", function () {
        COBOLProgramCommands.move2anybackwards();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.tab", function () {
        TabUtils.processTabKey(true);
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.revtab", function () {
        TabUtils.processTabKey(false);
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.commentline", function () {
        if (vscode.window.activeTextEditor !== undefined) {
            commenter.processCommentLine();
        }
    }));

    const cobolSelectors = VSExtensionUtils.getAllCobolSelectors(settings);

    try {
        context.subscriptions.push(vscode.languages.registerDocumentSymbolProvider(cobolSelectors, new CobolSymbolInformationProvider()));
    } catch(e) {
        VSExternalFeatures.logException("during registerDocumentSymbolProvider",e as Error);
    }

        // handle Micro Focus .lst files!
    const onDidOpenTextDocumentHandler = vscode.workspace.onDidOpenTextDocument(async (doc: vscode.TextDocument) => {
        VSLogger.logMessage(`Open document ${doc.fileName} / ${doc.uri.scheme}`);
    });
    context.subscriptions.push(onDidOpenTextDocumentHandler);
    VSExternalFeatures.logMessage("COBOL.bitlang extension ready - 2");

}

// this method is called when your extension is deactivated
export function deactivate() {
    //
}<commit_msg>remove debug code<commit_after>// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from "vscode";
import * as commenter from "../commenter";
import { VSCOBOLConfiguration } from "../vsconfiguration";
import { ICOBOLSettings } from "../iconfiguration";
import { VSExtensionUtils } from "../vsextutis";
import { CobolSymbolInformationProvider } from "../symbolprovider";
import { VSExternalFeatures } from "../vsexternalfeatures";
import { COBOLProgramCommands } from "../cobolprogram";
import { TabUtils } from "../tabstopper";
import { VSLogger } from "../vslogger";

export function activate(context: vscode.ExtensionContext) {
    VSCOBOLConfiguration.externalFeatures = VSExternalFeatures;

    const commands = vscode.commands;
    const settings: ICOBOLSettings = VSCOBOLConfiguration.reinit();

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2pd", function () {
        COBOLProgramCommands.move2pd();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2dd", function () {
        COBOLProgramCommands.move2dd();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2ws", function () {
        COBOLProgramCommands.move2ws();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2anyforward", function () {
        COBOLProgramCommands.move2anyforward();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.move2anybackwards", function () {
        COBOLProgramCommands.move2anybackwards();
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.tab", function () {
        TabUtils.processTabKey(true);
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.revtab", function () {
        TabUtils.processTabKey(false);
    }));

    context.subscriptions.push(commands.registerCommand("cobolplugin.commentline", function () {
        if (vscode.window.activeTextEditor !== undefined) {
            commenter.processCommentLine();
        }
    }));

    const cobolSelectors = VSExtensionUtils.getAllCobolSelectors(settings);

    try {
        context.subscriptions.push(vscode.languages.registerDocumentSymbolProvider(cobolSelectors, new CobolSymbolInformationProvider()));
    } catch(e) {
        VSExternalFeatures.logException("during registerDocumentSymbolProvider",e as Error);
    }

    // const onDidOpenTextDocumentHandler = vscode.workspace.onDidOpenTextDocument(async (doc: vscode.TextDocument) => {
    //     VSLogger.logMessage(`Open document ${doc.fileName} / ${doc.uri.scheme}`);
    // });
    // context.subscriptions.push(onDidOpenTextDocumentHandler);
    VSExternalFeatures.logMessage("COBOL.bitlang extension ready");

}

// this method is called when your extension is deactivated
export function deactivate() {
    //
}
{'fraction_non_alphanumeric': 0.12037037037037036, 'fraction_numerical': 0.0035353535353535356, 'mean_word_length': 4.318710832587287, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6498965', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1652, 'n_words': 294}