Community
Participate
Working Groups
Using Eclipse 4.4-I20140115-1300 CDT 8.3.0.201401160744 (C/C++ Development Tools) from https://hudson.eclipse.org/cdt/job/cdt-master/lastSuccessfulBuild/artifact/releng/org.eclipse.cdt.repo/target/repository 1. Switch to the Debug perspective 2. In the Debug view, look for a "Connect to a process" toolbar icon: the icon is not there. Using Eclipse 4.3.1 and the same CDT version, the icon is there. The command is defined in org.eclipse.cdt.debug.ui/plugin.xml
I have just encountered this same problem, are there similar issues reported from other projects ?
Is the icon always missing in the Debug perspective or only in certain situations? Is there any error in logs?
Created attachment 241276 [details] No connect button available Debug view remote attach case
Created attachment 241277 [details] Connect button available Debug view remote attach case
I have just added two screen shots to show the difference between the connect button being present and not in the debug view. The screen shot with the icon present was taken using Eclipse 3.2, and the one not showing the connect button was taken with Eclipse 4.4 M6 There are no entries in the Error log.
Correction: (In reply to Alvaro Sanchez-Leon from comment #5) Correction, the sentence below should read. original: > The screen shot with the icon present was taken using Eclipse 3.2, Corrected: The screen shot with the icon present was taken using Eclipse 4.3.2,
I'm seeing this too. The button is contributed through the following XML code: <command categoryId="org.eclipse.cdt.debug.ui.category.debugViewLayout" description="%Connect.description" id="org.eclipse.cdt.debug.ui.command.connect" name="%Connect.name"> </command> <handler class="org.eclipse.cdt.debug.internal.ui.commands.ConnectCommandHandler" commandId="org.eclipse.cdt.debug.ui.command.connect"> </handler> <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?before=stepGroup"> <command commandId="org.eclipse.cdt.debug.ui.command.connect" icon="icons/obj16/connect.gif" label="%Connect.label" style="push" tooltip="%Connect.tooltip"> </command> </menuContribution> Note that the button still appears in the context menu as per this extension: <menuContribution locationURI="popup:org.eclipse.debug.ui.DebugView?before=emptyLaunchGroup"> <command commandId="org.eclipse.cdt.debug.ui.command.connect" icon="icons/obj16/connect.gif" label="%Connect.label" style="push" tooltip="%Connect.tooltip"> </command> </menuContribution>
(In reply to Marc Khouzam from comment #7) If I remove the "?before=stepGroup" from > <menuContribution > locationURI="toolbar:org.eclipse.debug.ui.DebugView?before=stepGroup"> to become <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView"> <command commandId="org.eclipse.cdt.debug.ui.command.connect" icon="icons/obj16/connect.gif" label="%Connect.label" style="push" tooltip="%Connect.tooltip"> </command> </menuContribution> the button appears.
(In reply to Marc Khouzam from comment #8) > (In reply to Marc Khouzam from comment #7) > > If I remove the "?before=stepGroup" from Thanks Marc, that seems to indicate either we've broken our before= processing or the debug view has stopped providing the stepGroup (or they were providing it through XML and we've stopped processing that correctly :-) PW
More info on this. In the CDT plugin.xml file in question, I have 7 different menuContribution for the Debug View toolbar. Those are usually hidden from the user, so we didn't realize they are currently all broken but one! The contributions look like: <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?after=additions"> <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?after=threadGroup"> <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?after=stepIntoGroup"> <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?after=stepOverGroup"> <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?after=stepReturnGroup"> <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?before=emptyStepGroup"> <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?after=renderGroup"> The only one that works is the first one using 'after=additions'. All 6 others, which use both 'before:' and 'after:' are not displayed. The 6 group marker giving problems are contributed by Platform Debug, but I don't know where the working one ('additions') comes from. The definitions of the problematic ones is in org.eclipse.debug.internal.ui.views.launch.LaunchView#configureToolBar() as below: protected void configureToolBar(IToolBarManager tbm) { tbm.add(new Separator(IDebugUIConstants.THREAD_GROUP)); // String is: "threadGroup" tbm.add(new Separator(IDebugUIConstants.STEP_GROUP)); // String is: "stepGroup" tbm.add(new GroupMarker(IDebugUIConstants.STEP_INTO_GROUP)); // String is: "stepIntoGroup" tbm.add(new GroupMarker(IDebugUIConstants.STEP_OVER_GROUP)); // String is: "stepOverGroup" tbm.add(new GroupMarker(IDebugUIConstants.STEP_RETURN_GROUP)); // String is: "stepReturnGroup" tbm.add(new GroupMarker(IDebugUIConstants.EMPTY_STEP_GROUP)); // String is: "emptyStepGroup" tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP)); // String is: "renderGroup" Note that Platform Debug defines similar groups in the Debug View popup in o.e.debug.internal.ui.views.launch.LaunchView#fillContextMenu(). We have the exact same contributions using 'popup:' and those work fine; it is the contributions to 'toolbar:' that are broken. Is there something else I can debug to figure this out?
Hi Marc, I'm looking at this today. What kind of action do I need to do to see the missing button in question. If I create and run the Hello World C++ project from CDT, is that enough? PW
(In reply to Paul Webster from comment #11) > Hi Marc, > > I'm looking at this today. What kind of action do I need to do to see the > missing button in question. > > If I create and run the Hello World C++ project from CDT, is that enough? Yes, that should be enough. Then right-click on the project and choose "Debug As..." -> Local C/C++ Application You will need a GDB on your machine.
Thanks Marc. Eric, the problem is that during createPartControl(*), we used to call org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.layoutTopRight(CTabFolder) from org.eclipse.ui.internal.e4.compatibility.ActionBars.updateActionBars(). In http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e8f26c57c3cc23406f6dc1cf060b1b73f280f2af you changed that call to org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.adjustTopRight(CTabFolder) for Luna. The problem is that the layout call in Kepler was simple, but adjustTopRight(*) can call createGui(*) which runs all of the Toolbar processing code *before* the createPartControl(*) is finished, which means all of the group markers from the view creation haven't been added and the menu contributions are just dropped since they have no match. PW
Fix with https://git.eclipse.org/r/25074 PW
(In reply to Paul Webster from comment #14) > Fix with https://git.eclipse.org/r/25074 > > PW Awesome! I will try it now and report back.
(In reply to Paul Webster from comment #14) > Fix with https://git.eclipse.org/r/25074 > > PW Fixed! Thanks Paul! However, I noticed that Bug 376442 is back. I can't tell if this is due to the proposed fix or not, as the buttons used to reproduce Bug 376442 are not available without the current fix. To reproduce that problem, if you have time, please do the following: 1- run on linux with a GDB version >= 7.0 2- Debug your HelloWorld program in CDT 3- Customize perspective to enable the action set "Reverse Debugging" 4- A new icon should appear on the debug view toolbar (double arrow with clock) => This new icon hides the view menu icon 5- Press the new button 6- some reverse debugging buttons should appear on the debug view toolbar => The Debug view toolbar is truncated on the right 7- Minimize then maximize the view to make the toolbar redraw
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1c012e53763fb76d851642928fd1ccb7d9844deb I've opened Bug 432856 to look at the toolbar update problem. PW
In 4.4.0.I20140428-2000 PW
(In reply to Paul Webster from comment #17) > Released as > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=1c012e53763fb76d851642928fd1ccb7d9844deb This commit introduced bug 448873.