Class: ProblemsService
molecule.ProblemsService
Hierarchy
Implements
Constructors
constructor
• new ProblemsService()
Overrides
Defined in
services/problemsService.ts:62
Properties
builtinService
• Private
Readonly
builtinService: IBuiltinService
Defined in
services/problemsService.ts:61
state
• Protected
state: IProblems
<any
>
Implementation of
Overrides
Defined in
services/problemsService.ts:59
statusBarService
• Private
Readonly
statusBarService: IStatusBarService
Defined in
services/problemsService.ts:60
Methods
add
▸ add<T
>(item
): void
Add single or multiple items data
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
item | IProblemsItem <T > | IProblemsItem <T >[] |
Returns
void
Implementation of
Defined in
services/problemsService.ts:75
count
▸ count(name
): number
Count the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
Returns
number
Implementation of
Inherited from
Defined in
emit
▸ emit(name
, ...args
): void
Emit the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
...args | any | Arguments |
Returns
void
Implementation of
Inherited from
Defined in
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Implementation of
Inherited from
Defined in
getProblemsMarkers
▸ Private
getProblemsMarkers(data
): Object
Parameters
Name | Type |
---|---|
data | IProblemsItem <any >[] |
Returns
Object
Name | Type |
---|---|
errors | number |
infos | number |
warnings | number |
Defined in
services/problemsService.ts:179
getState
▸ getState(): IProblems
<any
>
Get the Component state
Returns
IProblems
<any
>
Implementation of
Inherited from
Defined in
onSelect
▸ onSelect(callback
): void
Listen to select a problem tree node
Parameters
Name | Type |
---|---|
callback | (node : IProblemsTreeNode <any >) => void |
Returns
void
Implementation of
Defined in
services/problemsService.ts:157
onUpdateState
▸ onUpdateState(listener
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
listener | (prevState : IProblems <any >, nextState : IProblems <any >) => void |
Returns
void
Implementation of
IProblemsService.onUpdateState
Inherited from
Defined in
remove
▸ remove(id
): void
Remove the specific problem items
Parameters
Name | Type |
---|---|
id | UniqueId | UniqueId [] |
Returns
void
Implementation of
Defined in
services/problemsService.ts:121
removeOnUpdateState
▸ removeOnUpdateState(listener?
): void
Remove the Component update event listening, default is remove all, also you can remove one by pass the listener
Parameters
Name | Type |
---|---|
listener? | Function |
Returns
void
Implementation of
IProblemsService.removeOnUpdateState
Inherited from
Defined in
render
▸ render(nextState?
): void
Initiative notify the component to render the view by the state
Parameters
Name | Type |
---|---|
nextState? | IProblems <any > |
Returns
void
Implementation of
Inherited from
Defined in
reset
▸ reset(): void
Reset the ProblemsService state data
Returns
void
Implementation of
Defined in
services/problemsService.ts:146
setState
▸ setState(values
, callback?
): void
Set the state values, and notify the view component to re render
Parameters
Name | Type | Description |
---|---|---|
values | Partial <IProblems <any >> | update target state values |
callback? | (prevState : IProblems <any >, nextState : IProblems <any >) => void | - |
Returns
void
Implementation of
Inherited from
Defined in
subscribe
▸ subscribe(name
, listener
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
listener | Function | Listener function |
Returns
void
Implementation of
Inherited from
Defined in
toggleProblems
▸ toggleProblems(): void
Toggle the Problems view between display or hidden
Returns
void
Implementation of
IProblemsService.toggleProblems
Defined in
services/problemsService.ts:69
unsubscribe
▸ unsubscribe(name
, listener?
): void
Unsubscribe the specific event and the listener function
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
listener? | Function | optional, it unsubscribes events via name if not pass the listener function |
Returns
void
Implementation of
Inherited from
Defined in
update
▸ update<T
>(item
): void
Update the specific data
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
item | IProblemsItem <T > | IProblemsItem <T >[] |
Returns
void
Implementation of
Defined in
services/problemsService.ts:97
updateStatus
▸ Private
updateStatus<T
>(item
): void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
item | IStatusBarItem <T > |
Returns
void
Defined in
services/problemsService.ts:175
updateStatusBar
▸ Private
updateStatusBar<T
>(): void
Type parameters
Name |
---|
T |
Returns
void