Class: ProblemsService
molecule.ProblemsService
Hierarchy
Implements
Constructors
constructor
• new ProblemsService()
Overrides
Defined in
src/services/problemsService.ts:54
Properties
builtinService
• Private
Readonly
builtinService: IBuiltinService
Defined in
src/services/problemsService.ts:53
state
• Protected
state: IProblems
<any
>
Implementation of
Overrides
Defined in
src/services/problemsService.ts:51
statusBarService
• Private
Readonly
statusBarService: IStatusBarService
Defined in
src/services/problemsService.ts:52
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
src/services/problemsService.ts:67
count
▸ count(name
): number
Count the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
Returns
number
Implementation of
Inherited from
Defined in
src/common/event/eventBus.ts:28
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
src/common/event/eventBus.ts:20
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
src/services/problemsService.ts:167
getState
▸ getState(): IProblems
<any
>
Get the Component state
Returns
IProblems
<any
>
Implementation of
Inherited from
Defined in
onUpdateState
▸ onUpdateState(callback
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
callback | (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
src/services/problemsService.ts:113
removeOnUpdateState
▸ removeOnUpdateState(): void
Remove the Component update event listening
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
src/services/problemsService.ts:138
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
, callback
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
callback | Function | Callback function |
Returns
void
Implementation of
Inherited from
Defined in
src/common/event/eventBus.ts:11
toggleProblems
▸ toggleProblems(): void
Toggle the Problems view between display or hidden
Returns
void
Implementation of
IProblemsService.toggleProblems
Defined in
src/services/problemsService.ts:61
unsubscribe
▸ unsubscribe(name
): void
Unsubscribe the specific event
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
Returns
void
Implementation of
Inherited from
Defined in
src/common/event/eventBus.ts:37
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
src/services/problemsService.ts:89
updateStatus
▸ Private
updateStatus<T
>(item
): void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
item | IStatusBarItem <T > |
Returns
void
Defined in
src/services/problemsService.ts:163
updateStatusBar
▸ Private
updateStatusBar<T
>(): void
Type parameters
Name |
---|
T |
Returns
void