Bug 545067 - [breakpoints] Conditional breakpoint at ToolBarManagerRenderer.processAddition cannot be parsed
Summary: [breakpoints] Conditional breakpoint at ToolBarManagerRenderer.processAdditio...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.9   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-05 09:10 EST by Simeon Andreev CLA
Modified: 2023-04-02 00:54 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Andreev CLA 2019-03-05 09:10:40 EST
I tried setting:

e != null && e.toString().contains("sampleCommand")

At:

parentContext.runAndTrack(new RunAndTrack() {
    @Override
    public boolean changed(IEclipseContext context) {
        if (getManager(toolbarModel) == null) {
            // tool bar no longer being managed, ignore it
            return false;
        }

        record.updateVisibility(parentContext.getActiveLeaf());
        runExternalCode(() -> {
            manager.update(false);
            getUpdater().updateContributionItems(e -> {
                if (e instanceof MToolBarElement) {
                    if (((MUIElement) ((MToolBarElement) e).getParent()) == toolbarModel) {
                        return true;
                    }
                }
                return false;
            });
        });
        return true;
    }
});

I set the breakpoint at the line before return true, i.e. at the first line of:

if (((MUIElement) ((MToolBarElement) e).getParent()) == toolbarModel) {
    return true;
}

This snippet is found in: org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer.processAddition(MToolBar, ToolBarManager, MToolBarContribution).

Reaching the breakpoint line during execution (just debug the Eclipse application) results in an error dialog "Conditional breakpoint has complitation error(s)".

Some additional info, content assist behaves very oddly after e.toString(). When I type "contai" it completes with getUIContainer(), although e.toString() should be of type String.

If I replace the lambdas with anonymous class definitions, the problem is gone.
Comment 1 Eclipse Genie CLA 2021-02-23 02:00:17 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2023-04-02 00:54:08 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.