Use workspace root modification rule when removing all breakpoints#2218
Use workspace root modification rule when removing all breakpoints#2218trancexpress wants to merge 2 commits intoeclipse-platform:masterfrom
Conversation
|
This revives the now gone: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/165753 |
|
Would just passing the rule |
I'll check when I can, I'd have more confidence in the change that way. If you mean |
|
The When testing the change, I noticed its not enough to prevent the logged error. This code is removing the info: So apparently there is more to change... |
When removing breakpoints, its possible that another job is accessing the breakpoint marker. This can result in an exception, since removing a breakpoint will also remove the marker. This change adds a scheduling MultiRule to the marker removal operation. Fixes: eclipse-platform#2217
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
| } | ||
|
|
||
| private static ISchedulingRule getMarkerRule(IResource resource) { | ||
| return getWorkspace().getRuleFactory().modifyRule(resource); |
There was a problem hiding this comment.
I'm not sure which rule we should use here, as mentioned before in the PR org.eclipse.core.internal.resources.Rules.markerRule(IResource) returns null:
/**
* Obtains the scheduling rule from the appropriate factory for a marker change operation.
*/
@Override
public ISchedulingRule markerRule(IResource resource) {
//team hook currently cannot change this rule
return null;
}
There was a problem hiding this comment.
Can you please add this to the method javadoc?
When testing again, I'm not running into this error. Maybe something changed... Anyway, if we can, lets proceed here. If there are more sporadic marker errors, we can always open another issue. |
|
As commented on other PR, see this discussion: https://bugs.eclipse.org/bugs/show_bug.cgi?id=66538. I wonder if the |
The marker rule seems to be a placeholder for a change that was never done, or am I seeing it wrong? I don't think we can fix this even for |
When removing breakpoints, its possible that another job is accessing the breakpoint marker. This can result in an exception, since removing a breakpoint will also remove the marker.
This change moves breakpoint removal code in a job that holds a workspace root modification rule, if the current thread does not hold a matching rule.
Fixes: #2217