Skip to content

Commit

Permalink
Fix a few more issues related to #81574
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Oct 4, 2019
1 parent 30120e4 commit 92514c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/common/editor/editorGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class EditorGroup extends Disposable {
private focusRecentEditorAfterClose: boolean | undefined;

constructor(
labelOrSerializedGroup: ISerializedEditorGroup,
labelOrSerializedGroup: ISerializedEditorGroup | undefined,
@IInstantiationService private readonly instantiationService: IInstantiationService,
@IConfigurationService private readonly configurationService: IConfigurationService
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ export class FeedbackStatusbarConribution extends Disposable implements IWorkben
if (!this.dropdown) {
const statusContainr = document.getElementById('status.feedback');
if (statusContainr) {
this.dropdown = this._register(this.instantiationService.createInstance(FeedbackDropdown, statusContainr.getElementsByClassName('octicon').item(0), {
const icon = statusContainr.getElementsByClassName('octicon').item(0) as HTMLElement | null;
if (!icon) {
throw new Error('Could not find icon');
}
this.dropdown = this._register(this.instantiationService.createInstance(FeedbackDropdown, icon, {
contextViewProvider: this.contextViewService,
feedbackService: this.instantiationService.createInstance(TwitterFeedbackService),
onFeedbackVisibilityChange: visible => this.entry!.update(this.getStatusEntry(visible))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { IDisposable, toDisposable, UnownedDisposable } from 'vs/base/common/lif
import { values } from 'vs/base/common/map';
import { URI } from 'vs/base/common/uri';
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { GroupIdentifier } from 'vs/workbench/common/editor';
import { IWebviewService, WebviewOptions, WebviewContentOptions } from 'vs/workbench/contrib/webview/browser/webview';
import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
Expand Down Expand Up @@ -131,7 +131,6 @@ export class WebviewEditorService implements IWebviewEditorService {

constructor(
@IEditorService private readonly _editorService: IEditorService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@IEditorGroupsService private readonly _editorGroupService: IEditorGroupsService,
@IWebviewService private readonly _webviewService: IWebviewService,
@IWorkspaceContextService private readonly _contextService: IWorkspaceContextService,
Expand All @@ -150,7 +149,7 @@ export class WebviewEditorService implements IWebviewEditorService {
): WebviewInput {
const webview = this.createWebiew(id, extension, options);

const webviewInput = this._instantiationService.createInstance(WebviewInput, id, viewType, title, new UnownedDisposable(webview), undefined);
const webviewInput = new WebviewInput(id, viewType, title, new UnownedDisposable(webview));
this._editorService.openEditor(webviewInput, {
pinned: true,
preserveFocus: showOptions.preserveFocus,
Expand Down

0 comments on commit 92514c4

Please sign in to comment.