Community
Participate
Working Groups
Sample problem scenario: User starts Eclipse. Eclipse opens. Our product's action set is shown. Nothing is selected, so the action set is disabled. The "connect to our product" button is enabled. User selects "connect to our product". A progress dialog is shown. Resources in the navigator are updated with our product's status icon overlays. User selects a resource in a particular state. All icons are enabled, although their enabled state should depend on the state of the selected resource. User selects an option to change the state to the state its already in. A completely unacceptable "This action is not available." dialog is shown, and the item is finally disabled. The resource was already in the desired state - the item should already have been disabled. Our plugin cannot enable its items based on the selection, because the action set delegates are not instantiated until after the item is clicked. We need: better enabling rules in .xml, or a way to instantiate the action set delegates once a plugin loads, or some way to run a piece of code on selection changes.
There is the following issue: Menu item on Perspective A is enabled. User switches to Perspective B, which does not contain the menu. User switches back to Perspective A, and the menu item is now grayed out. The menu item should have remained enabled when the user switched back to Perspective A.
It is going to be difficult to make progress on this defect report without a test cases and steps that we can try here. I will attempt to address as many issues as I can with the information currently in this defect report. Problem 1: "Nothing is selected so the action set is disabled" What enablement rules are you using. Other action sets do not have this limitation. (e.g. Search). Problem 2: Instantiating action delegates Is this the "all icons are enabled, although their enabled state should depend on the state of the selected resource" issue? In the current 2.0 builds action delegates are instantiated after the plugin is loaded. See org.eclipse.ui.internal.PluginAction.selectionChanged (ISelection) and isOkToCreateDelegate() Problem 3: "user selected a state to chagnge teh state to the state its already in ...." There isn't enough information in this defect report to work with. Please provide code and the steps to recreate. Problem 4: "better enabled rules in xml" There has been some progress in this area in the 2.0 stream. It is still very limited in the ability to express complex enablement rules if you have suggestions for improving the support I would love to hear them. Problem 5: "There is the following issue ..." Please provide code and steps to recreate. There isn't enough information in this defect report to diagnose the problem you have found in Eclipse. In other cases plugins are able to enable their menus when the perspective changes. For example open the Resource and Debug Perspective and switch between them. Notice that the "Debug" menu and it's menu items are enabled and disabled correctly.
Waiting for feedback from reporter.
No response. Closing PR.
Reopening on customer request for consideration post 2.0.
Defering to post 2.0.
Reminder: Anshu sent email containing an example demonstrating the problem.
Reopen to investigate
Anshu, can you attach the code to reproduce the problem (switch persp, and actions grayed out) to this bug report. Please make sure it is still reproducable in 2.0.1 release. As for the enablement issues on object states, were these resolved? Assuming so unless someone else states otherwise. Downgrading priority until further information
Closing PR, assuming that the support in 2.0 / 2.0.1 is good enough. Please reopen with additional info if you are not satisfied with the current support.