disabling cdt code analysis programmatically [message #916889] |
Wed, 19 September 2012 11:51  |
Eclipse User |
|
|
|
Hi,
I would like to disable cdt code analysis programmatically and, after lots of research and stepping through code, I have found the following:
CodanPreferencesLoader codanPreferencesLoader = new
CodanPreferencesLoader(CodanRuntime.getInstance().
getCheckersRegistry().getDefaultProfile());
IProblem[] probs = codanPreferencesLoader.getProblems();
for (int i = 0; i < probs.length; i++) {
String id = probs[i].getId();
((IProblemWorkingCopy) probs[i]).setEnabled(false);
}
which seems to work, but when I open the preference page, the values are unchanged.
Could someone please point me in the right direction,
Thanks in advance,
Antony
|
|
|
|
|
|
|
|
|
|
|
Re: disabling cdt code analysis programmatically [message #1032816 is a reply to message #1012532] |
Wed, 03 April 2013 09:19  |
Eclipse User |
|
|
|
Hi again!
I have a new problem, up until now, disabling code analysis worked fine, but when I tried using it in a fresh workspace, it didn't work anymore. In order for it to work, one must go into code analysis preferences and press the "Apply" button. So it seems something must be initialized. Have you or anyone any ideas please,
Thanks,
Antony
|
|
|
Powered by
FUDForum. Page generated in 0.03354 seconds