File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -99,22 +99,24 @@ export class DependencyDataProvider implements TreeDataProvider<ExplorerNode> {
99
99
100
100
private getRootNodes ( ) : Thenable < ExplorerNode [ ] > {
101
101
return new Promise ( ( resolve , reject ) => {
102
- this . _rootItems = new Array < ExplorerNode > ( ) ;
102
+ const rootItems = new Array < ExplorerNode > ( ) ;
103
103
const folders = workspace . workspaceFolders ;
104
104
if ( folders && folders . length ) {
105
105
if ( folders . length > 1 ) {
106
- folders . forEach ( ( folder ) => this . _rootItems . push ( new WorkspaceNode ( {
106
+ folders . forEach ( ( folder ) => rootItems . push ( new WorkspaceNode ( {
107
107
name : folder . name ,
108
108
uri : folder . uri . toString ( ) ,
109
109
kind : NodeKind . Workspace ,
110
110
} , null ) ) ) ;
111
- resolve ( this . _rootItems ) ;
111
+ this . _rootItems = rootItems ;
112
+ resolve ( rootItems ) ;
112
113
} else {
113
114
Jdtls . getProjects ( folders [ 0 ] . uri . toString ( ) ) . then ( ( result : INodeData [ ] ) => {
114
115
result . forEach ( ( project ) => {
115
- this . _rootItems . push ( new ProjectNode ( project , null ) ) ;
116
+ rootItems . push ( new ProjectNode ( project , null ) ) ;
116
117
} ) ;
117
- resolve ( this . _rootItems ) ;
118
+ this . _rootItems = rootItems ;
119
+ resolve ( rootItems ) ;
118
120
} ) ;
119
121
}
120
122
} else {
You can’t perform that action at this time.
0 commit comments