Project: Eclipse_Platform_UI
Bug 29474 [Contributions] Context menu contributions should support visibility element
Reported: 2003-01-14 15:05:34 | Status: verified fixed

M4 (I thought there was an existing PR for this issue, but I could not find it). In the Java editor, the context menu contains items that only make sense when the debugger is active, e.g. Inspect, Display, Run to Line, Step Into Selection. We should allow all context menu contributions to have a <visibility> element. This is currently supported for <objectContribution> elements, but not <viewerContribution> elements. This would allow JDT Debug to set a system property when the debugger is active, and use the current support for system properties in <visibility> elements to hide these actions until the debugger is active.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ObjectActionContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewActionBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewerActionBuilder.java