Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322661

Summary: Codan preferences page should show up in editor preferences
Product: [Tools] CDT Reporter: Andrew Gvozdev <angvoz.dev>
Component: cdt-codanAssignee: Andrew Gvozdev <angvoz.dev>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: aleherb+eclipse, cdtdoug
Version: 8.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch none

Description Andrew Gvozdev CLA 2010-08-13 10:39:35 EDT
When you right-click on error marker on the Vertical Ruler in the editor (the ruler on the left) it should be possible to get to Codan preference page to tune up the marker appearance or other settings.
Comment 1 Elena Laskavaia CLA 2010-08-13 10:54:51 EDT
While only on ruler? If we add this we should be able to do this
from Problems view and from Problems Details view too.

What example would be?

What I can think is a menu

Code Analysis Problem ->
   Open problem preferences... // opens current profile
   Filter out this instance // tries to filter this out using scope or argument filter for specific problem type
   Disable this problem type // turn this off
   Customize problem...   // opens problem customization dialog
Comment 2 Andrew Gvozdev CLA 2010-08-13 11:03:44 EDT
On the ruler and just in editor there is menu item "Preferences" already which takes you to the filtered preferences. For this task I believe it is sufficient just to fix the filter. In the Problems view you cannot do that and I believe you are right, the menu would be necessary.
Comment 3 Elena Laskavaia CLA 2010-08-16 21:02:13 EDT
Do you know how to override Preferences... behavior on ruler? I cannot find any doc about it.
Comment 4 Andrew Gvozdev CLA 2010-08-17 12:59:47 EDT
Created attachment 176814 [details]
patch

It appears that the list of pages is hardcoded in CEditor. Tony, is a patch like that acceptable? It is reaching to Codan which is not even part of standard CDT as of now. Or is there a better way of doing it?
Comment 5 Anton Leherbauer CLA 2010-08-18 01:54:49 EDT
(In reply to comment #4)
> Created an attachment (id=176814) [details]
> patch
> 
> It appears that the list of pages is hardcoded in CEditor. Tony, is a patch
> like that acceptable? It is reaching to Codan which is not even part of
> standard CDT as of now. Or is there a better way of doing it?

The better way would be to introduce an extension point, but if the id of an unknown preference page does not trigger some kind of error in the log, I am OK with it.
Comment 6 Andrew Gvozdev CLA 2010-08-20 10:15:43 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > Created an attachment (id=176814) [details]
> > patch
> > It appears that the list of pages is hardcoded in CEditor. Tony, is a patch
> > like that acceptable? It is reaching to Codan which is not even part of
> > standard CDT as of now. Or is there a better way of doing it?
> The better way would be to introduce an extension point, but if the id of an
> unknown preference page does not trigger some kind of error in the log, I am OK
> with it.
I do not observe any indication in the log when preference page is not defined.

Committed to the HEAD (8.0).
Comment 7 CDT Genie CLA 2010-08-20 10:23:02 EDT
*** cdt cvs genie on behalf of agvozdev ***
bug 322661: Codan preferences page should show up in editor preferences

[*] CEditor.java 1.215 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java?root=Tools_Project&r1=1.214&r2=1.215