|
1 | 1 | 'use strict'; |
2 | 2 |
|
3 | | -import { ExtensionContext, window, workspace, commands, Uri, ProgressLocation, ViewColumn, EventEmitter, extensions, Location, languages, CodeActionKind, TextEditor, CancellationToken, ConfigurationTarget, Range, Position, TypeHierarchyItem } from "vscode"; |
| 3 | +import { ExtensionContext, window, workspace, commands, Uri, ProgressLocation, ViewColumn, EventEmitter, extensions, Location, languages, CodeActionKind, TextEditor, CancellationToken, ConfigurationTarget, Range, Position } from "vscode"; |
4 | 4 | import { Commands } from "./commands"; |
5 | 5 | import { serverStatus, ServerStatusKind } from "./serverStatus"; |
6 | 6 | import { prepareExecutable, awaitServerConnection } from "./javaServerStarter"; |
@@ -33,7 +33,7 @@ import { buildFilePatterns } from './plugin'; |
33 | 33 | import { pomCodeActionMetadata, PomCodeActionProvider } from "./pom/pomCodeActionProvider"; |
34 | 34 | import { findRuntimes, IJavaRuntime } from "jdk-utils"; |
35 | 35 | import { TypeHierarchyFeature } from "vscode-languageclient/lib/common/proposed.typeHierarchy"; |
36 | | -import { TypeHierarchyDirection, TypeItem, TypesModel } from "./typeHierarchy/model.reference-view"; |
| 36 | +import { CodeTypeHierarchyItem } from "./typeHierarchy/protocol"; |
37 | 37 |
|
38 | 38 | const extensionName = 'Language Support for Java'; |
39 | 39 | const GRADLE_CHECKSUM = "gradle/checksum/prompt"; |
@@ -383,16 +383,8 @@ export class StandardLanguageClient { |
383 | 383 | } |
384 | 384 | })); |
385 | 385 |
|
386 | | - context.subscriptions.push(commands.registerCommand(Commands.SHOW_SUPERTYPE_HIERARCHY, () => { |
387 | | - const typesModel: TypesModel = new TypesModel(TypeHierarchyDirection.Supertypes, [typeHierarchyTree.currentItem]); |
388 | | - const typeItem: TypeItem = new TypeItem(typesModel, typeHierarchyTree.currentItem, undefined); |
389 | | - commands.executeCommand("references-view.showSupertypes", typeItem); |
390 | | - })); |
391 | | - |
392 | | - context.subscriptions.push(commands.registerCommand(Commands.SHOW_SUBTYPE_HIERARCHY, () => { |
393 | | - const typesModel: TypesModel = new TypesModel(TypeHierarchyDirection.Subtypes, [typeHierarchyTree.currentItem]); |
394 | | - const typeItem: TypeItem = new TypeItem(typesModel, typeHierarchyTree.currentItem, undefined); |
395 | | - commands.executeCommand("references-view.showSubtypes", typeItem); |
| 386 | + context.subscriptions.push(commands.registerCommand(Commands.CHANGE_BASE_TYPE, async (item: CodeTypeHierarchyItem) => { |
| 387 | + typeHierarchyTree.changeBaseItem(item); |
396 | 388 | })); |
397 | 389 |
|
398 | 390 | context.subscriptions.push(commands.registerCommand(Commands.COMPILE_WORKSPACE, (isFullCompile: boolean, token?: CancellationToken) => { |
|
0 commit comments