Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Support for global configuration #100

Open
DGarry82 opened this issue Nov 14, 2019 · 3 comments
Open

Support for global configuration #100

DGarry82 opened this issue Nov 14, 2019 · 3 comments

Comments

@DGarry82
Copy link

Currently all cppcheclipse settings (except binaryPath) are in 'disabled' state by default. So when user creates every new Workspace, he gets clean configuration in Window->Preferences->C++->cppcheclipse->Settings panel. There's no way to set them to some alternate default state for new Workspaces, because all changes that can be made here will be immediately saved in current workspace's preferences, and you have to reconfigure'em every time 'from scratch'. It would be nice to have possibility to save their default values to configuration/.settings/com.googlecode.cppcheclipse.core.prefs (just like binaryPath variable) with some buttons like e.g. 'save defaults' and 'load defaults', or (maybe even better) to add checkbox like 'load defaults for new workspaces' at main settings screen (Window->Preferences->C++->cppcheclipse)

@AntonKrug
Copy link
Collaborator

There's no way to set them to some alternate default state for new Workspaces

What about the pluggin_customization.ini
That's a way to global settings be populate as defaults for new workspaces

@DGarry82
Copy link
Author

DGarry82 commented Mar 29, 2021

What about the pluggin_customization.ini

Could not get it working even providing global customization file via -pluginCustomization /tmp/cppcheclipse.ini:

com.googlecode.cppcheclipse.core/languageStandardC=c99 #IGNORED
com.googlecode.cppcheclipse.core/binaryPath=/bin/true #IGNORED

Also any modifications made to global prefs file (<IDE_ROOT>/configuration/.settings/com.googlecode.cppcheclipse.core.prefs) have no effect (except binaryPath and automaticUpdateCheck values):

automaticUpdateCheck=false #PROCESSED
binaryPath=/bin/true #PROCESSED
languageStandardC=c99 # IGNORED
eclipse.preferences.version=1

@AntonKrug
Copy link
Collaborator

AntonKrug commented May 2, 2021

These are my customizations inside the plugin_customization.ini file:

## Cppcheck (cppcheclipse) settings
com.googlecode.cppcheclipse.core/binaryPath=${eclipse_home}/../extras/cppcheck/cppcheck.exe
com.googlecode.cppcheclipse.core/automaticUpdateCheck=false
com.googlecode.cppcheclipse.core/automaticUpdateCheckInterval=monthly
com.googlecode.cppcheclipse.core/languageStandardC=c11
com.googlecode.cppcheclipse.core/languageStandardCpp=c++11
com.googlecode.cppcheclipse.core/useInlineSuppressions=true
com.googlecode.cppcheclipse.core/followSystemIncludes=true
com.googlecode.cppcheclipse.core/followUserIncludes=true

And I can setup more things here, I keep it in the same folder as the eclipse.ini file (in the root of the eclipse), and I changed the eclipse.ini with these lines:

-pluginCustomization
plugin_customization.ini

It works very reliably for me. I do not have to add any arguments to the eclipse binary, just run the binary. Check if in your case the eclipse.ini is not overriding your arguments with its own.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants