Bug 245368 - "C/C++ General" property page is not shown for objects that adapt to IResource
Summary: "C/C++ General" property page is not shown for objects that adapt to IResource
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 6.0.2   Edit
Assignee: Andrew Gvozdev CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-27 06:32 EDT by Arnaud Lucien CLA
Modified: 2009-10-07 11:41 EDT (History)
0 users

See Also:


Attachments
Patch (751 bytes, patch)
2009-10-06 10:53 EDT, Arnaud Lucien CLA
angvoz.dev: iplog+
Details | Diff
Project with both C and Java nature (2.55 KB, application/octet-stream)
2009-10-07 03:43 EDT, Arnaud Lucien CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud Lucien CLA 2008-08-27 06:32:33 EDT
Build ID: M20080221-1800

Steps To Reproduce:
Today the "C/C++ General" property page is shown for objects that are INSTANCES of IProject, IFolder, ...
This property page should also be shown for objects that ADAPT to IProject, IFolder, ... (this is actually the way the other property pages are defined).

My use case is: I have my own view in which I show objects that adapt to IProject. For these objects, the "C/C++ General" page is not shown (but the other CDT property pages are shown).

More information:
Comment 1 Arnaud Lucien CLA 2009-09-21 09:36:20 EDT
Hi, is there any plan to fix this? I think this is quite a light fix to make, and this would prevent us from patching CDT with each release.
I cannot see why the enablement rule for the "C/C++ General" page should be different from the other property pages defines in org.eclipse.cdt.ui.
Thanks in advance.
Comment 2 Andrew Gvozdev CLA 2009-09-21 10:35:47 EDT
(In reply to comment #1)
> Hi, is there any plan to fix this? I think this is quite a light fix to make,
> and this would prevent us from patching CDT with each release.

Sounds like you got the fix already. Would you share? It might help to get this task moving.

> I cannot see why the enablement rule for the "C/C++ General" page should be
> different from the other property pages defines in org.eclipse.cdt.ui.
> Thanks in advance.
Comment 3 Arnaud Lucien CLA 2009-10-06 10:53:09 EDT
Created attachment 148895 [details]
Patch

The problem was the following: the property pages inside the "C/C++ General" category are displayed on objects that ADAPT to IProject (Documentation, File Types, Indexer, ...). But, on the other hand, the "C/C++ General" page itself is displayed for objects that are INSTANCES of IProject.
Therefore, for objects that ADAPT to IProject but are not INSTANCES of IProject, those property pages are displayed but not grouped inside the "C/C++ General" category. This patch fixes this problem.
Comment 4 Andrew Gvozdev CLA 2009-10-06 13:15:04 EDT
Sounds reasonable. But before I commit I would need to test the patch. Could you propose how to test your patch?
Comment 5 Arnaud Lucien CLA 2009-10-07 03:43:49 EDT
Created attachment 148968 [details]
Project with both C and Java nature

Here's a way to reproduce the issue:
- Import the attached project (it has both the C and the Java nature)
- Open the "Projects" view of the "Java Browsing" category
- From this view, open the project properties
-> You can see that the "C/C++ General" property page does not appear.
On the other hand, when using the patch, it works.
Comment 6 Andrew Gvozdev CLA 2009-10-07 10:31:29 EDT
Could you enter your real name in bugzilla so I could properly attribute your contribution to you?
Comment 7 Arnaud Lucien CLA 2009-10-07 11:11:57 EDT
(In reply to comment #6)
> Could you enter your real name in bugzilla so I could properly attribute your
> contribution to you?

Done!
Comment 8 Andrew Gvozdev CLA 2009-10-07 11:41:34 EDT
(In reply to comment #5)
> Created an attachment (id=148968)
> Project with both C and Java nature
The example is helpful. This is real messy indeed.

Committed the fix on HEAD (6.1) and 6.0.2. Thanks for the patch!