Skip to content

Commit 1f45454

Browse files
committed
Fix UI
1 parent 523b5e7 commit 1f45454

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,15 +510,15 @@
510510
"viewsWelcome": [
511511
{
512512
"view": "viewDevices",
513-
"contents": "No devices added [learn more](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/blob/master/docs/Getting-started.md#step-2---adding-a-device). \n[Add Device](command:viewDevices.AddDevice)"
513+
"contents": "No devices. How to add device see [Adding a device](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/blob/master/docs/Getting-started.md#step-2---adding-a-device).\n[Add Device](command:viewDevices.AddDevice)"
514514
},
515515
{
516516
"view": "viewLaunchs",
517-
"contents": "No launchs [learn more](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/blob/master/docs/Additional-materials.md#setting-up-an-existing-project-for-remote-debugging). \n[Add Launch](command:viewLaunchs.Add)"
517+
"contents": "No launchs. How to add Launch see [Adding Launch](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/blob/master/docs/Additional-materials.md#setting-up-an-existing-project-for-remote-debugging).\n[Add Launch](command:viewLaunchs.Add)"
518518
},
519519
{
520520
"view": "viewTemplates",
521-
"contents": "[Create project](command:viewTemplates.CreateProject) \n [About Project Templates](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/blob/master/docs/Project-templates.md)."
521+
"contents": "[Create project](command:viewTemplates.CreateProject)\n About [Project Templates](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/blob/master/docs/Project-templates.md)."
522522
}
523523
]
524524
},

src/actionsLaunch/gotoDevice.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@ import * as path from 'path';
44

55
import { TreeDataLaunchsProvider } from '../TreeDataLaunchsProvider';
66
import { IotResult,StatusResult } from '../IotResult';
7+
import { BaseTreeItem } from '../BaseTreeItem';
78
import { LaunchNode } from '../LaunchNode';
89
import { LaunchTreeItemNode } from '../LaunchTreeItemNode';
10+
import { TreeDataDevicesProvider } from '../TreeDataDevicesProvider';
911

10-
export async function gotoDevice(item:LaunchNode,treeViewDevices:vscode.TreeView<LaunchTreeItemNode>): Promise<void> {
11-
const device = item.Launch.Device;
12+
13+
export async function gotoDevice(item:LaunchNode,treeViewDevices:vscode.TreeView<BaseTreeItem>,treeDataDevicesProvider:TreeDataDevicesProvider): Promise<void> {
14+
const sourceDevice=item.Launch.Device;
15+
if(!sourceDevice) return;
16+
if(typeof sourceDevice === "string") return;
17+
if(!sourceDevice.IdDevice) return;
18+
//find device
19+
const device = treeDataDevicesProvider.FindbyIdDevice(sourceDevice.IdDevice);
1220
//Set focus
1321
if(device) {
1422
//IotDevice or string

src/actionsLaunch/managementEnviroment.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export async function renameEnviroment(treeData: TreeDataLaunchsProvider,item:La
7777
result=launchNode.Launch.WriteEnvironments();
7878
launchNode.BuildEnvironments();
7979
//Message
80-
contextUI.ShowNotification(result);
80+
//contextUI.ShowNotification(result);
8181
//Output
8282
if(result.Status==StatusResult.Error)
8383
contextUI.Output(result);
@@ -108,7 +108,7 @@ export async function editEnviroment(treeData: TreeDataLaunchsProvider,item:Laun
108108
result=launchNode.Launch.WriteEnvironments();
109109
launchNode.BuildEnvironments();
110110
//Message
111-
contextUI.ShowNotification(result);
111+
//contextUI.ShowNotification(result);
112112
//Output
113113
if(result.Status==StatusResult.Error)
114114
contextUI.Output(result);
@@ -126,7 +126,7 @@ export async function deleteEnviroment(treeData: TreeDataLaunchsProvider,item:La
126126
result=launchNode.Launch.WriteEnvironments();
127127
launchNode.BuildEnvironments();
128128
//Message
129-
contextUI.ShowNotification(result);
129+
//contextUI.ShowNotification(result);
130130
//Output
131131
if(result.Status==StatusResult.Error)
132132
contextUI.Output(result);

src/actionsLaunch/renameLaunch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function renameLaunch(treeData: TreeDataLaunchsProvider,item:Launch
3030
//Output
3131
contextUI.Output(result.toStringWithHead());
3232
//Message
33-
contextUI.ShowNotification(result);
33+
//contextUI.ShowNotification(result);
3434
//Refresh
3535
treeData.RefreshsFull();
3636
}

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export async function activate(context: vscode.ExtensionContext) {
247247
//Go to device
248248
let commandGoToDevice = vscode.commands.registerCommand('viewLaunchs.GoToDevice',
249249
(item:LaunchNode) => {
250-
gotoDevice(item,vscodeTreeViewDevices);
250+
gotoDevice(item,vscodeTreeViewDevices,treeDataDevicesProvider);
251251
});
252252
//Add Enviroment
253253
let commandAddEnviroment = vscode.commands.registerCommand('viewLaunchs.AddEnviroment',

0 commit comments

Comments
 (0)