@@ -13,11 +13,12 @@ import { localize } from '../../shared/utilities/vsCodeUtils'
13
13
import { ChildNodeLoader } from '../../awsexplorer/childNodeLoader'
14
14
import { ChildNodePage } from '../../awsexplorer/childNodeLoader'
15
15
import { inspect } from 'util'
16
- import { Workspace } from '../../shared/vscode/workspace'
17
16
import { getLogger } from '../../shared/logger'
18
17
import { IotCertWithPoliciesNode } from './iotCertificateNode'
19
18
import { IotNode } from './iotNodes'
20
19
import { Commands } from '../../shared/vscode/commands'
20
+ import { Settings } from '../../shared/settings'
21
+ import { ClassToInterfaceType } from '../../shared/utilities/tsUtils'
21
22
22
23
/**
23
24
* Represents the group of all IoT Certificates.
@@ -28,7 +29,7 @@ export class IotCertsFolderNode extends AWSTreeNodeBase implements LoadMoreNode
28
29
public constructor (
29
30
public readonly iot : IotClient ,
30
31
public readonly parent : IotNode ,
31
- private readonly workspace = Workspace . vscode ( )
32
+ protected readonly settings : ClassToInterfaceType < Settings > = Settings . instance
32
33
) {
33
34
super ( 'Certificates' , vscode . TreeItemCollapsibleState . Collapsed )
34
35
this . tooltip = 'IoT Certificates'
@@ -99,6 +100,6 @@ export class IotCertsFolderNode extends AWSTreeNodeBase implements LoadMoreNode
99
100
}
100
101
101
102
private getMaxItemsPerPage ( ) : number | undefined {
102
- return this . workspace . getConfiguration ( 'aws' ) . get < number > ( 'iot.maxItemsPerPage' )
103
+ return this . settings . getSection ( 'aws' ) . get < number > ( 'iot.maxItemsPerPage' )
103
104
}
104
105
}
0 commit comments