* @param id The unique ID of the expression definition
* @return the expression
* @throws CoreException If the expression cannot be found.
*/
public Expression getExpression(String id) throws CoreException {
Expression cachedExpression= (Expression)getCache().get(id);
if (cachedExpression != null) {
return cachedExpression;
}
IExtensionRegistry registry= Platform.getExtensionRegistry();
IConfigurationElement[] ces= registry.getConfigurationElementsFor("org.eclipse.core.expressions", "definitions"); //$NON-NLS-1$ //$NON-NLS-2$
Expression foundExpression= null;
for (int i= 0; i < ces.length; i++) {
String cid= ces[i].getAttribute("id"); //$NON-NLS-1$
if (cid != null && cid.equals(id)) {
try {
foundExpression= getExpression(id, ces[i]);