redhat-developer / redhat-developer/vscode-java

Imports are not included in the document symbols returned from "getDocumentSymbols" API

オープン
#1,658 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

API help wanted
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

Hi

I am writing a vscode extension and I want to get the symbols of a JAVA file.

Environment
Operating System: windows 10
Visual Studio Code version: 1.50.0

Steps To Reproduce
If I run this sample code :

`const vscodeCDSExtension = extensions.getExtension("redhat.java");
const javaDocParams : DocumentSymbolParams = {
textDocument: {
uri: Uri.file(filePath).toString()
}
};

if (vscodeCDSExtension && vscodeCDSExtension.isActive) {
const symbols = await vscodeCDSExtension.exports.getDocumentSymbols(javaDocParams);
console.log(symbols.length);
}`

Current Result
The "imports" of the file are not included in the returned symbols (only "package", classes and methods are returned)

Expected Result
The "imports" also should be included in the result

The JAVA file is attached

CatalogServiceHandler.zip

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、添付された Java ファイル CatalogServiceHandler.zip を使って、issue にある getDocumentSymbols API 呼び出しを再現します。package、クラス、メソッドがどのように返されるかを追跡し、その後、import 宣言がシンボル結果に含まれていることを確認します。リポジトリに対応するテストがある場合は、カバレッジを追加または更新してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, typescript, vscode
領域
api, developer-experience, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。