redhat-developer / redhat-developer/vscode-java
Provide a way to let Formatter profile settings take precedence over VS Code's
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
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)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo le modifiche a formatter-profile e alla formattazione nell’angolo in basso a destra di VS Code su un file .java nell’estensione Java. Traccia il modo in cui l’opzione di formattazione selezionata per file sovrascrive il profilo; il lavoro è concluso quando gli utenti possono ripristinare o imporre la formattazione del profilo per un file o per il progetto, con le sostituzioni attive visibili o modificabili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript, vscode
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100