| Summary: | [Contributions] visible/enabled: Control initial enablement of action set actions | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lynne Kues <lynne_kues> |
| Component: | Text | Assignee: | Paul Pazderski <paul-eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | daniel_megert, paul-eclipse |
| Version: | 2.1 | ||
| Target Milestone: | 4.16 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/161647 https://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=02a132ef576618cb7738c6efe0c2276de35b81b4 |
||
| Whiteboard: | |||
|
Description
Lynne Kues
We contribute it like this:
<actionSet
label="%textEditorNavigationActionSet.label"
visible="true"
id="org.eclipse.ui.edit.text.actionSet.navigation">
<action
toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
id="org.eclipse.ui.edit.text.gotoLastEditPosition"
hoverIcon="icons/full/ctool16/last_edit_pos.gif"
class="org.eclipse.ui.internal.texteditor.GotoLastEditPositionAction"
definitionId="org.eclipse.ui.edit.text.gotoLastEditPosition"
disabledIcon="icons/full/dtool16/last_edit_pos.gif"
icon="icons/full/etool16/last_edit_pos.gif"
helpContextId="goto_last_edit_position_action_context"
label="%goToLastEditPosition.label"
menubarPath="navigate/"
tooltip="%goToLastEditPosition.tooltip">
The class is not loaded at this point and hence it is enabled. We now tried to add
style="toggle"
state="false"
but this also doesn't disable the button.
Released addition:
style="toggle"
state="false"
to 3.1
Note: most likely now a dup of bug 38290
I agree that this problem seems like a duplicate of Bug 38290. *** This bug has been marked as a duplicate of 38290 *** The change mentioned in comment 2 is wrong and has been reverted since it is a push and not a toggle button. This means the "state" cannot be used. It should be possible to provide the initial enable/disable state. Note: "style" is only defined for toggle and radio. Please move back to Platform/Text to adapt the plugin.xml once this is possible. This is a problem for RCP applications that want to start with a defined enablement of actions, i.e. CoolBar-buttons. I can't see any way of disabling certain actions right from the start of the application, and in the context of RCP I wouldn't call that an enhancement request but a normal bug. There might be workarounds such as asking the extension registry for the action's contribution, I don't know. Or fumbling with "<enablement>" and "<selection>" in the plugin.xml, but that relates to selections in the workbench which do not necessarily exist in an RCP application. Moving Dougs bugs Assigning to component owner PW 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. (In reply to Dani Megert from comment #5) > It should be possible to provide the initial enable/disable state. > > Note: "style" is only defined for toggle and radio. > > Please move back to Platform/Text to adapt the plugin.xml once this is > possible. Possible since bug 552350. New Gerrit change created: https://git.eclipse.org/r/161647 Gerrit change https://git.eclipse.org/r/161647 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=02a132ef576618cb7738c6efe0c2276de35b81b4 |