This repository was archived by the owner on Dec 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Added notification when filename is wrong. #63
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
80be2fe
Adding notification for the file name deployed to device
a3654e0
added popup for simulator
7ae7f2d
changed the message
0d98482
Update locales/en/out/constants.i18n.json
FMounz dfe1af6
changed constant
e28ff19
removed link from outputchannel
8d6af89
changed error debug
e6ff645
changed condition
43466dd
solved typo
da221ab
merge with dev
47b49b4
changed code
01c54f8
removed white line
0d53754
Update locales/en/out/constants.i18n.json
FMounz 4dfea65
Update locales/en/out/constants.i18n.json
FMounz 980cdb5
Update src/constants.ts
FMounz 1026868
Update src/constants.ts
FMounz 515f840
changes
16cb522
Merge branch 'users/t-chcido/filename-check' of https://github.com/mi…
0201ce3
Update locales/en/out/constants.i18n.json
FMounz 333a11a
Update src/constants.ts
FMounz 8bada49
added capital P to Python
1f2e781
changed python to Python
c8fcfa8
changes
4bfe5a0
Merge branch 'dev' into users/t-chcido/filename-check
ae33c00
used prettier
f8903ca
removed useless characters
FMounz 8c1a558
removed spreding operator
4df6598
Merge branch 'dev' into users/t-chcido/filename-check
34d2207
merged with dev
1c9380c
deleted unused file
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,9 @@ | |
|
||
import * as vscode from "vscode"; | ||
import { validCodeFileName } from "./utils"; | ||
import { CONSTANTS } from "./constants"; | ||
import { CONSTANTS,DialogResponses } from "./constants"; | ||
|
||
let shouldShowInvalidFileNamePopup: boolean = true; | ||
|
||
export class SimulatorDebugConfigurationProvider | ||
implements vscode.DebugConfigurationProvider { | ||
|
@@ -25,14 +27,25 @@ export class SimulatorDebugConfigurationProvider | |
|
||
// Check file type and name | ||
if ( | ||
!(activeTextEditor.document.languageId === "python") || | ||
!validCodeFileName(currentFilePath) | ||
!(activeTextEditor.document.languageId === "python") | ||
) { | ||
return vscode.window | ||
.showErrorMessage(CONSTANTS.ERROR.INVALID_FILE_NAME_DEBUG) | ||
.showErrorMessage(CONSTANTS.ERROR.INVALID_FILE_EXTENSION_DEBUG) | ||
.then(() => { | ||
return undefined; // Abort launch | ||
}); | ||
}else if(!validCodeFileName(currentFilePath) && shouldShowInvalidFileNamePopup){ | ||
vscode.window | ||
.showInformationMessage(CONSTANTS.INFO.INVALID_FILE_NAME_DEBUG, | ||
...[ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we're removing the spread operator elsewhere might as well do it here too? |
||
DialogResponses.DONT_SHOW, | ||
DialogResponses.MESSAGE_UNDERSTOOD | ||
]) | ||
.then((selection: vscode.MessageItem | undefined) => { | ||
if (selection === DialogResponses.DONT_SHOW) { | ||
shouldShowInvalidFileNamePopup = false; | ||
} | ||
}); | ||
} | ||
// Set process_user_code path as program | ||
config.program = this.pathToScript; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.