redhat-developer / redhat-developer/vscode-java
Provide a way to let Formatter profile settings take precedence over VS Code's
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 546
- Merge moyen
- 20 h 1 min
- PR mergées (30 j)
- 11
Description
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
- Create and apply a formatter profile with tabulation char TAB and size: 4
- Open .java file and format it. It applies this profile format
- Using VSCode bottom right menu, change tabulation char and size. Ex.: SPACE and size: 8. The file applies this profile format.
- 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)
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire les modifications de formatter-profile et de mise en forme en bas à droite de VS Code dans un fichier .java de l’extension Java. Suivez la manière dont l’option de mise en forme sélectionnée pour chaque fichier remplace le profil ; le travail est terminé lorsque les utilisateurs peuvent restaurer ou forcer la mise en forme du profil pour un fichier ou pour le projet, avec les remplacements actifs visibles ou modifiables.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, typescript, vscode
- Domaine
- developer-experience, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100