File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
import * as vscode from "vscode" ;
2
- import { config } from "../../extension" ;
2
+ import { config , workspaceState } from "../../extension" ;
3
+ import { currentWorkspaceFolder } from "../../utils" ;
3
4
4
5
export interface NodeOptions {
5
6
extraNode ?: boolean ;
@@ -26,14 +27,15 @@ export class NodeBase {
26
27
this . label = label ;
27
28
this . fullName = fullName ;
28
29
const { workspaceFolder, namespace, extraNode } = options ;
29
- this . workspaceFolder = workspaceFolder ;
30
+ this . workspaceFolder = workspaceFolder || currentWorkspaceFolder ( ) ;
30
31
this . conn = config ( "conn" , workspaceFolder ) ;
31
32
this . namespace = namespace || this . conn . ns ;
32
33
this . extraNode = extraNode ;
33
34
}
34
35
35
36
public get connInfo ( ) : string {
36
- return `${ this . conn . host } :${ this . conn . port } [${ this . namespace } ]` ;
37
+ const port = workspaceState . get ( this . workspaceFolder + ":port" , this . conn . port ) ;
38
+ return `${ this . conn . host } :${ port } [${ this . namespace } ]` ;
37
39
}
38
40
39
41
public getTreeItem ( ) : vscode . TreeItem {
You can’t perform that action at this time.
0 commit comments