redhat-developer / redhat-developer/vscode-java
Provide a way to let Formatter profile settings take precedence over VS Code's
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- TypeScript
- Estrelas
- 2.3k
- Forks
- 547
- Merge médio
- 20h 1min
- PRs com merge (30d)
- 11
Descrição
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)
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece reproduzindo as alterações de formatter-profile e de formatação no canto inferior direito do VS Code em um arquivo .java na extensão Java. Rastreie como a opção de formatação selecionada por arquivo substitui o perfil; considera-se concluído quando os usuários puderem restaurar ou forçar a formatação do perfil para um arquivo ou para o projeto, com as substituições ativas visíveis ou editáveis.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- java, typescript, vscode
- Domínio
- developer-experience, tooling
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100