Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename AzureRMTools.ts -> extension.ts #1470

Merged
merged 1 commit into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extension.bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import * as basic from "./src/language/json/Tokenizer";
import * as Completion from './src/vscodeIntegration/Completion';

export * from "./common";
export { activateInternal, deactivateInternal } from './src/AzureRMTools'; // Export activate/deactivate for main.js
export * from "./src/documents/DeploymentDocument";
export * from "./src/documents/parameters/DeploymentFileMapping";
export * from "./src/documents/parameters/DeploymentParametersDoc";
Expand Down Expand Up @@ -62,6 +61,7 @@ export * from "./src/documents/templates/UserFunctionMetadata";
export * from "./src/documents/templates/UserFunctionNamespaceDefinition";
export * from "./src/documents/templates/UserFunctionParameterDefinition";
export * from "./src/documents/templates/VariableDefinition";
export { activateInternal, deactivateInternal } from './src/extension'; // Export activate/deactivate for main.js
export { ext } from './src/extensionVariables';
export * from './src/language/expressions/AzureRMAssets';
export * from "./src/language/expressions/friendlyExpressions";
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let perfStats = {

Object.defineProperty(exports, "__esModule", { value: true });
const ignoreBundle = !/^(false|0)?$/i.test(process.env.AZCODE_ARM_IGNORE_BUNDLE || '');
const extensionPath = ignoreBundle ? "./out/src/AzureRMTools.js" : "./dist/extension.bundle";
const extensionPath = ignoreBundle ? "./out/src/extension.js" : "./dist/extension.bundle";
const extension = require(extensionPath);

async function activate(ctx) {
Expand Down
10 changes: 5 additions & 5 deletions src/AzureRMTools.ts → src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export async function activateInternal(context: vscode.ExtensionContext, perfSta

recordConfigValuesToTelemetry(actionContext);

context.subscriptions.push(new AzureRMTools(context));
context.subscriptions.push(new AzureRMToolsExtension(context));
});

} catch (err) {
Expand Down Expand Up @@ -158,7 +158,7 @@ export function deactivateInternal(): void {
// Nothing to do
}

export class AzureRMTools implements IProvideOpenedDocuments {
export class AzureRMToolsExtension implements IProvideOpenedDocuments {
private readonly _diagnosticsCollection: vscode.DiagnosticCollection;
// Key is normalized URI
private readonly _deploymentDocuments: Map<string, DeploymentDocument> = new Map<string, DeploymentDocument>();
Expand Down Expand Up @@ -1286,8 +1286,8 @@ export class AzureRMTools implements IProvideOpenedDocuments {
incorrectArgCounts.add(encodedName);
}
}
properties.unrecognized = AzureRMTools.convertSetToJson(unrecognized);
properties.incorrectArgs = AzureRMTools.convertSetToJson(incorrectArgCounts);
properties.unrecognized = AzureRMToolsExtension.convertSetToJson(unrecognized);
properties.incorrectArgs = AzureRMToolsExtension.convertSetToJson(incorrectArgCounts);
});
}

Expand Down Expand Up @@ -1369,7 +1369,7 @@ export class AzureRMTools implements IProvideOpenedDocuments {
private _parameterValuesSource: CachedPromise<IParameterValuesSource> = new CachedPromise<IParameterValuesSource>();

public constructor(
private readonly parent: AzureRMTools,
private readonly parent: AzureRMToolsExtension,
public readonly parameterFileUri: vscode.Uri) {
}

Expand Down
2 changes: 1 addition & 1 deletion test/support/typeInDocumentAndWait.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function typeInDocumentAndWait(editor: TextEditor, text: string): P
// Not using the 'type' command because:
// 1) Seems to be not 100% consistent
// 2) It causes vscode to call provideCompletionItems, which causes interaction with
// the triggerSuggest behavior in AzureRMTools.ts
// the triggerSuggest behavior in extension.ts

const initialPosition = editor.selection.anchor;
let setPosition = initialPosition.translate(0, text.length);
Expand Down