Skip to content

Commit

Permalink
plugin: removed glob.ts and paths.ts
Browse files Browse the repository at this point in the history
The commit removed both `glob.ts` and `paths.ts` as they are duplicated
files from `core`.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto committed May 21, 2022
1 parent 1e98bed commit 0837aa2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 995 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- [output] removed `setVisibility` from `OutputChannelManager` []()
- [output] removed deprecated const `OUTPUT_WIDGET_KIND` []()
- [plugin-ext] deleted `untitled-resource.ts` []()
- [plugin-ext] deleted `glob.ts` and `paths.ts` []()
- [preferences] removed deprecated `ContextMenuCallbacks` []()
- [process] removed the deprecated getters `input`, `output` and `errorOutput` []()
- [workspace] removed deprecated `getDefaultWorkspacePath` []()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { inject } from '@theia/core/shared/inversify';
import URI from '@theia/core/lib/common/uri';
import { ApplicationShell, OpenHandler, Widget, WidgetManager, WidgetOpenerOptions } from '@theia/core/lib/browser';
import { CustomEditor, CustomEditorPriority, CustomEditorSelector } from '../../../common';
import * as glob from './glob';
import { CustomEditorWidget } from './custom-editor-widget';
import { v4 } from 'uuid';
import { Emitter } from '@theia/core';
import { match } from '@theia/core/lib/common/glob';

export class CustomEditorOpener implements OpenHandler {

Expand Down Expand Up @@ -96,7 +96,7 @@ export class CustomEditorOpener implements OpenHandler {

selectorMatches(selector: CustomEditorSelector, resource: URI): boolean {
if (selector.filenamePattern) {
if (glob.match(selector.filenamePattern.toLowerCase(), resource.path.name.toLowerCase() + resource.path.ext.toLowerCase())) {
if (match(selector.filenamePattern.toLowerCase(), resource.path.name.toLowerCase() + resource.path.ext.toLowerCase())) {
return true;
}
}
Expand Down
Loading

0 comments on commit 0837aa2

Please sign in to comment.