Comments (11)
Seems possible.
from eclipsecodeformatter.
Done. You can try it from here: https://github.com/krasa/EclipseCodeFormatter/releases/tag/cdt
from eclipsecodeformatter.
Thanks. That's fast! I will try it when I have time later. But before I do that, I have one question. I have spent some time yesterday to setup the built-in code style formatter in CLion to match what I used to have in my Eclipse setup, thinking that this issue won't get fix this fast 😃. It is close to but not quite there yet. So, if I reinstall this plugin in CLion and set it up to use my Eclipse exported code style formatter settings then will the plugin supplements the built-in formatter? Or it simply suppresses the built-in one? How does it work internally?
from eclipsecodeformatter.
The Eclipse formatter is used only in some situations, so having a similar settings for IntelliJ formatter is very beneficial. I use an IntelliJ API with ~20 methods, some things are delegated to the original IntelliJ formatter, some are implemented in the plugin, Eclipse formatter API has 1 method for formatting a plain string, so a lot of things which IntelliJ does is not that easy with Eclipse...
For example Live templates formatting uses Intellij formatter by defualt - using Eclipse can cause that a next step in live template will have a wrong selection...
Or ctrl+shift+enter indents a line using IntelliJ formatter.
Generally Eclipse formatter is used when you trigger formatting manually, for selection or the whole file/package, and formatting before commit.
Perhaps the support could be improved for some cases, but there was no real need...
from eclipsecodeformatter.
Thanks for your answer but I am still a bit lost. I think I understand the part that you need to use IntelliJ API to implement the formatting and that it is not a one-to-one mapping with Eclipse settings. My question is more about which formatter has the precedence. Let's put aside other formatting situation first and just focus on the manual formatting use case. Say, when I am using Ctrl+Alt+L to format a C/C++ source file or header file, does the IntelliJ formatter do its work first (EDIT: applying the settings I have in CLion) then follows by your plugin (EDIT: applying further settings I have exported from Eclipse)? Or only your plugin does the formatting work (suppressing IntelliJ)?
from eclipsecodeformatter.
Only my plugin does the work (suppressing IntelliJ).
from eclipsecodeformatter.
Thanks for patient in answering my question. I have time to try the new tag just now. It installed successfully just like last time. The settings now have option for C/C++ formatter config file. However, after specifying the path to my Eclipse exported settings file, there is nothing being listed in the formatter profile drop down list as I would have expected. If I use the same step but in the Java formatter config file then my exported profile is listed under the Java formatter profile. So, something must have gone wrong. I could not test further after this point.
from eclipsecodeformatter.
Sorry, copy paste error. Fixed: https://github.com/krasa/EclipseCodeFormatter/releases/tag/cdtFix
from eclipsecodeformatter.
Thank for the quick fix again. The new tag works as expected this time. Kudos.
from eclipsecodeformatter.
BTW, there is one small cosmetic issue. Your setting form is not scrollable using mouse wheel unlike the rest of the settings form in the CLion. Only when my mouse pointer is on top the vertical bar then the mouse wheel functions.
from eclipsecodeformatter.
Good catch, thanks.
from eclipsecodeformatter.
Related Issues (20)
- Missing space before instanceof operator HOT 3
- Support loading XML configuration from JAR HOT 1
- Support disable modules in project
- Resolve project specific config can not find configuration file HOT 1
- Document is locked by write PSI operations during Replace in files
- Error logged by IDEA
- Eclipse Correct Indentation leads to different result
- Document version of bundled eclipse used by this plugin
- Newest Eclipse version is not compatible with EclipseCodeFormatter
- Failed to format with Adapter for Eclipse Code Formatter. Formatter config file not resolved. HOT 13
- @formatter:off is not working HOT 3
- Absolute Path to config file gets replaced with relative path using variable $PROJECT_DIR$ rendering settings unusable for a global central settings location HOT 7
- error failed to format with Adapter for Eclipse Code Formatter. Configured settings file does not exist, path="" HOT 3
- IconDeferrerImpl.clearCache IllegalStateException HOT 7
- Incompatible with IDEA2023.3.1 HOT 1
- Upgrade bundled eclipse to 2023-12 (4.30) HOT 3
- Code formatting before committing is not working in the newer version of IntelliJ IDEA
- EclipseCodeStyleManager not honoring plugin listeners HOT 4
- Eclipse Formatter not called in IntelliJ 2024.1 EAP HOT 1
- ImportsComparator IndexNotReadyException
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipsecodeformatter.