Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple widget editor that is hidden from extensions #46169

Merged
merged 3 commits into from
Mar 20, 2018

Conversation

isidorn
Copy link
Contributor

@isidorn isidorn commented Mar 20, 2018

#46112

Introduces a new "type" of editor that will not be sent to extensions. Work that needs to be done:

  • introduce isSimpleWdiget flag such that basic commands are not sent via command service so extensions can not intercept
  • refine editorTextFocus to not be set for simple editors
  • introduce new context inputFocus which will be set for both simple and regular editors
  • update context of fitting commands to the new textFocus (probably will not be a part of this PR due to large number of files touched)
  • add if statement in extension host to not send simple editors

@isidorn isidorn added this to the March 2018 milestone Mar 20, 2018
@isidorn isidorn changed the title introduce simple widget editor. Simple widget editor that is hidden from extensions Mar 20, 2018
@@ -33,6 +33,7 @@ import { Color } from 'vs/base/common/color';
import { IMouseEvent } from 'vs/base/browser/mouseEvent';
import { ClassName } from 'vs/editor/common/model/intervalTree';
import { ITextModel, IModelDecorationOptions } from 'vs/editor/common/model';
import { ICommandDelegate } from '../view/viewController';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolute imports

/**
* A context key that is set when any editor input has focus (regular editor, repl input...).
*/
export const inputFocus = new RawContextKey<boolean>('inputFocus', false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ask in the stand-up what would be a good name. Perhaps textInputFocus is better than inputFocus, as there might in the future be other types of inputs, like drop downs or radio buttons...

@@ -30,7 +30,7 @@ export class ReplInputEditor extends CodeEditorWidget {
@IContextKeyService contextKeyService: IContextKeyService,
@IThemeService themeService: IThemeService
) {
super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService);
super(domElement, options, true, instantiationService, codeEditorService, commandService, contextKeyService, themeService);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's postpone turning the flag to true here until we get the commands sorted out. Otherwise, I don't think cursor left/cursor right will work in the repl.

@isidorn isidorn merged commit 1ab1a3d into master Mar 20, 2018
@isidorn isidorn deleted the isidorn/simpleWidgetEditor branch March 20, 2018 10:13
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants