Skip to content

Commit

Permalink
repo: remove low-hanging deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
vince-fugnitto committed Jun 1, 2022
1 parent e1e200a commit 51e201b
Show file tree
Hide file tree
Showing 40 changed files with 77 additions and 1,260 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,35 @@

- [plugin-dev] moved and renamed interface from: `@theia/debug/lib/browser/debug-contribution/DebugPluginConfiguration` to: `plugin-dev/src/common/PluginDebugConfiguration` [#11224](https://github.com/eclipse-theia/theia/pull/11224)
- [debug, plugin-ext] [Debug view] Add dynamic debug configurations [#10212](https://github.com/eclipse-theia/theia/pull/10212)
- Changed signature of `DebugConfigurationManager.find` to receive a target DebugConfiguration instead of a configuration's name.
- Changed signature of `DebugConfigurationManager.find` to receive a target DebugConfiguration instead of a configuration's name.
NOTE: The original signature is still available but no longer used inside the framework and therefore marked as `deprecated`
- Multiple methods related to the selection of Debug configuration options were relocated from `debug-configuration-widget.tsx` to the new file `debug-configuration-select.tsx`.
- Removed optional interface property `DebugConfiguration.dynamic`.
- Added the following method to the interface `DebugService`: `fetchDynamicDebugConfiguration` as well as the property `onDidChangedDebugConfigurationProviders`.
- Removed method `DebugPrefixConfiguration#runDynamicConfiguration`
- [core] The interface `SelectComponentProps` was updated to rename a property from `value` to `defaultValue`
- [callhierarchy] removed the deprecated `current-editor-access.ts` file [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [core] `ColorRegistry` no longer exports `Color`, `ColorDefaults`, `ColorDefinition` and `ColorCssVariable`. Import from `core/lib/common/color` instead [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [core] removed deprecated `ContextMenuRenderer` method `render` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [core] removed deprecated `FOLDER_ICON` and `FILE_ICON` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [core] removed deprecated `theme` re-export, should be imported from `common/theme` instead [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [core] removed deprecated `onVisibilityChanged` event from `view-container` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [core] removed deprecated methods and re-export in `preference-contribution` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- removed `overridePreferenceName`.
- removed `testOverrideValue`.
- removed `overriddenPreferenceName`.
- removed `OVERRIDE_PROPERTY_PATTERN` re-export.
- [core] removed deprecated `JsonType` re-export from `preference-schema` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [file-search] removed deprecated `defaultIgnorePatterns` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [mini-browser] removed deprecated `MiniBrowserEndpoint` and `MiniBrowserEndpoint.HANDLE_PATH` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [output] removed `setVisibility` from `OutputChannelManager` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [output] removed deprecated const `OUTPUT_WIDGET_KIND` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [plugin-ext] deleted `untitled-resource.ts` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [plugin-ext] deleted `glob.ts` and `paths.ts` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [preferences] removed deprecated `ContextMenuCallbacks` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [process] removed the deprecated getters `input`, `output` and `errorOutput` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [workspace] removed deprecated `getDefaultWorkspacePath` [#11185](https://github.com/eclipse-theia/theia/pull/11185)
- [vsx-registry] removed deprecated `VSXExtensionsCommands` re-export [#11185](https://github.com/eclipse-theia/theia/pull/11185)

## v1.26.0 - 5/26/2022

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ import { CommandContribution, CommandRegistry, MaybeArray, MessageService, nls }
import { inject, injectable, interfaces } from '@theia/core/shared/inversify';
import { FileService } from '@theia/filesystem/lib/browser/file-service';
import { WorkspaceService } from '@theia/workspace/lib/browser';
import { JsonType, PreferenceItem, PreferenceValidationService } from '@theia/core/lib/browser';
import { PreferenceItem, PreferenceValidationService } from '@theia/core/lib/browser';
import { JSONValue } from '@theia/core/shared/@phosphor/coreutils';
import { JsonType } from '@theia/core/lib/common/json-schema';

function generateContent(properties: string, interfaceEntries: string[]): string {
return `/********************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ import { CallHierarchyService, CallHierarchyServiceProvider } from './callhierar
import { WidgetFactory, bindViewContribution } from '@theia/core/lib/browser';
import { CALLHIERARCHY_ID } from './callhierarchy';
import { createHierarchyTreeWidget } from './callhierarchy-tree';
import { CurrentEditorAccess } from './current-editor-access';
import { ContainerModule } from '@theia/core/shared/inversify';

import '../../src/browser/style/index.css';

export default new ContainerModule(bind => {
bind(CurrentEditorAccess).toSelf().inSingletonScope();

bindContributionProvider(bind, CallHierarchyService);
bind(CallHierarchyServiceProvider).to(CallHierarchyServiceProvider).inSingletonScope();

Expand Down
55 changes: 0 additions & 55 deletions packages/callhierarchy/src/browser/current-editor-access.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/core/src/browser/color-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ import { DisposableCollection, Disposable } from '../common/disposable';
import { Emitter } from '../common/event';
import { ColorDefinition, ColorCssVariable } from '../common/color';

/**
* @deprecated since 1.20.0. Import from `@theia/core/lib/common/color` instead.
*/
export * from '../common/color';

@injectable()
export class ColorRegistry {

Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/browser/common-frontend-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ import { QuickViewService } from './quick-input/quick-view-service';
import { environment } from '@theia/application-package/lib/environment';
import { IconThemeService } from './icon-theme-service';
import { ColorContribution } from './color-application-contribution';
import { ColorRegistry, Color } from './color-registry';
import { ColorRegistry } from './color-registry';
import { Color } from '../common/color';
import { CoreConfiguration, CorePreferences } from './core-preferences';
import { ThemeService } from './theming';
import { PreferenceService, PreferenceScope, PreferenceChangeEvent } from './preferences';
Expand Down
42 changes: 13 additions & 29 deletions packages/core/src/browser/context-menu-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,26 @@ export abstract class ContextMenuRenderer {
}
}

render(options: RenderContextMenuOptions): ContextMenuAccess;
/** @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 resolvedOptions = RenderContextMenuOptions.resolve(menuPathOrOptions, anchor, onHide);
render(options: RenderContextMenuOptions): ContextMenuAccess {
const resolvedOptions = this.resolve(options);
const access = this.doRender(resolvedOptions);
this.setCurrent(access);
return access;
}

protected abstract doRender(options: RenderContextMenuOptions): ContextMenuAccess;

protected resolve(options: RenderContextMenuOptions): RenderContextMenuOptions {
const args: any[] = options.args ? options.args.slice() : [];
if (options.includeAnchorArg !== false) {
args.push(options.anchor);
}
return {
...options,
args
};
}

}

export interface RenderContextMenuOptions {
Expand All @@ -106,27 +114,3 @@ export interface RenderContextMenuOptions {
includeAnchorArg?: boolean;
onHide?: () => void;
}
export namespace RenderContextMenuOptions {
export function resolve(menuPathOrOptions: MenuPath | RenderContextMenuOptions, anchor?: Anchor, onHide?: () => void): RenderContextMenuOptions {
let menuPath: MenuPath;
let args: any[];
if (Array.isArray(menuPathOrOptions)) {
menuPath = menuPathOrOptions;
args = [anchor!];
} else {
menuPath = menuPathOrOptions.menuPath;
anchor = menuPathOrOptions.anchor;
onHide = menuPathOrOptions.onHide;
args = menuPathOrOptions.args ? menuPathOrOptions.args.slice() : [];
if (menuPathOrOptions.includeAnchorArg !== false) {
args.push(anchor);
}
}
return {
menuPath,
anchor: anchor!,
onHide,
args
};
}
}
13 changes: 0 additions & 13 deletions packages/core/src/browser/label-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ const DEFAULT_FOLDER_ICON = `${codicon('folder')} default-folder-icon`;
*/
const DEFAULT_FILE_ICON = `${codicon('file')} default-file-icon`;

/**
* Internal folder icon class for the default (File Icons) theme.
*
* @deprecated Use `LabelProvider.folderIcon` to get a folder icon class for the current icon theme.
*/
export const FOLDER_ICON = DEFAULT_FOLDER_ICON;
/**
* Internal file icon class for the default (File Icons) theme.
*
* @deprecated Use `LabelProvider.fileIcon` to get a file icon class for the current icon theme.
*/
export const FILE_ICON = DEFAULT_FILE_ICON;

export const LabelProviderContribution = Symbol('LabelProviderContribution');
/**
* A {@link LabelProviderContribution} determines how specific elements/nodes are displayed in the workbench.
Expand Down
31 changes: 3 additions & 28 deletions packages/core/src/browser/preferences/preference-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,16 @@ import { ContributionProvider, bindContributionProvider, Emitter, Event, Disposa
import { PreferenceScope } from './preference-scope';
import { PreferenceProvider, PreferenceProviderDataChange } from './preference-provider';
import {
PreferenceSchema, PreferenceSchemaProperties, PreferenceDataSchema, PreferenceItem, PreferenceSchemaProperty, PreferenceDataProperty, JsonType
PreferenceSchema, PreferenceSchemaProperties, PreferenceDataSchema, PreferenceItem, PreferenceSchemaProperty, PreferenceDataProperty
} from '../../common/preferences/preference-schema';
import { FrontendApplicationConfigProvider } from '../frontend-application-config-provider';
import { FrontendApplicationConfig } from '@theia/application-package/lib/application-props';
import { bindPreferenceConfigurations, PreferenceConfigurations } from './preference-configurations';
export { PreferenceSchema, PreferenceSchemaProperties, PreferenceDataSchema, PreferenceItem, PreferenceSchemaProperty, PreferenceDataProperty, JsonType };
export { PreferenceSchema, PreferenceSchemaProperties, PreferenceDataSchema, PreferenceItem, PreferenceSchemaProperty, PreferenceDataProperty };
import { Mutable } from '../../common/types';
import { OverridePreferenceName, PreferenceLanguageOverrideService } from './preference-language-override-service';
import { PreferenceLanguageOverrideService } from './preference-language-override-service';
import { JSONValue } from '@phosphor/coreutils';

/**
* @deprecated since 1.13.0 import from @theia/core/lib/browser/preferences/preference-language-override-service.
*/
export { OVERRIDE_PROPERTY_PATTERN } from './preference-language-override-service';

/* eslint-disable guard-for-in, @typescript-eslint/no-explicit-any */

export const PreferenceContribution = Symbol('PreferenceContribution');
Expand Down Expand Up @@ -400,24 +395,4 @@ export class PreferenceSchemaProvider extends PreferenceProvider {
}
}

/**
* @deprecated since 1.13.0 use `PreferenceLanguageOverrideService.overridePreferenceName`
*/
overridePreferenceName(override: OverridePreferenceName): string {
return this.preferenceOverrideService.overridePreferenceName(override);
}

/**
* @deprecated since 1.13.0 use `PreferenceLanguageOverrideService.testOverrideValue`
*/
testOverrideValue(name: string, value: any): value is PreferenceSchemaProperties {
return this.preferenceOverrideService.testOverrideValue(name, value);
}

/**
* @deprecated since 1.13.0 use `PreferenceLanguageOverrideService.overriddenPreferenceName`
*/
overriddenPreferenceName(name: string): OverridePreferenceName | undefined {
return this.preferenceOverrideService.overriddenPreferenceName(name);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import { Container } from 'inversify';
import { PreferenceValidationService } from './preference-validation-service';
import { JsonType, PreferenceItem, PreferenceSchemaProvider } from './preference-contribution';
import { PreferenceItem, PreferenceSchemaProvider } from './preference-contribution';
import { PreferenceLanguageOverrideService } from './preference-language-override-service';
import * as assert from 'assert';
import { JSONValue } from '@phosphor/coreutils';
import { IJSONSchema } from 'src/common/json-schema';
import { IJSONSchema, JsonType } from '../../common/json-schema';

/* eslint-disable no-unused-expressions,no-null/no-null */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
// *****************************************************************************

import { JsonType, PreferenceItem } from '../../common/preferences/preference-schema';
import { PreferenceItem } from '../../common/preferences/preference-schema';
import { JSONObject, JSONValue } from '../../../shared/@phosphor/coreutils';
import { PreferenceSchemaProvider } from './preference-contribution';
import { PreferenceLanguageOverrideService } from './preference-language-override-service';
import { inject, injectable } from '../../../shared/inversify';
import { IJSONSchema } from '../../common/json-schema';
import { IJSONSchema, JsonType } from '../../common/json-schema';
import { deepClone, unreachable } from '../../common';
import { PreferenceProvider } from './preference-provider';

Expand Down
5 changes: 0 additions & 5 deletions packages/core/src/browser/theming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ import { FrontendApplicationConfigProvider } from './frontend-application-config
import { ApplicationProps } from '@theia/application-package/lib/application-props';
import { Theme, ThemeChangeEvent } from '../common/theme';

/**
* @deprecated since 1.20.0. Import from `@theia/core/lib/common/theme` instead.
*/
export * from '../common/theme';

export const ThemeServiceSymbol = Symbol('ThemeService');

export class ThemeService {
Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/browser/view-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -912,10 +912,7 @@ export class ViewContainerPart extends BaseWidget {
protected readonly body: HTMLElement;
protected readonly collapsedEmitter = new Emitter<boolean>();
protected readonly contextMenuEmitter = new Emitter<MouseEvent>();
/**
* @deprecated since 0.11.0, use `onDidChangeVisibility` instead
*/
readonly onVisibilityChanged = this.onDidChangeVisibility;

protected readonly onTitleChangedEmitter = new Emitter<void>();
readonly onTitleChanged = this.onTitleChangedEmitter.event;
protected readonly onDidFocusEmitter = new Emitter<this>();
Expand Down
7 changes: 1 addition & 6 deletions packages/core/src/common/preferences/preference-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import { JSONValue } from '@phosphor/coreutils';
import { IJSONSchema, JsonType } from '../json-schema';
import { IJSONSchema } from '../json-schema';
import { PreferenceScope } from './preference-scope';

/**
* @deprecated since 1.22.0. Import from @theia/core/common/json-schema.ts instead.
*/
export { JsonType };

export interface PreferenceSchema {
[name: string]: any,
scope?: 'application' | 'window' | 'resource' | PreferenceScope,
Expand Down
6 changes: 0 additions & 6 deletions packages/file-search/src/common/file-search-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ export namespace FileSearchService {
rootOptions?: RootOptions
fuzzyMatch?: boolean
limit?: number
/**
* when `undefined`, no excludes will apply, when empty array, default excludes will apply
*
* @deprecated since 0.5.0 use `excludePatterns` instead
*/
defaultIgnorePatterns?: string[]
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/messages/src/browser/notifications-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import { CommandContribution, CommandRegistry } from '@theia/core';
import { NotificationManager } from './notifications-manager';
import { NotificationsRenderer } from './notifications-renderer';
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
import { ColorRegistry, Color } from '@theia/core/lib/browser/color-registry';
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
import { Color } from '@theia/core/lib/common/color';
import { nls } from '@theia/core/lib/common/nls';

@injectable()
Expand Down
9 changes: 0 additions & 9 deletions packages/mini-browser/src/browser/location-mapper-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,3 @@ export class FileLocationMapper implements LocationMapper {
}

}

/**
* @deprecated since 1.8.0
*/
export class MiniBrowserEndpoint extends Endpoint {
constructor() {
super({ path: 'mini-browser' });
}
}
7 changes: 0 additions & 7 deletions packages/mini-browser/src/node/mini-browser-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,6 @@ export interface MiniBrowserEndpointHandler {
@injectable()
export class MiniBrowserEndpoint implements BackendApplicationContribution, MiniBrowserService {

/**
* Endpoint path to handle the request for the given resource.
*
* @deprecated since 1.8.0
*/
static HANDLE_PATH = '/mini-browser/';

private attachRequestHandlerPromise: Promise<void>;

@inject(ILogger)
Expand Down
3 changes: 2 additions & 1 deletion packages/monaco/src/browser/monaco-color-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// *****************************************************************************

import { injectable } from '@theia/core/shared/inversify';
import { ColorRegistry, ColorDefinition, Color } from '@theia/core/lib/browser/color-registry';
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
import { Color, ColorDefinition } from '@theia/core/lib/common/color';
import { Disposable } from '@theia/core/lib/common/disposable';
import { ColorDefaults, ColorValue, getColorRegistry } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/colorRegistry';
import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
Expand Down
Loading

0 comments on commit 51e201b

Please sign in to comment.