Skip to content

Commit

Permalink
disable Intellisense for Log points to address #46824 for now
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Apr 3, 2018
1 parent 5b893c1 commit 18e3868
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox';
import * as lifecycle from 'vs/base/common/lifecycle';
import * as dom from 'vs/base/browser/dom';
import { Position } from 'vs/editor/common/core/position';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/zoneWidget';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
Expand All @@ -24,12 +23,6 @@ import { ServicesAccessor, EditorCommand, registerEditorCommand } from 'vs/edito
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
import { IModelService } from 'vs/editor/common/services/modelService';
import uri from 'vs/base/common/uri';
import { SuggestRegistry, ISuggestResult, SuggestContext } from 'vs/editor/common/modes';
import { CancellationToken } from 'vs/base/common/cancellation';
import { ITextModel } from 'vs/editor/common/model';
import { wireCancellationToken } from 'vs/base/common/async';
import { provideSuggestionItems } from 'vs/editor/contrib/suggest/suggest';
import { TPromise } from 'vs/base/common/winjs.base';
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
import { transparent, editorForeground } from 'vs/platform/theme/common/colorRegistry';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
Expand Down Expand Up @@ -214,30 +207,6 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakopintWi
};
this.input.getModel().onDidChangeContent(() => setDecorations());
this.themeService.onThemeChange(() => setDecorations());

this.toDispose.push(SuggestRegistry.register({ scheme: DEBUG_SCHEME, hasAccessToAllModels: true }, {
provideCompletionItems: (model: ITextModel, position: Position, _context: SuggestContext, token: CancellationToken): Thenable<ISuggestResult> => {
let suggestionsPromise: TPromise<ISuggestResult>;
if (this.context === Context.CONDITION || this.context === Context.LOG_MESSAGE && this.isCurlyBracketOpen()) {
suggestionsPromise = provideSuggestionItems(this.editor.getModel(), new Position(this.lineNumber, this.column), 'none', undefined, _context).then(suggestions => {
return {
suggestions: suggestions.map(s => {
if (this.context === Context.CONDITION) {
s.suggestion.overwriteBefore = position.column - 1;
s.suggestion.overwriteAfter = 0;
}

return s.suggestion;
})
};
});
} else {
suggestionsPromise = TPromise.as({ suggestions: [] });
}

return wireCancellationToken(token, suggestionsPromise);
}
}));
}

private createDecorations(): IDecorationOptions[] {
Expand All @@ -257,21 +226,6 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakopintWi
}];
}

private isCurlyBracketOpen(): boolean {
const value = this.input.getModel().getValue();
for (let i = this.input.getPosition().column - 2; i >= 0; i--) {
if (value[i] === '{') {
return true;
}

if (value[i] === '}') {
return false;
}
}

return false;
}

public dispose(): void {
super.dispose();
this.input.dispose();
Expand Down

0 comments on commit 18e3868

Please sign in to comment.