Skip to content

Commit bfb6e66

Browse files
committed
The fastiotDescription key has been added to Launch
1 parent f574c7b commit bfb6e66

File tree

7 files changed

+29
-23
lines changed

7 files changed

+29
-23
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@
482482
},
483483
{
484484
"command": "viewLaunchs.AddEnviroment",
485-
"when": "view == viewLaunchs && viewItem == iotenviroments",
485+
"when": "view == viewLaunchs && viewItem == iotenviroment",
486486
"group": "inline"
487487
},
488488
{

src/IotLaunch.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ export class IotLaunch {
5252
public get Options(): IotOption[] {
5353
return this._options;}
5454

55-
private _environments:IotLaunchEnvironment;
56-
public get Environments(): IotLaunchEnvironment {
57-
return this._environments;}
55+
private _environment:IotLaunchEnvironment;
56+
public get Environment(): IotLaunchEnvironment {
57+
return this._environment;}
5858

5959
constructor(workspaceDirectory:string){
6060
this._workspaceDirectory=workspaceDirectory;
6161
this._launchFilePath=<string>this.WorkspaceDirectory+"\\.vscode\\launch.json";
6262
this._tasksFilePath=<string>this.WorkspaceDirectory+"\\.vscode\\tasks.json";
6363
this._options = [];
64-
this._environments = new IotLaunchEnvironment();
64+
this._environment = new IotLaunchEnvironment();
6565
}
6666

6767
public Load(idLaunch:string,devices: Array<IotDevice>): IotResult {
@@ -148,7 +148,7 @@ export class IotLaunch {
148148
//fastiotIdTemplate
149149
this._idTemplate=jsonObj.fastiotIdTemplate;
150150
//Environments
151-
if(jsonObj.env) this.Environments.FromJSON(jsonObj.env);
151+
if(jsonObj.env) this.Environment.FromJSON(jsonObj.env);
152152
//Label-name
153153
this._label=jsonObj.name;
154154
//Description
@@ -500,7 +500,7 @@ export class IotLaunch {
500500
let jsonLaunch = result.returnObject;
501501
const launch=jsonLaunch.configurations.find((x:any) => x.fastiotIdLaunch ==this.IdLaunch);
502502
if (launch) {
503-
launch.env= this.Environments.ToJSON();
503+
launch.env= this.Environment.ToJSON();
504504
//write file
505505
result=this.SaveLaunch(jsonLaunch);
506506
if(result.Status==StatusResult.Error) {

src/LaunchNode.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ export class LaunchNode extends LaunchTreeItemNode {
1515
return this._launch;}
1616

1717
public Options:LaunchTreeItemNode;
18-
public Environments:LaunchTreeItemNode;
18+
public Environment:LaunchTreeItemNode;
1919

2020
constructor(launch: IotLaunch){
2121
super("Configuration",undefined, undefined,vscode.TreeItemCollapsibleState.Collapsed,undefined);
2222
this._launch=launch;
2323
this.label=this._launch.Label;
24-
this.tooltip=this._launch.Label;
24+
let tooltip:vscode.MarkdownString;
25+
if(this._launch.Description)
26+
tooltip= new vscode.MarkdownString(`$(debug-start) ${this._launch.Label} \nDescription: ${this._launch.Description}`,true);
27+
else
28+
tooltip=new vscode.MarkdownString(`$(debug-start) ${this._launch.Label}`,true);
29+
this.tooltip=tooltip;
2530
//view
2631
this.contextValue="iotlaunch";
2732
//Options
@@ -34,15 +39,15 @@ export class LaunchNode extends LaunchTreeItemNode {
3439
//Added in childs
3540
this.Childs.push(this.Options);
3641
//Environments
37-
this.Environments=new LaunchTreeItemNode("Environments",undefined,"Environments",
42+
this.Environment=new LaunchTreeItemNode("Environment",undefined,"Environment",
3843
vscode.TreeItemCollapsibleState.Collapsed,this);
39-
this.Environments.contextValue="iotenviroments";
40-
this.Environments.iconPath = {
44+
this.Environment.contextValue="iotenviroment";
45+
this.Environment.iconPath = {
4146
light: path.join(__filename, '..', '..', 'resources', 'light', 'enviroment.svg'),
4247
dark: path.join(__filename, '..', '..', 'resources', 'dark', 'enviroment.svg')
4348
};
4449
//Added in childs
45-
this.Childs.push(this.Environments);
50+
this.Childs.push(this.Environment);
4651
//Build
4752
this.Build();
4853
}
@@ -81,13 +86,13 @@ export class LaunchNode extends LaunchTreeItemNode {
8186
public BuildEnvironments() {
8287
//main
8388
//create child elements
84-
this.Environments.Childs=[];
89+
this.Environment.Childs=[];
8590
let item:LaunchTreeItemNode;
86-
this._launch.Environments.Items.forEach((value,key) => {
91+
this._launch.Environment.Items.forEach((value,key) => {
8792
item = new LaunchTreeItemNode(key,value,value,
88-
vscode.TreeItemCollapsibleState.None,this.Environments);
93+
vscode.TreeItemCollapsibleState.None,this.Environment);
8994
item.contextValue="iotenviromentitem"
90-
this.Environments.Childs.push(item);
95+
this.Environment.Childs.push(item);
9196
});
9297
}
9398

src/actionsLaunch/managementEnviroment.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function addEnviroment(treeData: TreeDataLaunchsProvider,item:Launc
4242
return;
4343
}
4444
//Main process
45-
launchNode.Launch.Environments.Add(nameEnviroment,valueEnviroment);
45+
launchNode.Launch.Environment.Add(nameEnviroment,valueEnviroment);
4646
result=launchNode.Launch.WriteEnvironments();
4747
launchNode.BuildEnvironments();
4848
//Message
@@ -73,7 +73,7 @@ export async function renameEnviroment(treeData: TreeDataLaunchsProvider,item:La
7373
return;
7474
}
7575
//Main process
76-
launchNode.Launch.Environments.Rename(<string>item.label,newName);
76+
launchNode.Launch.Environment.Rename(<string>item.label,newName);
7777
result=launchNode.Launch.WriteEnvironments();
7878
launchNode.BuildEnvironments();
7979
//Message
@@ -104,7 +104,7 @@ export async function editEnviroment(treeData: TreeDataLaunchsProvider,item:Laun
104104
return;
105105
}
106106
//Main process
107-
launchNode.Launch.Environments.Edit(<string>item.label,newValue);
107+
launchNode.Launch.Environment.Edit(<string>item.label,newValue);
108108
result=launchNode.Launch.WriteEnvironments();
109109
launchNode.BuildEnvironments();
110110
//Message
@@ -122,7 +122,7 @@ export async function deleteEnviroment(treeData: TreeDataLaunchsProvider,item:La
122122
let launchNode=<LaunchNode>environmentsNode.Parent;
123123
let result:IotResult;
124124
//Main process
125-
launchNode.Launch.Environments.Remove(<string>item.label);
125+
launchNode.Launch.Environment.Remove(<string>item.label);
126126
result=launchNode.Launch.WriteEnvironments();
127127
launchNode.BuildEnvironments();
128128
//Message
-3.95 MB
Binary file not shown.

templates/system/dotnet-console-runtime-info/template.fastiot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ id: dotnet-console-runtime-info # unique
44
#isVisible: yes # yes,no. Related to the dependsOn parameter. Coming in one of the next version
55
platform: # win32, linux. Only Windows is currently supported
66
- win32
7-
version: "0.1"
8-
releaseDate: "2023-02-22" # YYYY-MM-DD
7+
version: "0.2"
8+
releaseDate: "2023-03-15" # YYYY-MM-DD
99
forVersionExt: 0.3.0
1010
author: DevDotNet.ORG
1111
emailAuthor: fastiot@devdotnet.org

templates/system/dotnet-console-runtime-info/template/.vscode/insert_launch_key.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"fastiotIdDevice": "%{device.id}",
66
"fastiotProject":"%{project.mainfile.path.relative.aslinux}",
77
"fastiotIdTemplate": "%{template.id}",
8+
"fastiotDescription": "Launch with logging. \nRsync copying executable files - project_folder/rsync.log. \nDebugger - /var/log/vsdbg.log.",
89
"name": "%{launch.label}",
910
"type": "coreclr",
1011
"request": "launch",

0 commit comments

Comments
 (0)