跳到主要内容
版本:Next

Class: ProblemsService

molecule.ProblemsService

Hierarchy

Implements

Constructors

constructor

new ProblemsService()

Overrides

Component.constructor

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

IProblemsService.state

Overrides

Component.state

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

NameType
itemIProblemsItem<T> | IProblemsItem<T>[]

Returns

void

Implementation of

IProblemsService.add

Defined in

services/problemsService.ts:75


count

count(name): number

Count the service event

Parameters

NameTypeDescription
namestringEvent name

Returns

number

Implementation of

IProblemsService.count

Inherited from

Component.count

Defined in

common/event/eventBus.ts:28


emit

emit(name, ...args): void

Emit the service event

Parameters

NameTypeDescription
namestringEvent name
...argsanyArguments

Returns

void

Implementation of

IProblemsService.emit

Inherited from

Component.emit

Defined in

common/event/eventBus.ts:20


forceUpdate

forceUpdate(): void

Force to update the Component

Returns

void

Implementation of

IProblemsService.forceUpdate

Inherited from

Component.forceUpdate

Defined in

react/component.ts:81


getProblemsMarkers

Private getProblemsMarkers(data): Object

Parameters

NameType
dataIProblemsItem<any>[]

Returns

Object

NameType
errorsnumber
infosnumber
warningsnumber

Defined in

services/problemsService.ts:179


getState

getState(): IProblems<any>

Get the Component state

Returns

IProblems<any>

Implementation of

IProblemsService.getState

Inherited from

Component.getState

Defined in

react/component.ts:85


onSelect

onSelect(callback): void

Listen to select a problem tree node

Parameters

NameType
callback(node: IProblemsTreeNode<any>) => void

Returns

void

Implementation of

IProblemsService.onSelect

Defined in

services/problemsService.ts:157


onUpdateState

onUpdateState(listener): void

Listen to the Component state update event

Parameters

NameType
listener(prevState: IProblems<any>, nextState: IProblems<any>) => void

Returns

void

Implementation of

IProblemsService.onUpdateState

Inherited from

Component.onUpdateState

Defined in

react/component.ts:73


remove

remove(id): void

Remove the specific problem items

Parameters

NameType
idUniqueId | UniqueId[]

Returns

void

Implementation of

IProblemsService.remove

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

NameType
listener?Function

Returns

void

Implementation of

IProblemsService.removeOnUpdateState

Inherited from

Component.removeOnUpdateState

Defined in

react/component.ts:77


render

render(nextState?): void

Initiative notify the component to render the view by the state

Parameters

NameType
nextState?IProblems<any>

Returns

void

Implementation of

IProblemsService.render

Inherited from

Component.render

Defined in

react/component.ts:69


reset

reset(): void

Reset the ProblemsService state data

Returns

void

Implementation of

IProblemsService.reset

Defined in

services/problemsService.ts:146


setState

setState(values, callback?): void

Set the state values, and notify the view component to re render

Parameters

NameTypeDescription
valuesPartial<IProblems<any>>update target state values
callback?(prevState: IProblems<any>, nextState: IProblems<any>) => void-

Returns

void

Implementation of

IProblemsService.setState

Inherited from

Component.setState

Defined in

react/component.ts:56


subscribe

subscribe(name, listener): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
listenerFunctionListener function

Returns

void

Implementation of

IProblemsService.subscribe

Inherited from

Component.subscribe

Defined in

common/event/eventBus.ts:11


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

NameTypeDescription
nameanyThe event name
listener?Functionoptional, it unsubscribes events via name if not pass the listener function

Returns

void

Implementation of

IProblemsService.unsubscribe

Inherited from

Component.unsubscribe

Defined in

common/event/eventBus.ts:37


update

update<T>(item): void

Update the specific data

Type parameters

Name
T

Parameters

NameType
itemIProblemsItem<T> | IProblemsItem<T>[]

Returns

void

Implementation of

IProblemsService.update

Defined in

services/problemsService.ts:97


updateStatus

Private updateStatus<T>(item): void

Type parameters

Name
T

Parameters

NameType
itemIStatusBarItem<T>

Returns

void

Defined in

services/problemsService.ts:175


updateStatusBar

Private updateStatusBar<T>(): void

Type parameters

Name
T

Returns

void

Defined in

services/problemsService.ts:161