| |
|
| java.lang.Object org.eclipse.ui.SelectionEnabler
SelectionEnabler | final public class SelectionEnabler (Code) | | Determines the enablement status given a selection. This calculation is done
based on the definition of the enablesFor attribute,
enablement element, and the selection element
found in the IConfigurationElement provided.
This class can be instantiated by clients. It is not intended to be extended.
since: 3.0 since: Note: The dependency on org.eclipse.jface.text for ITextSelection must be since: severed It may be possible to do with IActionFilter generic workbench since: registers IActionFilter for "size" property against IStructuredSelection since: workbench text registers IActionFilter for "size" property against since: ITextSelection code here: sel.getAdapter(IActionFilter.class) As an interim since: solution, use reflection to access selections implementing ITextSelection |
Inner Class :static class SelectionClass | |
Constructor Summary | |
public | SelectionEnabler(IConfigurationElement configElement) Create a new instance of the receiver. |
Method Summary | |
final public boolean | equals(Object object) | final public int | hashCode() Computes the hash code for this object based on the id. | public boolean | isEnabledForSelection(ISelection selection) Check if the receiver is enabled for the given selection. | public static boolean | verifyNameMatch(String name, String filter) Verifies that the given name matches the given wildcard filter. |
ANY_NUMBER | final public static int ANY_NUMBER(Code) | | |
MULTIPLE | final public static int MULTIPLE(Code) | | |
NONE | final public static int NONE(Code) | | |
NONE_OR_ONE | final public static int NONE_OR_ONE(Code) | | |
ONE_OR_MORE | final public static int ONE_OR_MORE(Code) | | |
UNKNOWN | final public static int UNKNOWN(Code) | | |
SelectionEnabler | public SelectionEnabler(IConfigurationElement configElement)(Code) | | Create a new instance of the receiver.
Parameters: configElement - |
hashCode | final public int hashCode()(Code) | | Computes the hash code for this object based on the id.
The hash code for this object. |
isEnabledForSelection | public boolean isEnabledForSelection(ISelection selection)(Code) | | Check if the receiver is enabled for the given selection.
Parameters: selection - true if the given selection matches the conditionsspecified in IConfirgurationElement . |
verifyNameMatch | public static boolean verifyNameMatch(String name, String filter)(Code) | | Verifies that the given name matches the given wildcard filter. Returns
true if it does.
Parameters: name - Parameters: filter - true if there is a match |
|
|
|