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

refactor: Merged DhService with DhcService #170

Merged
merged 2 commits into from
Nov 6, 2024
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
8 changes: 4 additions & 4 deletions src/controllers/ExtensionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
DheJsApiCache,
DheService,
DheServiceCache,
DhService,
DhcService,
PanelService,
SecretService,
ServerManager,
Expand All @@ -56,7 +56,7 @@ import type {
IDheClientFactory,
IDheService,
IDheServiceFactory,
IDhService,
IDhcService,
IDhServiceFactory,
IPanelService,
ISecretService,
Expand Down Expand Up @@ -601,7 +601,7 @@ export class ExtensionController implements Disposable {
* Create a new text document based on the given connection capabilities.
* @param dhService
*/
onCreateNewDocument = async (dhService: IDhService): Promise<void> => {
onCreateNewDocument = async (dhService: IDhcService): Promise<void> => {
const language = (await dhService.supportsConsoleType('python'))
? 'python'
: 'groovy';
Expand Down Expand Up @@ -703,7 +703,7 @@ export class ExtensionController implements Disposable {
const connectionState =
await this._connectionController.getOrCreateConnection(uri);

if (isInstanceOf(connectionState, DhService)) {
if (isInstanceOf(connectionState, DhcService)) {
await connectionState?.runEditorCode(editor, selectionOnly === true);
}
};
Expand Down
8 changes: 4 additions & 4 deletions src/providers/ServerConnectionTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import * as vscode from 'vscode';
import { TreeDataProviderBase } from './TreeDataProviderBase';
import { CONNECTION_TREE_ITEM_CONTEXT, ICON_ID } from '../common';
import type {
IDhService,
IDhcService,
ConnectionState,
ServerConnectionNode,
} from '../types';
import { isInstanceOf, sortByStringProp } from '../util';
import { DhService } from '../services';
import { DhcService } from '../services';

/**
* Provider for the server connection tree view.
Expand All @@ -32,7 +32,7 @@ export class ServerConnectionTreeProvider extends TreeDataProviderBase<ServerCon
const descriptionTokens: string[] = [];

if (
isInstanceOf(connectionOrUri, DhService) &&
isInstanceOf(connectionOrUri, DhcService) &&
connectionOrUri.isInitialized
) {
const [consoleType] = await connectionOrUri.getConsoleTypes();
Expand Down Expand Up @@ -62,7 +62,7 @@ export class ServerConnectionTreeProvider extends TreeDataProviderBase<ServerCon
};

getChildren = (
elementOrRoot?: IDhService
elementOrRoot?: IDhcService
): vscode.ProviderResult<ServerConnectionNode[]> => {
if (elementOrRoot == null) {
return this.serverManager
Expand Down
Loading