Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 401579

Summary: Acitivities defined with core expressions do not get toggled on correctly when user is prompted with the Confirm Enablement dialog
Product: [Eclipse Project] Platform Reporter: Scott Ellis <sellis>
Component: IDEAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: pwebster
Version: 3.7.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Scott Ellis CLA 2013-02-22 18:19:35 EST
I have defined an activity using a core expression. When the user triggers something in the UI requiring that activity to be toggled on, they are prompted with a "Confirm Enablement" dialog. However in MutableActivityManager.setEnabledActivityIds(), there is a call to removeExpressionControlledActivities(), so even if the user says yes, the activity is not turned on and they are bounced back to the previous state.
Comment 1 Paul Webster CLA 2013-02-23 15:07:21 EST
You mean you have an expression controlled activity and the user tries to change its state?

If that's the case, that's not expected to work.  Expression controlled activities cannot be changed by the user, only by their expression.

If I've misinterpreted the usecase please let me know.

PW
Comment 2 Scott Ellis CLA 2013-02-23 17:44:27 EST
Maybe I'm not using expressions or activities correctly, but yes, I have a core expression controlled activity that I've wired up so when the user clicks a checkbox, the expression is updated and the activity is toggled on or off. This is used to enable or disable source control functionality such as cvs, git, svn, etc. That part works fine, but if the user goes through a back door, so to speak, and activates a part of the UI that also requires the activity (in this case Team->Share Project) then the framework prompts them with the dialog to enable the activity, but ignores the answer because it is an expression controlled activity. 

If this is by design, can you maybe give me some direction for how to refactor my code so that it works properly in both cases?

Thanks,
Scott
Comment 3 Paul Webster CLA 2013-03-04 09:52:18 EST
(In reply to comment #2)
> 
> If this is by design, can you maybe give me some direction for how to
> refactor my code so that it works properly in both cases?

Ah, I understand now.  It's not unexpected behaviour (expression based activities are controlled only by their expression) but that's not a good interaction and is confusing for the user.


IIRC activities are ORed together.  If you wanted the behaviour (where they could enable it from that dialog) you could add an extra activity that's off by default, as turning it on would enable it (acting like an override).

To make it correct in the short term, the prompt should filter out expression based activities.  I'm not sure what the long term behaviour should be.

PW
Comment 4 Lars Vogel CLA 2019-11-27 07:13: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.

If the bug is still relevant, please remove the stalebug whiteboard tag.