GithubHelp home page GithubHelp logo

Comments (11)

krasa avatar krasa commented on July 24, 2024

Seems possible.

from eclipsecodeformatter.

krasa avatar krasa commented on July 24, 2024

Done. You can try it from here: https://github.com/krasa/EclipseCodeFormatter/releases/tag/cdt

from eclipsecodeformatter.

weitjong avatar weitjong commented on July 24, 2024

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.

krasa avatar krasa commented on July 24, 2024

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.

weitjong avatar weitjong commented on July 24, 2024

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.

krasa avatar krasa commented on July 24, 2024

Only my plugin does the work (suppressing IntelliJ).

from eclipsecodeformatter.

weitjong avatar weitjong commented on July 24, 2024

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.

krasa avatar krasa commented on July 24, 2024

Sorry, copy paste error. Fixed: https://github.com/krasa/EclipseCodeFormatter/releases/tag/cdtFix

from eclipsecodeformatter.

weitjong avatar weitjong commented on July 24, 2024

Thank for the quick fix again. The new tag works as expected this time. Kudos.

from eclipsecodeformatter.

weitjong avatar weitjong commented on July 24, 2024

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.

krasa avatar krasa commented on July 24, 2024

Good catch, thanks.

from eclipsecodeformatter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.