Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

459
Visualizações
Automatically generated Kotlin code (from Java code) loses all blank lines, making the code uglier

When using IntelliJ IDEA's automatic Java -> Kotlin converter, the blank lines are lost, making the code not that readable. Is there an approach to avoid this or recover the blank lines?

For example,

line1;
line2;

line3;
line4;

may be converted to something without the blank line at the middle.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

As a workaround you may do the following:

  1. Replace all blank lines with some comment. You may do this by replacing
<Ctrl+Shift+Enter>
\s*
<Ctrl+Shift+Enter>

with

<Ctrl+Shift+Enter>
//newLine
<Ctrl+Shift+Enter>

(don't forget to turn on usage of regex):

enter image description here

  1. Convert file from Java->Kotlin
  2. Delete comment (replace it with empty string)
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda