Skip to content

Commit e1109a9

Browse files
committed
Add "Make - Force" command to force reloading of all loaded files
1 parent a4a5bb4 commit e1109a9

5 files changed

Lines changed: 23 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [0.89.0]
44

5+
* Add "Make - Force" command to force reloading of all loaded files
56
* Add "Check Code Portability" command to check the portability of loaded files
67
* Format Logtalk source files when saving them depending on the `editor.formatOnSave` setting
78

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ These commands are available from the "Make" sub-menu. They can be triggered fro
265265
| Make - Debug | Recompile loaded files in debug mode |
266266
| Make - Check | Checks for code issues in the loaded files |
267267
| Make - Circular | Checks for code circular dependencies in the loaded files |
268+
| Make - Force | Forces reloading of all loaded files |
268269
| Make - Clean | Deletes all intermediate files generated by the compiler |
269270
| Make - Caches | Deletes the dynamic binding caches |
270271

package.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@
123123
"title": "Make - Circular",
124124
"category": "Logtalk"
125125
},
126+
{
127+
"command": "logtalk.make.force",
128+
"title": "Make - Force",
129+
"category": "Logtalk"
130+
},
126131
{
127132
"command": "logtalk.make.clean",
128133
"title": "Make - Clean",
@@ -557,6 +562,10 @@
557562
"command": "logtalk.make.circular",
558563
"when": "!virtualWorkspace"
559564
},
565+
{
566+
"command": "logtalk.make.force",
567+
"when": "!virtualWorkspace"
568+
},
560569
{
561570
"command": "logtalk.make.clean",
562571
"when": "!virtualWorkspace"
@@ -854,15 +863,20 @@
854863
"when": "resourceLangId == logtalk && !virtualWorkspace",
855864
"group": "make_3_Check@2"
856865
},
866+
{
867+
"command": "logtalk.make.force",
868+
"when": "resourceLangId == logtalk && !virtualWorkspace",
869+
"group": "make_4_Force@1"
870+
},
857871
{
858872
"command": "logtalk.make.clean",
859873
"when": "resourceLangId == logtalk && !virtualWorkspace",
860-
"group": "make_4_Clean@1"
874+
"group": "make_5_Clean@1"
861875
},
862876
{
863877
"command": "logtalk.make.caches",
864878
"when": "resourceLangId == logtalk && !virtualWorkspace",
865-
"group": "make_4_Clean@2"
879+
"group": "make_5_Clean@2"
866880
}
867881
],
868882
"jupytersubmenu": [

src/extension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ export async function activate(context: ExtensionContext) {
504504
{ command: "logtalk.make.debug", callback: uri => LogtalkTerminal.makeDebug(uri, linter)},
505505
{ command: "logtalk.make.check", callback: uri => LogtalkTerminal.makeCheck(uri, linter)},
506506
{ command: "logtalk.make.circular", callback: uri => LogtalkTerminal.makeCircular(uri, linter)},
507+
{ command: "logtalk.make.force", callback: uri => LogtalkTerminal.makeForce(uri, linter)},
507508
{ command: "logtalk.make.clean", callback: uri => LogtalkTerminal.makeClean(uri, linter)},
508509
{ command: "logtalk.make.caches", callback: uri => LogtalkTerminal.makeCaches(uri, linter)},
509510
{ command: "logtalk.run.tests", callback: uri => LogtalkTerminal.runAllTestsViaProfile(uri, linter, testsReporter, testsExplorerProvider)},

src/features/terminal.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,10 @@ export default class LogtalkTerminal {
10311031
LogtalkTerminal.make(uri, linter, "circular", true, "");
10321032
}
10331033

1034+
public static async makeForce(uri: Uri, linter: LogtalkLinter) {
1035+
LogtalkTerminal.make(uri, linter, "force", false, "Reloaded all files.");
1036+
}
1037+
10341038
public static async make(uri: Uri, linter: LogtalkLinter, target: string, showTerminal: boolean, info: string) {
10351039
if (!LogtalkTerminal._terminal) {
10361040
window.showWarningMessage("No Logtalk process is running.");

0 commit comments

Comments
 (0)