Skip to content

Commit

Permalink
Merge pull request #34 from patilpankaj212/update-status-bar-item
Browse files Browse the repository at this point in the history
update status bar item name
  • Loading branch information
Cesar Rodriguez authored Sep 9, 2021
2 parents 2c7741b + c0bdc2d commit 254a305
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const REGO_HELPER_TEMPLATE = `# Full Rego Documentation: https://www.open
# If used in a comparison expression (y[_].name = x), the entire condition will be true if there exists at least one document in y for which the comparison is true.`;

export const TERRASCAN_VERSION = "v1.10.0";
export const EXTENSION_NAME = "terrascan-rego-editor";


// REGO EDITOR COMMANDS
Expand Down
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { scan } from "./commands/scan";
import { initializeStatusBarItem } from './utils/configuration';
import { syncCmd } from './commands/syncCommand';
import { MetadataCodeLensProvider } from './providers/metadataCodeLensProvider';
import { COMMAND_CONFIGURE, COMMAND_DOWNLOAD_POLICY, COMMAND_FETCH_ALL_CUSTOM_RULES, COMMAND_GENERATE_CONFIG, COMMAND_GENERATE_REGO, COMMAND_SCAN, COMMAND_SYNC } from './constants';
import { COMMAND_CONFIGURE, COMMAND_DOWNLOAD_POLICY, COMMAND_FETCH_ALL_CUSTOM_RULES, COMMAND_GENERATE_CONFIG, COMMAND_GENERATE_REGO, COMMAND_SCAN, COMMAND_SYNC, EXTENSION_NAME } from './constants';
import { Policy, PolicyDataProvider } from "./providers/PolicyDataProvider";
import { downloadPolicy } from './commands/downloadPolicy';

Expand All @@ -30,7 +30,7 @@ export function activate(context: vscode.ExtensionContext) {

// initialize extension logger
LogUtils.setLoggerObject(new RegoLogger(context));
LogUtils.logMessage('rego-editor activated!');
LogUtils.logMessage(`${EXTENSION_NAME} activated!`);

// initialize status bar item for configure command
initializeStatusBarItem(COMMAND_CONFIGURE);
Expand Down
3 changes: 2 additions & 1 deletion src/utils/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

import * as vscode from "vscode";
import { EXTENSION_NAME } from "../constants";

const rootConfig: string = "regoeditor";
const statusBarItem: vscode.StatusBarItem = vscode.window.createStatusBarItem();
Expand Down Expand Up @@ -58,7 +59,7 @@ export function isUseDefaultProvider(): boolean {

export function initializeStatusBarItem(command: string): void {
statusBarItem.command = command;
statusBarItem.text = rootConfig;
statusBarItem.text = EXTENSION_NAME;
statusBarItem.show();
};

Expand Down

0 comments on commit 254a305

Please sign in to comment.