Project: Eclipse_Platform_UI
Bug 7761 [Contributions] Can't distinguish structured selection from text selection
Reported: 2002-01-16 11:35:57 | Status: resolved wontfix

The JDT UI has a couple of global actions (Refactor menu) that work on both a strucutured selection and a text selection. Currently it is not possible to define enablement criterias depending on the type of the selection. I would like to write down something like this: <enablement> <if selection_class= "....ITextSelection"> <enablesFor value="1"/> </endif> <if selection_class= "...IStructuredSelection"> <enablesFor value="1"/> <objectClass name="org.eclipse.jdt.core.IMethod"/> </endif> </enablement> Any idea how to do that ?

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/SelectionEnabler.java