Bug 3942 - semantic errors appear when opening source file for a GTK project
Summary: semantic errors appear when opening source file for a GTK project
Status: VERIFIED DUPLICATE of bug 2641
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4
Assignee: Ioana Grigoropol
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-02-26 12:49 UTC by Alexandru Georgescu
Modified: 2013-04-17 13:22 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
errs (220.28 KB, image/png)
2013-02-26 12:49 UTC, Alexandru Georgescu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Georgescu 2013-02-26 12:49:16 UTC
Created attachment 1084 [details]
errs

ENVIRONMENT:
HOST: Fedora 17 64bit
ADT-INSTALLER: http://autobuilder.yoctoproject.org/pub/nightly/20130220-2/adt_installer-QA/
standalone toolchain: http://autobuilder.yoctoproject.org/pub/nightly/20130220-2/toolchain/x86_64/poky-eglibc-x86_64-i586-toolchain-gmae-1.3+snapshot-20130220.sh
poky commit:7d22ef28e64de06b6238d0ef9b664c0bee6efa46
eclipse-poky:d18c45e0f5367979f7402380ee123242da2b57d5



STEPS TO REPRODUCE:
1. Install ADT-installer 
2. Install eclipse plugin
3. Set up the environment to use sysroot, toolchain and kernel installed by adt-installer in step 1.
4. In eclipse, create a new Hello World C GTK project and give it a name. e.g: GTK_01
5. Reconfigure the project
6. Build the project
7. Launch QEMU

8. Run the project "RUN-> RUN CONFIGURATIONS"
9. When running,  open the src/GTK_01.c file and click the opened file (try to edit)


EXPECTED RESULTS:

9. The file opens.

ACTUAL RESULT
9. The file opens, but when clicking to edit semantic errors appear.

The errors that appear are:

Description	Resource	Path	Location	Type
Type 'GdkEvent' could not be resolved	GTK_01.c	/GTK_01/src	line 38	Semantic Error
Type 'GtkWidget' could not be resolved	GTK_01.c	/GTK_01/src	line 38	Semantic Error
Type 'gboolean' could not be resolved	GTK_01.c	/GTK_01/src	line 37	Semantic Error
Type 'gpointer' could not be resolved	GTK_01.c	/GTK_01/src	line 32	Semantic Error
Type 'gpointer' could not be resolved	GTK_01.c	/GTK_01/src	line 45	Semantic Error
Type 'GtkWidget' could not be resolved	GTK_01.c	/GTK_01/src	line 45	Semantic Error
Symbol 'TRUE' could not be resolved	GTK_01.c	/GTK_01/src	line 41	Semantic Error
Type 'gpointer' could not be resolved	GTK_01.c	/GTK_01/src	line 38	Semantic Error
Type 'GtkWidget' could not be resolved	GTK_01.c	/GTK_01/src	line 53	Semantic Error
Type 'GtkWidget' could not be resolved	GTK_01.c	/GTK_01/src	line 54	Semantic Error
Symbol 'GTK_WINDOW_TOPLEVEL' could not be resolved	GTK_01.c	/GTK_01/src	line 57	Semantic Error
Symbol 'NULL' could not be resolved	GTK_01.c	/GTK_01/src	line 60	Semantic Error
Type 'GtkWidget' could not be resolved	GTK_01.c	/GTK_01/src	line 32	Semantic Error
Symbol 'NULL' could not be resolved	GTK_01.c	/GTK_01/src	line 61	Semantic Error
Symbol 'NULL' could not be resolved	GTK_01.c	/GTK_01/src	line 66	Semantic Error
Symbol 'gtk_widget_destroy' could not be resolved	GTK_01.c	/GTK_01/src	line 68	Semantic Error
Comment 1 Jessica 2013-02-27 19:42:58 UTC
Ioana,

Can you help take a look, from the bug description, hard for me to follow what's going on.

Thanks,
Jessica
Comment 2 Ioana Grigoropol 2013-04-02 16:37:15 UTC
The semantic errors appears due to the fact that the project was indexed by the C plugin without the headers: check the messages in the console saying:

MESSAGE Indexed 'gtk0123' (1 sources, 0 headers) ...

The project can be easily cleaned of errors by invoking from the right-click menu of the project the entry "Index->Rebuild" or by simply editing(modify & save) the file in order to trigger a new indexing of the files.
Comment 3 Ioana Grigoropol 2013-04-04 10:43:49 UTC
Has the same root cause as Bug 2641.

*** This bug has been marked as a duplicate of bug 2641 ***
Comment 4 Alexandru Georgescu 2013-04-17 13:22:01 UTC
Verified as per above comments