Skip to content

Commit

Permalink
Do not delete helper function if the old and new procedure name is th…
Browse files Browse the repository at this point in the history
…e same #101
  • Loading branch information
DavidFeldhoff committed Apr 3, 2021
1 parent d885312 commit b1c12aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vscode-extension/src/App logic/Services/ObjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ export class ObjectService {

let parameterTypes: string[] = TestMethodUtils.getParameterTypesOfMethod(oldMethodTreeNode, document);
let newProcedureName: string = TestMethodUtils.getProcedureName(msg.Type, msg.NewValue);
if (newProcedureName.toLowerCase() == document.getText(rangeOfOldIdentifier).toLowerCase())
return false;

if (await TestCodeunitUtils.isProcedureAlreadyDeclared(document, newProcedureName, parameterTypes))
return true;
let newHistoricalProcedureNames: string[] = TestMethodUtils.getProcedureNameHistory(msg.Type, msg.NewValue)
Expand Down

0 comments on commit b1c12aa

Please sign in to comment.