redhat-developer / redhat-developer/vscode-java

Provide a way to let Formatter profile settings take precedence over VS Code's

Abierto
#672 5 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

enhancement formatter
Lenguaje dominante
TypeScript
Estrellas
2.3k
Forks
546
Merge medio
20 h 1 min
PR fusionados (30 d)
11

Descripción

I have a configured formatter profile which has, among others, the following property:

<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>

If I go to a file and change, using the the option on the bottom right of VSCode to use a different attribute (ex.: space: 8) to code automatically formats to that selection, ignoring the formatted profile.

The problem is that after doing that, the formatter option for tabulations stop working. There should be a way to force format according the formatter profile, or to remove these individual file formatter options. Right now, I have some files where I pressed this and I don't know which ones, and can't force them to be formatted properly

Environment
  • Operating System: Windows 10 Pro
  • JDK version: 1.8.0_172
  • Visual Studio Code version: 1.28.0
  • Java extension version: 0.32
Steps To Reproduce
  1. Create and apply a formatter profile with tabulation char TAB and size: 4
  2. Open .java file and format it. It applies this profile format
  3. Using VSCode bottom right menu, change tabulation char and size. Ex.: SPACE and size: 8. The file applies this profile format.
  4. Now you can't change this specific file to apply the profile configured tabulation char and size.
Current Result

The project applies to manually selected configuration. Can't revert to use profile format.

Expected

One of the following:

  • Allow to format all project according to profile formatter
  • Force format a single file to apply profile formatter
  • Ignore profile formatter for a list of files (but this needs to be visible/editable on settings)

Guía de contribución

Abrir la guía de contribución

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.

Línea de trabajo

Empieza reproduciendo los cambios de formatter-profile y de formato de la esquina inferior derecha de VS Code en un archivo .java de la extensión de Java. Traza cómo la opción de formato seleccionada por archivo anula el perfil; se considera terminado cuando los usuarios pueden restaurar o forzar el formato del perfil para un archivo o para el proyecto, con las anulaciones activas visibles o editables.

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

Evaluación

Stack tecnológico
java, typescript, vscode
Área
developer-experience, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.