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

quality: miscellaneous typo fixes #8193

Merged
merged 1 commit into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@

Breaking Changes:

- [core] fixed typo (`matchKeybiding` to `matchKeybinding`) in `KeybindingRegistry` [#8193](https://github.com/eclipse-theia/theia/pull/8193)
- [terminal] fixed typo (`rezize` to `resize`) in `TerminalWidget` [#8193](https://github.com/eclipse-theia/theia/pull/8193)
<a name="1_4_0_replace_json"></a>
- [[json]](#1_4_0_replace_json) replaced `@theia/json` Theia extension with `vscode.json-language-features` VS Code extension [#8112](https://github.com/eclipse-theia/theia/pull/8112)
- You can register JSON validations at application startup by implementing `JsonSchemaContribution` Theia contribution point.
- Alternatively you can provide JSON validations using VS Code [contributes.jsonValidation](https://code.visualstudio.com/api/references/contribution-points#contributes.jsonValidation) contribution point.
<a name="1_4_0_absolute_user_storage_uri"></a>
- [[user-storage]](#1_4_0_absolute_user_storage_uri) settings URI must be an absolute to satisfy expectations of `vscode.json-language-features` [#8112](https://github.com/eclipse-theia/theia/pull/8112)
- If you imlpement a custom user storage make sure to check old relaitve locations, otherwise it can cause user data loss.
- If you implement a custom user storage make sure to check old relative locations, otherwise it can cause user data loss.
<a name="1_4_0_deprecate_languages"></a>
- [[languages]](#1_4_0_deprecate_languages) `@theia/languages` extension is deprecated, use VS Code extensions to provide language smartness:
- [[languages]](#1_4_0_deprecate_languages) `@theia/languages` extension is deprecated, use VS Code extensions to provide language smartness:
https://code.visualstudio.com/api/language-extensions/language-server-extension-guide [#8112](https://github.com/eclipse-theia/theia/pull/8112)

## v1.3.0
Expand Down
2 changes: 1 addition & 1 deletion doc/Developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ You should be able to see message of `[${server-name}: ${server-PID}]: IPC start
### Debug the plugin host

- Pass `--hosted-plugin-inspect=9339` arg to the backend server from the command line.
- Instead you can run `Launch Browser Backend` launch configuration which is already preconfigured.
- Instead you can run `Launch Browser Backend` launch configuration which is already pre-configured.
- Open the debug view and run the `Attach to Plugin Host` launch configuration.
- It connects to the plugin host if at least one extension is detected, otherwise it timeouts after 60s.
- If you want to debug the activation then enable `stopOnEntry` flag.
Expand Down
2 changes: 1 addition & 1 deletion doc/api-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [**Deprecation**](#deprecation)

Theia is a framework embracing openness, extensibility, and customizability as much as possible:
- API defaults to public visibilty for clients.
- API defaults to public visibility for clients.
- API defaults to protected for extenders.
- Language constructions prohibiting runtime access to internals are never used.

Expand Down
10 changes: 5 additions & 5 deletions doc/pull-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Contributors guide: https://github.com/eclipse-theia/theia/blob/master/CONTRIBUT
- [7.](#checklist-copyright) Each new file has proper copyright with the current year and the name of contributing entity (individual or company).
<a name="checklist-sign-off"></a>
- [8.](#checklist-sign-off) Commits are signed-off: https://github.com/eclipse-theia/theia/blob/master/CONTRIBUTING.md#sign-your-work.
<a name="checklist-meaningful-commity"></a>
<a name="checklist-meaningful-commits"></a>
- [9.](#checklist-meaningful-commit) Each commit has meaningful title and a body that explains what it does. One can take inspiration from the `What it does` section from the PR.
<a name="checklist-commit-history"></a>
- [10.](#checklist-commit-history) Commit history is rebased on master and contains only meaningful commits and changes (less are usually better).
Expand All @@ -85,9 +85,9 @@ Contributors guide: https://github.com/eclipse-theia/theia/blob/master/CONTRIBUT
## Reviewing

<a name="reviewing-template"></a>
- [1.](#eviewing-template) Reviewers should check that a PR has a [proper description](#pr-template).
- [1.](#reviewing-template) Reviewers should check that a PR has a [proper description](#pr-template).
<a name="reviewing-fn"></a>
- [2.](#eviewing-fn) Reviewers should build and verify changes according to the `How to test` section of a PR description.
- [2.](#reviewing-fn) Reviewers should build and verify changes according to the `How to test` section of a PR description.
<a name="reviewing-checklist"></a>
- [3.](#reviewing-checklist) Reviewers should ensure that all checks from [the review checklist](#review-checklist) are successful.
<a name="reviewing-share"></a>
Expand All @@ -109,8 +109,8 @@ Contributors guide: https://github.com/eclipse-theia/theia/blob/master/CONTRIBUT

### Approving

<a name="justifiying-approve"></a>
- [1.](#justifiying-approve) Each approval should have supporting comments following these guidelines.
<a name="justifying-approve"></a>
- [1.](#justifying-approve) Each approval should have supporting comments following these guidelines.
<a name="dismissing-approve"></a>
- [2.](#dismissing-approve) An approval without a comment should be dismissed.

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/browser/context-menu-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export abstract class ContextMenuRenderer {
/** @deprecated since 0.7.2 pass `RenderContextMenuOptions` instead */
render(menuPath: MenuPath, anchor: Anchor, onHide?: () => void): ContextMenuAccess;
render(menuPathOrOptions: MenuPath | RenderContextMenuOptions, anchor?: Anchor, onHide?: () => void): ContextMenuAccess {
const resovledOptions = RenderContextMenuOptions.resolve(menuPathOrOptions, anchor, onHide);
const access = this.doRender(resovledOptions);
const resolvedOptions = RenderContextMenuOptions.resolve(menuPathOrOptions, anchor, onHide);
const access = this.doRender(resolvedOptions);
this.setCurrent(access);
return access;
}
Expand Down
36 changes: 18 additions & 18 deletions packages/core/src/browser/keybinding.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ describe('keybindings', () => {

keybindingRegistry.setKeymap(KeybindingScope.WORKSPACE, keybindingsSpecific);

let match = keybindingRegistry.matchKeybiding([KeyCode.createKeyCode({ first: Key.KEY_A, modifiers: [KeyModifier.CtrlCmd] })]);
let match = keybindingRegistry.matchKeybinding([KeyCode.createKeyCode({ first: Key.KEY_A, modifiers: [KeyModifier.CtrlCmd] })]);
expect(match && match.kind).to.be.equal('full');

match = keybindingRegistry.matchKeybiding([KeyCode.createKeyCode({ first: Key.KEY_B, modifiers: [KeyModifier.CtrlCmd] })]);
match = keybindingRegistry.matchKeybinding([KeyCode.createKeyCode({ first: Key.KEY_B, modifiers: [KeyModifier.CtrlCmd] })]);
expect(match && match.kind).to.be.equal('full');

match = keybindingRegistry.matchKeybiding([KeyCode.createKeyCode({ first: Key.KEY_C, modifiers: [KeyModifier.CtrlCmd] })]);
match = keybindingRegistry.matchKeybinding([KeyCode.createKeyCode({ first: Key.KEY_C, modifiers: [KeyModifier.CtrlCmd] })]);
const keyCode = match && KeyCode.parse(match.binding.keybinding);
expect(keyCode?.key).to.be.equal(validKeyCode.key);
});
Expand All @@ -249,17 +249,17 @@ describe('keybindings', () => {
validKeyCodes.push(KeyCode.createKeyCode({ first: Key.KEY_C, modifiers: [KeyModifier.CtrlCmd] }));
validKeyCodes.push(KeyCode.createKeyCode({ first: Key.KEY_T }));

const match = keybindingRegistry.matchKeybiding(KeySequence.parse('ctrlcmd+x'));
const match = keybindingRegistry.matchKeybinding(KeySequence.parse('ctrlcmd+x'));
expect(match && match.kind).to.be.equal('partial');
});

it('should possible to override keybinding', () => {
const overridenKeybinding = 'ctrlcmd+b a';
const overriddenKeybinding = 'ctrlcmd+b a';
const command = TEST_COMMAND_SHADOW.id;
const keybindingShadowing: Keybinding[] = [
{
command,
keybinding: overridenKeybinding
keybinding: overriddenKeybinding
},
{
command,
Expand All @@ -272,15 +272,15 @@ describe('keybindings', () => {
const bindings = keybindingRegistry.getKeybindingsForCommand(command);
expect(bindings.length).to.be.equal(2);
expect(bindings[0].keybinding).to.be.equal('ctrlcmd+b');
expect(bindings[1].keybinding).to.be.equal(overridenKeybinding);
expect(bindings[1].keybinding).to.be.equal(overriddenKeybinding);
});

it('overriden bindings should be returned last', () => {
it('overridden bindings should be returned last', () => {
const keyCode = KeyCode.createKeyCode({ first: Key.KEY_A, modifiers: [KeyModifier.Shift] });

const overridenDefaultBinding: Keybinding = {
const overriddenDefaultBinding: Keybinding = {
keybinding: keyCode.toString(),
command: 'test.overriden-default-command'
command: 'test.overridden-default-command'
};

const defaultBinding: Keybinding = {
Expand All @@ -298,33 +298,33 @@ describe('keybindings', () => {
command: 'test.workspace-command'
};

keybindingRegistry.setKeymap(KeybindingScope.DEFAULT, [overridenDefaultBinding, defaultBinding]);
keybindingRegistry.setKeymap(KeybindingScope.DEFAULT, [overriddenDefaultBinding, defaultBinding]);
keybindingRegistry.setKeymap(KeybindingScope.USER, [userBinding]);
keybindingRegistry.setKeymap(KeybindingScope.WORKSPACE, [workspaceBinding]);
// now WORKSPACE bindings are overriding the other scopes

let match = keybindingRegistry.matchKeybiding([keyCode]);
let match = keybindingRegistry.matchKeybinding([keyCode]);
expect(match?.kind).to.be.equal('full');
expect(match?.binding?.command).to.be.equal(workspaceBinding.command);

keybindingRegistry.resetKeybindingsForScope(KeybindingScope.WORKSPACE);
// now it should find USER bindings

match = keybindingRegistry.matchKeybiding([keyCode]);
match = keybindingRegistry.matchKeybinding([keyCode]);
expect(match?.kind).to.be.equal('full');
expect(match?.binding?.command).to.be.equal(userBinding.command);

keybindingRegistry.resetKeybindingsForScope(KeybindingScope.USER);
// and finally it should fallback to DEFAULT bindings.

match = keybindingRegistry.matchKeybiding([keyCode]);
match = keybindingRegistry.matchKeybinding([keyCode]);
expect(match?.kind).to.be.equal('full');
expect(match?.binding?.command).to.be.equal(defaultBinding.command);

keybindingRegistry.resetKeybindingsForScope(KeybindingScope.DEFAULT);
// now the registry should be empty

match = keybindingRegistry.matchKeybiding([keyCode]);
match = keybindingRegistry.matchKeybinding([keyCode]);
expect(match).to.be.undefined;

});
Expand All @@ -342,16 +342,16 @@ describe('keybindings', () => {
};

keybindingRegistry.setKeymap(KeybindingScope.DEFAULT, [defaultBinding]);
let match = keybindingRegistry.matchKeybiding([keyCode]);
let match = keybindingRegistry.matchKeybinding([keyCode]);
expect(match?.kind).to.be.equal('full');
expect(match?.binding?.command).to.be.equal(defaultBinding.command);

keybindingRegistry.setKeymap(KeybindingScope.USER, [disableDefaultBinding]);
match = keybindingRegistry.matchKeybiding([keyCode]);
match = keybindingRegistry.matchKeybinding([keyCode]);
expect(match).to.be.undefined;

keybindingRegistry.resetKeybindingsForScope(KeybindingScope.USER);
match = keybindingRegistry.matchKeybiding([keyCode]);
match = keybindingRegistry.matchKeybinding([keyCode]);
expect(match?.kind).to.be.equal('full');
expect(match?.binding?.command).to.be.equal(defaultBinding.command);
});
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/browser/keybinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export class KeybindingRegistry {

this.keyboardLayoutService.validateKeyCode(keyCode);
this.keySequence.push(keyCode);
const match = this.matchKeybiding(this.keySequence, event);
const match = this.matchKeybinding(this.keySequence, event);

if (match && match.kind === 'partial') {
/* Accumulate the keysequence */
Expand All @@ -540,14 +540,14 @@ export class KeybindingRegistry {

/**
* Match first binding in the current context.
* Keybinidngs ordered by a scope and by a registration order within the scope.
* Keybindings ordered by a scope and by a registration order within the scope.
*
* FIXME:
* This method should run very fast since it happens on each keystoke. We should reconsider how keybindings are stored.
* It should be possible to look up full and partial keybinding for given key sequnce for constant time using some kind of tree.
* This method should run very fast since it happens on each keystroke. We should reconsider how keybindings are stored.
* It should be possible to look up full and partial keybinding for given key sequence for constant time using some kind of tree.
* Such tree should not contain disabled keybindings and be invalidated whenever the registry is changed.
*/
matchKeybiding(keySequence: KeySequence, event?: KeyboardEvent): KeybindingRegistry.Match {
matchKeybinding(keySequence: KeySequence, event?: KeyboardEvent): KeybindingRegistry.Match {
vince-fugnitto marked this conversation as resolved.
Show resolved Hide resolved
let disabled: Set<string> | undefined;
const isEnabled = (binding: ScopedKeybinding) => {
if (event && !this.isEnabled(binding, event)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export abstract class PreferenceProvider implements Disposable {
* Resolves only if all changes were delivered.
* If changes were made then implementation must either
* await on `this.emitPreferencesChangedEvent(...)` or
* `this.pendingChanges` if chnages are fired indirectly.
* `this.pendingChanges` if changes are fired indirectly.
*/
abstract setPreference(key: string, value: any, resourceUri?: string): Promise<boolean>;

Expand Down
4 changes: 2 additions & 2 deletions packages/languages/src/common/language-selector/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function parseRegExp(pattern: string): string {
// Tail: Add the slash we had split on if there is more to come and the remaining pattern is not a globstar
// For example if pattern: some/**/*.js we want the "/" after some to be included in the RegEx to prevent
// a folder called "something" to match as well.
// However, if pattern: some/**, we tolerate that we also match on "something" because our globstar behaviour
// However, if pattern: some/**, we tolerate that we also match on "something" because our globstar behavior
// is to match 0-N segments.
if (index < segments.length - 1 && (segments[index + 1] !== GLOBSTAR || index + 2 < segments.length)) {
regEx += PATH_REGEX;
Expand Down Expand Up @@ -392,7 +392,7 @@ function trivia2(base: string, originalPattern: string): ParsedStringPattern {
return parsedPattern;
}

// repetition of common ppatterns (see above) {**/*.txt,**/*.png}
// repetition of common patterns (see above) {**/*.txt,**/*.png}
function trivia3(pattern: string, options: IGlobOptions): ParsedStringPattern {
const parsedPatterns = aggregateBasenameMatches(pattern.slice(1, -1).split(',')
.map(pattern => parsePattern(pattern, options))
Expand Down
6 changes: 3 additions & 3 deletions packages/monaco/src/browser/monaco-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ export class MonacoEditorCommandHandlers implements CommandContribution {
*
* Such actions should be enabled only if the current editor is available.
*
* `actions.find` and `editor.action.startFindReplaceAction` are registed as handlers for `find` and `replace`.
* If handlers are not enabled then the core should prevent the default browser behaviour.
* `actions.find` and `editor.action.startFindReplaceAction` are registered as handlers for `find` and `replace`.
* If handlers are not enabled then the core should prevent the default browser behavior.
* Other Theia extensions can register alternative implementations using custom enablement.
*
* ### Global Commands
*
* These commands are not necessary dependend on the current editor and enabled always.
* These commands are not necessary dependent on the current editor and enabled always.
* But they depend on services which are global in VS Code, but bound to the editor in Monaco,
* i.e. `ICodeEditorService` or `IContextKeyService`. We should take care of providing Theia implementations for such services.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-ext/doc/how-to-add-new-plugin-namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Example:
bind(Symbol.for(ExtPluginApiProvider)).toService(FooPluginApiProvider);
```

## Next you need to implement `ExtPluginApiBackendInitializationFn`, which should hanlde `@bar/foo` module loading and instantiate `@foo/bar` API object, `path/to/backend/foo/implementation.js` example :
## Next you need to implement `ExtPluginApiBackendInitializationFn`, which should handle `@bar/foo` module loading and instantiate `@foo/bar` API object, `path/to/backend/foo/implementation.js` example :

```typescript
export const provideApi: ExtPluginApiBackendInitializationFn = (rpc: RPCProtocol, pluginManager: PluginManager) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/common/plugin-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export interface PluginModel {
packageUri: string;
/**
* @deprecated since 1.1.0 - because it lead to problems with getting a relative path
* needed by Icon Themes to correcty load Fonts, use packageUri instead.
* needed by Icon Themes to correctly load Fonts, use packageUri instead.
*/
packagePath: string;
iconUrl?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class EditorAndDocumentStateComputer implements Disposable {
const editors = new Map<string, EditorSnapshot>();
for (const widget of this.editorService.all) {
const editor = MonacoEditor.get(widget);
// VS Code tracks only visibles widgets
// VS Code tracks only visible widgets
if (!editor || !widget.isVisible) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/main/browser/terminal-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class TerminalServiceMainImpl implements TerminalServiceMain, Disposable
if (!terminal) {
return;
}
terminal.rezise(cols, rows);
terminal.resize(cols, rows);
}

async $createTerminal(id: string, options: TerminalOptions, isPseudoTerminal?: boolean): Promise<string> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class PreferencesTreeProvider {
&& (
!this._isFiltered // search too short.
|| fuzzy.test(this.lastSearchedFuzzy, tree.id || '') // search matches preference name.
// search matches description. Fuzzy isn't ideal here because the score dependens on the order of discovery.
// search matches description. Fuzzy isn't ideal here because the score depends on the order of discovery.
|| (this.baseSchema.properties[tree.id].description || '').includes(this.lastSearchedLiteral)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const SectionPreferenceProviderUri = Symbol('SectionPreferenceProviderUri
export const SectionPreferenceProviderSection = Symbol('SectionPreferenceProviderSection');

/**
* This class encapsulates the logic of using separate files for some workpace configuration like 'launch.json' or 'tasks.json'.
* This class encapsulates the logic of using separate files for some workspace configuration like 'launch.json' or 'tasks.json'.
* Anything that is not a contributed section will be in the main config file.
*/
@injectable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ for (const shellConfig of shellConfigs) {
}
} catch (error) {
console.error(error);
skipMessage = 'error occured';
skipMessage = 'error occurred';
}
}

Expand Down
Loading