From 29f46a5e6f92f821375a07fab1c4366aac337497 Mon Sep 17 00:00:00 2001 From: willeand Date: Tue, 4 Jun 2024 11:14:33 -0700 Subject: [PATCH] Creates createJSON that allows user to create customizations and then create JSON file before it creates the PDF --- output/data.json | 2 +- package.json | 4 ++++ src/extension.ts | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/output/data.json b/output/data.json index f6071a0..02a7603 100644 --- a/output/data.json +++ b/output/data.json @@ -1 +1 @@ -{"3":["Improper Capitalized Primitive Type"],"4":["Improper Capitalized Primitive Type"],"12":["Code Smell: Consider refactoring to reduce method length"],"15":["Improper Capitalized Primitive Type","Improper Capitalized Primitive Type"],"16":["Improper Capitalized Primitive Type","Improper Capitalized Primitive Type"],"17":["Improper Capitalized Primitive Type"],"30":["Code smell found: Long Parameters in method public static int addNumbers (int a, int b, int c, int d){"],"38":["Code Smell: Consider refactoring to reduce method length"],"57":["Improper Capitalized Primitive Type"]} \ No newline at end of file +{"12":["Code Smell: Consider refactoring to reduce method length"],"30":["Code smell found: Long Parameters in method public static int addNumbers (int a, int b, int c, int d){"],"38":["Code Smell: Consider refactoring to reduce method length"]} \ No newline at end of file diff --git a/package.json b/package.json index 1b7853c..a83a227 100644 --- a/package.json +++ b/package.json @@ -96,6 +96,10 @@ { "command": "extension.longParameters", "title": "findLongParameters" + }, + { + "command": "extension.createJSON", + "title": "createJSON" } ], "menus": { diff --git a/src/extension.ts b/src/extension.ts index 7032e36..2777ef8 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -21,9 +21,13 @@ const filePath = 'C:\\Users\\Will\\Desktop\\cw\\gradeFast-1.0\\output\\data.json export function activate(context: vscode.ExtensionContext) { const disposable = vscode.commands.registerCommand('extension.findCapitalizedPrimitiveTypes', () => { findCapitalizedPrimitiveTypes(myMap); - convertMapToJson(myMap, filePath); }); + const create = vscode.commands.registerCommand('extension.createJSON', ()=> { + convertMapToJson(myMap, filePath); + } + ) + const disposable2 = vscode.commands.registerCommand('extension.findCapitalizedMethodName', () => { findCapitalizedMethodName(myMap); } );