Bug 441247 - Conditional stratum line breakpoints
Summary: Conditional stratum line breakpoints
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.5   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-06 08:07 EDT by Stefan Oehme CLA
Modified: 2016-05-06 03:29 EDT (History)
4 users (show)

See Also:


Attachments
POC patch (6.54 KB, patch)
2014-08-25 09:40 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Oehme CLA 2014-08-06 08:07:04 EDT
For stratum line breakpoints the property page currently does not show the condition editor. I understand the reasoning behind this, since in general there might be multiple Java locations for a single source line.

But there are languages like Xtend where we have exactly one Java location that is statically known. For such cases it would be nice if the condition dialog was shown. Maybe this could be done via an additional marker attribute like "Java location". I would be happy to write a contribution for that.

Maybe I'm also missing an existing possibility to do this. If so, just point me in the general direction =)
Comment 1 Michael Rennie CLA 2014-08-12 01:05:43 EDT
The condition editor (widgets and logic) is already API:

org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor

and is geared towards ILineBreakpoints - stratum breakpoints are extensions of line breakpoints, so it *should* be as simple as adding the editor to the desired property pages (emphasis on should).

In reality, there will probably be work to do:
1. to resolve which Java location to 'use' (as you noted)
2. making sure content assist makes sense in the editor (when multiple locations are available)
Comment 2 Michael Rennie CLA 2014-08-12 01:12:37 EDT
(In reply to Michael Rennie from comment #1)
> The condition editor (widgets and logic) is already API:

Had a quick look at the code to refresh my memory, we could likely add a section in org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage.createTypeSpecificEditors(Composite)

for stratum breakpoints, but we would have to ensure we don't bring back bug 325161
Comment 3 Stefan Oehme CLA 2014-08-12 02:58:11 EDT
(In reply to Michael Rennie from comment #1)
> In reality, there will probably be work to do:
> 1. to resolve which Java location to 'use' (as you noted)

I think a simple property on the stratum breakpoint interface would do. Users who know their Java location just set it and get the condition editor.

> 2. making sure content assist makes sense in the editor (when multiple
> locations are available)

I don't think a single condition can make much sense with multiple locations. That's why I would like to show a condition editor only when there is exactly one Java location.
Comment 4 Michael Rennie CLA 2014-08-25 09:40:36 EDT
Created attachment 246313 [details]
POC patch

Here is a patch I was messing around with. It allows the editor to show on the property page and adds in a few extra fields in the top section. I didn't test it in any way, just wanted to see how easily the widgets could be shown.
Comment 5 Sarika Sinha CLA 2015-03-31 04:25:38 EDT
Mike, Stephan,
Anyone wants to complete this ?
Do we want to put this in 4.5 M7 ? Otherwise we will have to move it out to 4.6 .
Comment 6 Stefan Oehme CLA 2015-03-31 08:18:17 EDT
We worked around this for Xbase/Xtend, so having it in 4.6 would be enough from our point of view.
Comment 7 Sarika Sinha CLA 2015-04-09 04:05:21 EDT
Moving it to 4.6