How to use the rsp-client.ServerState.RUN_MODE_DEBUG function in rsp-client

To help you get started, we’ve selected a few rsp-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github redhat-developer / vscode-rsp-ui / src / serverExplorer.ts View on Github external
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 ]
                }
            };
github redhat-developer / vscode-rsp-ui / test / protocolstubs.ts View on Github external
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',