Skip to content

Commit

Permalink
Add message for .edit when no file is found
Browse files Browse the repository at this point in the history
  • Loading branch information
znorman-harris committed Dec 6, 2023
1 parent 6b5679f commit 45cd09f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Code style revamp! We reworked how routines, routine methods, properties, and st

Added a new preference for notebooks called "Quiet Mode" that allows you to control the IDL preference for `!quiet` when executing notebook cells.

When using ".edit" in the debug console, added a message that let's you know that a matching file was not found.

## 4.1.0 November 2023

Fixed a bug with the debugger that would fail to get information about your IDL session.
Expand Down
1 change: 1 addition & 0 deletions libs/translation/src/lib/languages/en/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ export const EN: ITranslation = {
noRoutineFound:
'No main level program or function/procedure with same name as file found',
returning: 'File compiled while active, returning...',
nothingToEdit: 'No matching file found',
noPauseOnWindows: 'Pause is not currently supported on Windows platforms',
syntaxError:
'IDL detected a syntax error on this line when compiling your code',
Expand Down
2 changes: 2 additions & 0 deletions libs/translation/src/lib/translation.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ export interface ITranslation {
syntaxError: string;
/** Warning text for the debug console to let users know it is a preview feature */
previewWarning: string;
/** When no file is found from .edit */
nothingToEdit: string;
};
/** Error translations */
errors: {
Expand Down
7 changes: 7 additions & 0 deletions libs/vscode/debug/src/lib/idl-debug-adapter.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,13 @@ export class IDLDebugAdapter extends LoggingDebugSession {
vscode.commands.executeCommand(VSCODE_COMMANDS.OPEN_FILE, file, {
preview: false,
});
} else {
this.sendEvent(
new OutputEvent(
`${IDL_TRANSLATION.debugger.adapter.nothingToEdit}\n`,
'stderr'
)
);
}
}

Expand Down

0 comments on commit 45cd09f

Please sign in to comment.