Bug 1915

Summary: Can't change C/C++ Yocto Project settings
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Hongna Xu <hongnax.xu>
Component: eclipse-pluginAssignee: Lianhao Lu <lianhao.lu>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, jiajun.xu, laurentiu.serban, lianhao.lu, sgw, yp.ep.watcher, yp.watcher
Version: 1.2   
Target Milestone: 1.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: (Covered by current QA Test Plan)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
project config window none

Description Hongna Xu 2012-01-18 02:08:00 UTC
Select a C/C++ project, then select the toolbar of eclipse, Project -> Changing Yocto Project Settings,the window is not lauched.

Eclipse SDK
Version:3.7.1
Build id: M20110909-1335

autotools support for CDT(Incubation)
Version:3.0.1.2011050234
Comment 1 Lianhao Lu 2012-01-18 02:13:25 UTC
It seems that the following commit in autotools upstream resulted in getContainer() returning null in the function of ReconfigYoctoHandler.execute().

http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/commit/?id=c29e80a28202a8311244a1247bf149b2e4c28e57
Comment 2 Jessica 2012-01-18 13:45:19 UTC
Created attachment 319 [details]
project config window
Comment 3 Jessica 2012-01-19 10:49:53 UTC
everything seems work for me with the same settings
Comment 4 Lianhao Lu 2012-01-19 23:13:30 UTC
We need to update to the latest the autotool plugins to reproduce this bug.
Comment 5 Jessica 2012-01-19 23:23:41 UTC
I do have 

autotools support for CDT(Incubation)
Version:3.0.1.2011050234

installed if that what you mean
Comment 6 Lianhao Lu 2012-01-20 00:24:58 UTC
Using the autotools 3.0.1.2011050234 on the following configurations, we can reproduce this on all of them:

Ubuntu 11.04 x86_64 with workbench 3.7.1 M20110909
Ubuntu 10.04 x86_64 with workbench 3.7.0 I20110613
Fedora 16 x86 with workbench 3.7.1 M20110909
Fedora 13 x86 with workbench 3.7.0 I20110613

However, it seems that this can not be reproduced on Ubuntu 10.04 x86 with workbench 3.7.1 M20110909
Comment 7 Jessica 2012-01-24 14:48:40 UTC
I've tested on Fedora 14 64bit and updated my auto tools to 3.0.1.201108301805 where my Eclipse is 3.7.0 I20110613, everything works fine.

Can you update your autotools to the version above and give it try.  If things start to work, I'd think let's just document the problematic config combinations into our release note.
Comment 8 Lianhao Lu 2012-01-28 18:51:54 UTC
Using the latest autotools 3.0.1.201201190007, the problem still exists, at least on the following platform:

Ubuntu 10.04 x86_64 with workbench 3.7.0 I20110613
Fedora 13 x86 with workbench 3.7.0 I20110613
Comment 9 Lianhao Lu 2012-01-29 00:45:37 UTC
By looking at the upstream change commit http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/commit/?id=c29e80a28202a8311244a1247bf149b2e4c28e57 and the eclipse bug 355134 https://bugs.eclipse.org/bugs/show_bug.cgi?id=355134,

The patch at http://git.yoctoproject.org/cgit/cgit.cgi/eclipse-poky/commit/?h=llu/bug1915&id=43abbe87c9e381c083a6778ef49ca71f80e06ab4 seems working for me.

The problem is how can detect the user has installed the autotool which versioned after that commit. If not, our plugin can not work at all.
Comment 10 Jessica 2012-02-06 10:52:46 UTC
Lianhao,

I'm assigning this bug to you since I have a hard time reproduce it and saw the symptom on setting up the ELC demo lab machine, but I can't debug on that machine.

Thx
Comment 11 Lianhao Lu 2012-02-07 20:05:00 UTC
Part of the fixing is at 
http://git.yoctoproject.org/cgit/cgit.cgi/eclipse-poky/commit/?id=514c7a653b35a86ea30f0670831e4558e39b5907

Besides this, we also need a patch stating correct upstream plugin version dependency. This depends on the upstream bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=370288. The upstream intends to fix this in 0.10 version due to Mar 26th. If the upstream misses the date, we might need to add a documentation item to require the user update their Autotools plugin to the latest version in release notes.
Comment 12 Lianhao Lu 2012-03-14 09:28:22 UTC
In case the upstream eclipse bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=370288 can't fixed in our 1.2 release cycle, I pushed a hack to detect the upstream plugin version in runtime. http://git.yoctoproject.org/cgit/cgit.cgi/eclipse-poky/commit/?id=1eef5ba930971ca07737e779cb4d0dd5ea0dcf04

If we detect the upstream plugin has the new method AbstractAutotoolsHandler.execute(), we'll use that method to display the setting dialogue. If not detected, that means the user is using an old version of the plugin of "autotools for CDT". We'll pop up a dialogue to warn the user to update the autotool plugin, and then try to display the setting dialogue in the old way. 

Please be noted that if the user choose not to update the autotools plugin, in some platforms, the upstream bug #355134 https://bugs.eclipse.org/bugs/show_bug.cgi?id=370288 might cause the display of the setting dialogue fail too.
Comment 13 Lianhao Lu 2012-07-04 05:44:04 UTC
For Eclipse Juno, CDT autotools UI plugin uses new id. So this is no longer a valid bug any more.

For Eclipse Indigo, seems CDT autotools won't fix this bug. So we still keep our detection login here in our eclipse plugin just in case.
Comment 14 Laurentiu Serban 2012-09-24 22:17:52 UTC
Indigo is not supported anymore.
Setting this to verified