Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Search view doesn't update matches for Xtext DSL code

Aperta
#3,813 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Java
Stelle
124
Fork
269
Merge medio
2g 3h
PR unite (30g)
69

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-platform/eclipse.platform.ui

Tutte le issue di eclipse-platform/eclipse.platform.ui

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.