Coder Social home page Coder Social logo

Comments (6)

AhmetBilgin avatar AhmetBilgin commented on September 25, 2024

I implemented this on my fork for java formatting:
AhmetBilgin@a5a6f09

from cppstyle.

julian-poidevin avatar julian-poidevin commented on September 25, 2024

Hello @AhmetBilgin, could you submit a PR to this project implementing this feature ? Would love to have it ! Thanks a lot.

from cppstyle.

AhmetBilgin avatar AhmetBilgin commented on September 25, 2024

Hi @julian-poidevin, I had to use another account to fork this project again. Can you test this? Seems to work for me.
https://github.com/Nosezeichen/CppStyle/tree/master/update/target/site
When it's ok I'll make a Pull-Request.

from cppstyle.

julian-poidevin avatar julian-poidevin commented on September 25, 2024

Hi @AhmetBilgin, thanks for taking the time to do this.
I've installed your modified version of the CppStyle extension and re-configured the path.
Unfortunately I don't see the project file being modified with the settings.

I'm using STM32CubeIDE, is your patch compatible with this modified version of Eclipse ? The project file has a .cproject extension

Also, I see your patch allows to set clang-format path with an environment variable env_var.
Would it work using Eclipse linked ressource as : ${PROJECT_LOC}.

I'd like to directly put the clang-format binary into a project folder so developers don't have to install LLVM and I'd like to set the clang-format path in the project settings as : ${PROJECT_LOC}/Utilities/clang-format.exe

Thanks a lot for your help on this !

image

from cppstyle.

AhmetBilgin avatar AhmetBilgin commented on September 25, 2024

Hi @julian-poidevin,
I don't know why I said that I implemented the 'project specific settings' part...
You are right, with my changes you are able to to use ${env_var:SOMETHING} in all 3 fields (clang-format, .clang-format style and cpplint). You can even use multiple semicolon ';' seperated paths. The first valid one will be used. But these settings are only available at workspace level right now.

  • (A) I can have a look if I can implement this as project settings as well.

The environment variable resolving does currently only work for ${env_var:SOMETHING} and is resolved with System::getEnv and System::getproperty.

  • (B) I can have a look at resolving against the eclipse predefined path variables. This will get a little bit trickier, because I cache the first valid path until the path changes in the settings or eclipse is restarted. This won't work if you want different settings for different projects in the same workspace.

Which solution (A, B) would help with your requirements?

from cppstyle.

julian-poidevin avatar julian-poidevin commented on September 25, 2024

Wow, that's very nice from you suggesting your help ! ๐Ÿ™๐Ÿป

Actually, solution (B) could help a lot. I would just have to store clang-format binary at the same place for all project.

Thanks a lot !

from cppstyle.

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.