Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected bindConstructorParameter(symbol: symbol | symbol[], staticType: any, position: number) {
if (_.isArray(symbol)) {
decorate(multiInject(symbol[0]) as ParameterDecorator, staticType, position);
}
else {
decorate(inject(symbol) as ParameterDecorator, staticType, position);
}
}
}
constructor(@multiInject(IDebugSessionEventHandlers) private readonly eventHandlers: IDebugSessionEventHandlers[],
@inject(IDebugService) private readonly debugService: IDebugService,
@inject(IDisposableRegistry) private readonly disposables: IDisposableRegistry) { }
public registerEventHandlers() {
abstract readonly id: string;
abstract readonly name: string;
abstract readonly fileExtensions: string[];
protected _glspClient: GLSPClient | undefined;
protected resolveReady: (glspClient: GLSPClient) => void;
protected ready: Promise;
@inject(WorkspaceService) protected readonly workspaceService: WorkspaceService;
@inject(MessageService) protected readonly messageService: MessageService;
@inject(WebSocketConnectionProvider) protected readonly connectionProvider: WebSocketConnectionProvider;
@inject(GLSPClientFactory) protected readonly languageClientFactory: GLSPClientFactory;
@inject(CommandRegistry) protected readonly registry: CommandRegistry;
@inject(EditorManager) protected readonly editorManager: EditorManager;
@multiInject(DiagramManagerProvider) protected diagramManagerProviders: DiagramManagerProvider[];
constructor() {
this.waitForReady();
}
get glspClient(): Promise {
return this._glspClient ? Promise.resolve(this._glspClient) : this.ready;
}
waitForActivation(app: FrontendApplication): Promise {
const activationPromises: Promise[] = [];
const workspaceContains = this.workspaceContains;
if (workspaceContains.length !== 0) {
activationPromises.push(this.waitForItemInWorkspace());
}
const fileExtensions = this.fileExtensions;
constructor(@multiInject(GLSP_TYPES.IContextMenuProvider) @optional() protected menuProviders: IContextMenuItemProvider[] = []) { }
import { WorkflowInstance, WorkflowStatus, ExecutionPointer, EventSubscription, Event } from "../models";
import { WorkflowBase, IWorkflowRegistry, IPersistenceProvider, IWorkflowHost, IQueueProvider, QueueType, IDistributedLockProvider, IBackgroundWorker, TYPES, ILogger, IExecutionPointerFactory } from "../abstractions";
import { WorkflowQueueWorker } from "./workflow-queue-worker";
import { MemoryPersistenceProvider } from "./memory-persistence-provider";
import { SingleNodeLockProvider } from "./single-node-lock-provider";
import { SingleNodeQueueProvider } from "./single-node-queue-provider";
import { NullLogger } from "./null-logger";
@injectable()
export class WorkflowHost implements IWorkflowHost {
@inject(TYPES.IWorkflowRegistry)
private registry : IWorkflowRegistry;
@multiInject(TYPES.IBackgroundWorker)
private workers: IBackgroundWorker[];
@inject(TYPES.IPersistenceProvider)
private persistence: IPersistenceProvider;
@inject(TYPES.IDistributedLockProvider)
private lockProvider: IDistributedLockProvider;
@inject(TYPES.IQueueProvider)
private queueProvider: IQueueProvider = new SingleNodeQueueProvider();
@inject(TYPES.IExecutionPointerFactory)
private pointerFactory : IExecutionPointerFactory;
@inject(TYPES.ILogger)
private logger: ILogger;
constructor(@inject("CommandDispatcher") private commandDispatcher:ICommandDispatcher,
@multiInject("IMetadataEnricher") private enrichers?:IMetadataEnricher[]) {
}
constructor(@multiInject(TYPES.MouseListener) @optional() protected mouseListeners: MouseListener[] = []) { }
constructor(
@inject(IServiceContainer) private serviceContainer: IServiceContainer,
@inject(ICommandManager) private commandManager: ICommandManager,
@inject(IDisposableRegistry) private disposableRegistry: IDisposableRegistry,
@inject(IExtensionContext) private extensionContext: IExtensionContext,
@inject(IDataScienceCodeLensProvider) private dataScienceCodeLensProvider: IDataScienceCodeLensProvider,
@inject(IConfigurationService) private configuration: IConfigurationService,
@inject(IDocumentManager) private documentManager: IDocumentManager,
@inject(IWorkspaceService) private workspace: IWorkspaceService,
@multiInject(IDataScienceCommandListener) @optional() private commandListeners: IDataScienceCommandListener[] | undefined,
@inject(INotebookEditorProvider) private notebookProvider: INotebookEditorProvider,
@inject(IDebugService) private debugService: IDebugService,
@inject(IMemento) @named(GLOBAL_MEMENTO) private globalState: vscode.Memento,
@inject(IJupyterSessionManagerFactory) private jupyterSessionManagerFactory: IJupyterSessionManagerFactory,
@inject(IMultiStepInputFactory) private readonly multiStepFactory: IMultiStepInputFactory,
@inject(KernelSelector) private kernelSelector: KernelSelector,
@inject(IOutputChannel) @named(JUPYTER_OUTPUT_CHANNEL) private jupyterOutput: IOutputChannel
) {
this.dataScienceSurveyBanner = this.serviceContainer.get(IPythonExtensionBanner, BANNER_NAME_DS_SURVEY);
}