Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.

Commit dc79dd0

Browse files
committed
fix: open the Apex class in the Editor View after it is created
1 parent decd599 commit dc79dd0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/salesforce-components/apexUtils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@ export async function createApexClass(name: string, folder: string, classText?:
5555
throw error;
5656
}
5757

58+
// Open the file in the text editor
59+
await pause(Duration.seconds(1));
60+
const workbench = getWorkbench();
61+
const textEditor = await getTextEditor(workbench, name + '.cls');
62+
5863
// Handle breakpoint if specified
5964
if (breakpoint) {
6065
log('createApexClass() - Setting breakpoints');
6166
await pause(Duration.seconds(5)); // wait for file to be saved and loaded
6267

63-
const workbench = getWorkbench();
64-
const textEditor = await getTextEditor(workbench, name + '.cls');
6568
log(`createApexClass() - Set breakpoint ${breakpoint}`);
6669
await textEditor.toggleBreakpoint(breakpoint);
6770
}

0 commit comments

Comments
 (0)