Bug 3021

Summary: The Yocto.bc.ui plugin should not depend on JDT UI
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Martin Oberhuber <mober.at>
Component: eclipse-pluginAssignee: Jessica <jessica.zhang>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.c.georgescu, ioanax.grigoropol, yp.ep.watcher, yp.watcher
Version: 1.2   
Target Milestone: 1.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
jdt ui question
none
debug window none

Description Martin Oberhuber 2012-08-28 11:23:34 UTC
CQ:WIND00372662
Build ID: org.yocto.bc.ui_1.2.0.201204241345.jar

After installing Yocto/ADT into an Eclipse C/C++ Package, the Launch Configurations Dialog under "Run > Debug..." contains 3 dysfunctional entries related to Java Debug Launches.

This is because org.yocto.bc.ui depends on jdt.ui , and thus when installing yoct, a JDT Debug and JDT Launching dependency is dragged in but without the required icons (org.eclipse.jdt.debug.ui).

I don't know what drags in that dependency, but I believe that Yocto bc should not depend on JDT UI.
Comment 1 Martin Oberhuber 2012-08-28 14:30:48 UTC
Interesting : When I get ADT source from master and simply remove the jdt.ui dependency in MANIFEST.MF, JDT doesn't show any error. 

Perhaps the dependency is unnecessary after all ?
Comment 3 Alexandru Georgescu 2012-11-05 11:36:23 UTC
Created attachment 933 [details]
jdt ui question

Hi Martin,
Can you tell me exactly what are the 3 dysfunctional entries related to Java Debug Launches that jdt.ui introduces?

In my plugin version there is no difference in my Debug configuration window before the fix and after the fix.

I have attached a print screen with the debug window before the fix.

Thanks,
Alex.
Comment 4 Martin Oberhuber 2012-11-05 11:51:20 UTC
Hi Alex,
when you download an "Eclipse for C/C++" package from Eclipse.org and then install Yocto into it, the following Launch Configuration Types should not exist:

 - Java Applet
 - Java Application
 - JUnit
 - Remote Java Application

The fact that these do show up in your screenshot indicates that you do have JDT installed. The bug is about Yocto working properly even if JDT is not installed.
Comment 5 Alexandru Georgescu 2012-11-07 12:50:55 UTC
Reopening because the issue still reproduces.
1. I have downloaded the C++ eclipse version: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR1/eclipse-cpp-juno-SR1-linux-gtk-x86_64.tar.gz

2. Opening the Debug Window no plugins are displayed.

3. Then after installing the latest eclipse plugin: http://autobuilder.yoctoproject.org/pub/nightly/20121102-2/eclipse-plugin/ the configurations appear, exept JUnit.

See attachment for more details.
Comment 6 Alexandru Georgescu 2012-11-07 12:51:41 UTC
Created attachment 935 [details]
debug window

debug window print screens, before and after installing the Yocto Plugin
Comment 7 Jessica 2012-11-14 19:40:01 UTC
Seems somehow the JDT is dragged in when we do the headless build of Yocto plug-in, we do depends on several bundles from cdt, rse, tm and lttng2.  I've tried to nail down how and where is that dependency coming from, but just couldn't.  I'm pretty sure that the Yocto plug-in itself doesn't require jdt. Probably we can close the bug based on Martin's point that we don't rely on jdt.  But I must admit it's annoying to see those jdt related entries got dragged in.
Comment 8 Martin Oberhuber 2012-11-14 19:56:31 UTC
The culprit should be very easy to find.
Taking the content.jar file from your Yocto p2 Repository, do this:

unzip -p content.jar | grep -B 40 'require.*\.jdt[._]' | less

and you'll see which p2 installable unit drags in the dependency.
Comment 9 Jessica 2012-11-14 20:51:07 UTC
Martin,

Thanks for the tip. Now, it's really resolved :-)

http://git.yoctoproject.org/cgit.cgi/eclipse-poky/commit/?id=7f3aa4fb528bf3e8fe858f106e7eb7a1e9e1755e