Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
@unmanaged() protected readonly interpreterService: IInterpreterService,
@unmanaged() private readonly executionFactory: IPythonExecutionFactory,
@unmanaged() private readonly configuration: IConfigurationService,
@unmanaged() private readonly knownSearchPaths: IKnownSearchPathsForInterpreters,
@unmanaged() disposableRegistry: IDisposableRegistry,
@unmanaged() protected readonly fileSystem: IFileSystem,
@unmanaged() private readonly logger: ILogger,
@unmanaged() private readonly processServiceFactory: IProcessServiceFactory,
@unmanaged() private readonly commandFactory: IJupyterCommandFactory,
@unmanaged() protected readonly workspace: IWorkspaceService,
@unmanaged() private readonly appShell: IApplicationShell
) {
this.processServicePromise = this.processServiceFactory.create();
disposableRegistry.push(this.interpreterService.onDidChangeInterpreter(async () => this.clearCache()));
if (workspace) {
const disposable = workspace.onDidChangeConfiguration(async e => {
if (e.affectsConfiguration('python.dataScience.searchForJupyter', undefined)) {
// When config changes happen, recreate our commands.
await this.clearCache();
}
});
disposableRegistry.push(disposable);
}
}
/**
public constructor(@unmanaged() private searchPathsProvider: IVirtualEnvironmentsSearchPathProvider,
@unmanaged() serviceContainer: IServiceContainer,
@unmanaged() name: string,
@unmanaged() cachePerWorkspace: boolean = false) {
super(name, serviceContainer, cachePerWorkspace);
this.virtualEnvMgr = serviceContainer.get(IVirtualEnvironmentManager);
this.helper = serviceContainer.get(IInterpreterHelper);
this.fileSystem = serviceContainer.get(IFileSystem);
}
// tslint:disable-next-line:no-empty
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { injectable, decorate, unmanaged } from 'inversify';
import { Widget, FocusTracker } from '@phosphor/widgets';
import { Message } from '@phosphor/messaging';
import { Signal } from '@phosphor/signaling';
import { Disposable, DisposableCollection, MaybePromise } from '../../common';
import { KeyCode, KeysOrKeyCodes } from '../keys';
import PerfectScrollbar from 'perfect-scrollbar';
decorate(injectable(), Widget);
decorate(unmanaged(), Widget, 0);
export * from '@phosphor/widgets';
export * from '@phosphor/messaging';
export const DISABLED_CLASS = 'theia-mod-disabled';
export const EXPANSION_TOGGLE_CLASS = 'theia-ExpansionToggle';
export const COLLAPSED_CLASS = 'theia-mod-collapsed';
export const SELECTED_CLASS = 'theia-mod-selected';
export const FOCUS_CLASS = 'theia-mod-focus';
@injectable()
export class BaseWidget extends Widget {
protected readonly toDispose = new DisposableCollection();
protected readonly toDisposeOnDetach = new DisposableCollection();
protected scrollBar?: PerfectScrollbar;
public constructor(
@unmanaged() protected storage: IEventStore,
@unmanaged() protected aggtClass: ConcreteType,
@unmanaged() protected eventBus?: IEventBus) {
}
constructor(
@unmanaged() private host: string = 'localhost',
@unmanaged() private port: number = 1113,
@unmanaged() private settings: EventStore.ConnectionSettings = {}) {
}
constructor (
@unmanaged() private readonly aggregateRootConstructor: ClassConstructor,
@unmanaged() private readonly writeModelConstructor: ClassConstructor,
@unmanaged() private readonly databaseConnection: Connection,
@unmanaged() private readonly bus: Bus,
@unmanaged() protected readonly logger: Logger
) {
this.repository = databaseConnection.getRepository(writeModelConstructor)
}
constructor(
@inject(IServiceContainer) private readonly serviceContainer: IServiceContainer,
@unmanaged() protected readonly azureBlobStorageAccount: string,
@unmanaged() protected readonly azureBlobStorageContainer: string,
@unmanaged() protected readonly azureCDNBlobStorageAccount: string,
private getBlobStore: (uri: string) => Promise = _getAZBlobStore
) { }
public async getPackages(packageName: string, resource: Resource): Promise {
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { injectable, decorate, unmanaged } from "inversify";
import { Widget } from "@phosphor/widgets";
import { Message } from "@phosphor/messaging";
import { Disposable, DisposableCollection, MaybePromise } from '../../common';
import { KeyCode, KeysOrKeyCodes } from '../keys';
import PerfectScrollbar from 'perfect-scrollbar';
decorate(injectable(), Widget);
decorate(unmanaged(), Widget, 0);
export * from "@phosphor/widgets";
export * from "@phosphor/messaging";
export const DISABLED_CLASS = 'theia-mod-disabled';
export const COLLAPSED_CLASS = 'theia-mod-collapsed';
export const SELECTED_CLASS = 'theia-mod-selected';
export const FOCUS_CLASS = 'theia-mod-focus';
@injectable()
export class BaseWidget extends Widget {
protected readonly toDispose = new DisposableCollection();
protected readonly toDisposeOnDetach = new DisposableCollection();
protected scrollBar?: PerfectScrollbar;
protected scrollOptions?: PerfectScrollbar.Options;
constructor(
@unmanaged() readonly type: string,
@unmanaged() readonly extensionPath: string
) {
this.pckPath = path.join(this.extensionPath, 'package.json');
this.pck = this.parse();
this.debuggerContribution = this.resolveDebuggerContribution();
this.label = this.debuggerContribution.then(({ label }) => label);
this.languages = this.debuggerContribution.then(({ languages }) => languages);
this.schemaAttributes = this.resolveSchemaAttributes();
}