Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Search view doesn't update matches for Xtext DSL code

Đang mở
#3,813 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
desktop

Hướng nghiên cứu

Start with the PositionTracker constructor in bundles/org.eclipse.search/newsearch/org/eclipse/search2/internal/ui/text/PositionTracker.java, especially the lines linked in the issue, and investigate how it tracks edits for files not using ITextFileBufferManager. The issue suggests a resource change listener as a possible direction; done means saving an edited Xtext DSL file updates the Search view to show fewer matches.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Unfortunately I don't have a self containing example at hand, just saw the issue immediately by loking at the PR related to the Search view PositionTracker fix https://github.com/eclipse-platform/eclipse.platform.ui/pull/3802.

I can see it with custom Xtext based application that provides various DSL (text file based) implementations.

  1. Start Search -> File, make sure the filter matches some DSL files, like "Search for 'a'" text in any DSL file.
  2. Search view shows those DSL files (OK), highlighting text matches (OK)
  3. Double click on that file & remove the line with the match, save the file
  4. Search view is supposed to update the result to show less matches.
  5. For Xtext based DSL files this doesn't work - because Xtext by default doesn't use ITextFileBufferManager.

See org.eclipse.search2.internal.ui.text.PositionTracker constructor why this doesn't work:

https://github.com/eclipse-platform/eclipse.platform.ui/blob/1c1d72e1d84af68bd77eb4db785c11494662b644/bundles/org.eclipse.search/newsearch/org/eclipse/search2/internal/ui/text/PositionTracker.java#L61-L64

Of course it would be nice if Xtext would use "common" text file buffers API, but it's obviously design decision which was made several years ago and changing that would be either not possible or breaking existing API/code.

One possible solution on platform UI side would be to add resource change listener in PositionTracker...

See also related issue / proposed workaround in LSP4E https://github.com/eclipse-lsp4e/lsp4e/pull/1501.

Ngôn ngữ chính
Java
Star
124
Fork
269
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
70

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-platform/eclipse.platform.ui

Tất cả issue của eclipse-platform/eclipse.platform.ui

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.