Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code formatting before committing is not working in the newer version of IntelliJ IDEA #264

Open
w0r1t opened this issue Jan 10, 2024 · 0 comments

Comments

@w0r1t
Copy link

w0r1t commented Jan 10, 2024

Versions:

  • IntelliJ IDEA Version: 2023.2.5 Build #IU-232.10227.8
  • Plugin Version: 23.3.223.000.0-Eclipse_2023-03

Issue Description:

When committing with the "Reformat code" option enabled in IntelliJ IDEA 2023.2.5, the code is not being formatted. However, the plugin works perfectly in an older IntelliJ IDEA 2022.3.3.
image

Logs:

Intellij IDEA 2023.2.5

No logs from "krasa.formatter".

IntelliJ IDEA 2022.3.3.

FINE - krasa.formatter.plugin.ProxyCodeStyleManagerDelegator - invoking overriding {}({})reformatTextWithContext[PsiJavaFile:MyClass.java, com.intellij.psi.codeStyle.ChangedRangesInfo@4dd2fff9]
FINE - krasa.formatter.plugin.EclipseCodeStyleManager_IJ_2016_3plus - format MyClass.java 7545 7556
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #format 7545-7556
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen MyClass.java
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #formatInternal
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #starting to format by eclipse formatter
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - reformatting done
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen done
FINE - krasa.formatter.plugin.EclipseCodeStyleManager_IJ_2016_3plus - format MyClass.java 6173 6557
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #format 6173-6557
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen MyClass.java
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #formatInternal
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #starting to format by eclipse formatter
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - reformatting done
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen done
FINE - krasa.formatter.plugin.EclipseCodeStyleManager_IJ_2016_3plus - format MyClass.java 5270 5683
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #format 5270-5683
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen MyClass.java
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #formatInternal
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #starting to format by eclipse formatter
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - reformatting done
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen done
FINE - krasa.formatter.plugin.EclipseCodeStyleManager_IJ_2016_3plus - format MyClass.java 4265 4427
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #format 4265-4427
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen MyClass.java
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #formatInternal
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #starting to format by eclipse formatter
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - reformatting done
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen done
FINE - krasa.formatter.plugin.EclipseCodeStyleManager_IJ_2016_3plus - format MyClass.java 3249 3605
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #format 3249-3605
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen MyClass.java
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #formatInternal
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #starting to format by eclipse formatter
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - reformatting done
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen done
FINE - krasa.formatter.plugin.EclipseCodeStyleManager_IJ_2016_3plus - format MyClass.java 1957 2060
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #format 1957-2060
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen MyClass.java
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #formatInternal
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - #starting to format by eclipse formatter
FINE - krasa.formatter.adapter.EclipseJavaFormatterAdapter - reformatting done
FINE - krasa.formatter.plugin.EclipseCodeFormatter - #formatWhenEditorIsOpen done

thank you 🙏

@w0r1t w0r1t changed the title Code formatting before commit not working in newer version of IntelliJ IDEA Code formatting before committing is not working in the newer version of IntelliJ IDEA Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant