@theia/editor 1.57.1 → 1.58.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,8 +42,11 @@ export class EditorLanguageQuickPickService {
42
42
 
43
43
  protected toQuickPickLanguage(value: Language, current: string): QuickPickValue<Language> {
44
44
  const languageUri = this.toLanguageUri(value);
45
- const icon = this.labelProvider.getIcon(languageUri);
46
- const iconClasses = icon !== '' ? [icon + ' file-icon'] : undefined;
45
+ const iconClasses = this.labelProvider.getIcon(languageUri).split(' ').filter(v => v.length > 0);
46
+ if (iconClasses.length > 0) {
47
+ iconClasses.push('file-icon');
48
+ }
49
+
47
50
  const configured = current === value.id;
48
51
  return {
49
52
  value,
@@ -18,7 +18,7 @@ import { injectable, postConstruct, inject } from '@theia/core/shared/inversify'
18
18
  import URI from '@theia/core/lib/common/uri';
19
19
  import { RecursivePartial, Emitter, Event, MaybePromise, CommandService, nls } from '@theia/core/lib/common';
20
20
  import {
21
- WidgetOpenerOptions, NavigatableWidgetOpenHandler, NavigatableWidgetOptions, Widget, PreferenceService, CommonCommands, OpenWithService, getDefaultHandler,
21
+ WidgetOpenerOptions, NavigatableWidgetOpenHandler, NavigatableWidgetOptions, Widget, PreferenceService, CommonCommands, getDefaultHandler,
22
22
  defaultHandlerPriority
23
23
  } from '@theia/core/lib/browser';
24
24
  import { EditorWidget } from './editor-widget';
@@ -59,7 +59,6 @@ export class EditorManager extends NavigatableWidgetOpenHandler<EditorWidget> {
59
59
 
60
60
  @inject(CommandService) protected readonly commands: CommandService;
61
61
  @inject(PreferenceService) protected readonly preferenceService: PreferenceService;
62
- @inject(OpenWithService) protected readonly openWithService: OpenWithService;
63
62
 
64
63
  @postConstruct()
65
64
  protected override init(): void {
@@ -88,16 +87,7 @@ export class EditorManager extends NavigatableWidgetOpenHandler<EditorWidget> {
88
87
  this.addRecentlyVisible(widget);
89
88
  }
90
89
  }
91
- this.openWithService.registerHandler({
92
- id: 'default',
93
- label: this.label,
94
- providerName: nls.localizeByDefault('Built-in'),
95
- canHandle: () => 100,
96
- // Higher priority than any other handler
97
- // so that the text editor always appears first in the quick pick
98
- getOrder: () => 10000,
99
- open: uri => this.open(uri)
100
- });
90
+
101
91
  this.updateCurrentEditor();
102
92
  }
103
93