Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const state: RSPState = item as RSPState;
const id1: string = state.type.visibilename;
const serverState = `${this.runStateEnum.get(state.state)}`;
const depStr = `${id1} (${serverState})`;
const icon = await Utils.getIcon(state.type.id, state.type.id);
return { label: `${depStr}`,
iconPath: icon,
contextValue: `RSP${serverState}`,
collapsibleState: TreeItemCollapsibleState.Expanded
};
} else if (this.isServerElement(item)) {
// item is a serverState
const state: ServerStateNode = item as ServerStateNode;
const handle: Protocol.ServerHandle = state.server;
const id1: string = handle.id;
const serverState: string = (state.state === ServerState.STARTED && state.runMode === ServerState.RUN_MODE_DEBUG) ?
'Debugging' :
this.runStateEnum.get(state.state);
const pubState: string = this.publishStateEnum.get(state.publishState);
const depStr = `${id1} (${serverState}) (${pubState})`;
const icon = await Utils.getIcon(state.rsp, handle.type.id);
return { label: `${depStr}`,
iconPath: icon,
contextValue: serverState,
collapsibleState: TreeItemCollapsibleState.Expanded,
command: {
command: 'server.saveSelectedNode',
title: '',
tooltip: '',
arguments: [ state ]
}
};
type: ProtocolStubs.serverType
};
public static readonly serverState: Protocol.ServerState = {
server: ProtocolStubs.serverHandle,
deployableStates: [],
publishState: 0,
runMode: ServerState.RUN_MODE_RUN,
state: 0
};
public static readonly serverDebuggingState: ServerStateNode = {
server: ProtocolStubs.serverHandle,
deployableStates: [],
publishState: 0,
runMode: ServerState.RUN_MODE_DEBUG,
state: 2,
rsp: 'id'
};
public static readonly okStatus: Protocol.Status = {
code: 0,
message: 'ok',
severity: 0,
ok: true,
plugin: 'unknown',
trace: ''
};
public static readonly infoStatus: Protocol.Status = {
code: 0,
message: 'ok',