Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Search view doesn't update matches for Xtext DSL code

Abierto
#3,813 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java
Área
desktop

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
124
Forks
269
Merge medio
2 d 2 h
PR fusionados (30 d)
70

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-platform/eclipse.platform.ui

Todos los issues de eclipse-platform/eclipse.platform.ui

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.