diff options
| author | Paul Webster | 2012-05-24 18:10:14 +0000 |
|---|---|---|
| committer | Paul Webster | 2012-05-24 18:10:14 +0000 |
| commit | 523f6369432e1fc810a86aa9c8ae2c1d9da44323 (patch) | |
| tree | cd3b637db4dc78761f599c54833983e545131712 | |
| parent | b0b57f0bbe35ab94e81eeac824c669432072a9f4 (diff) | |
| download | eclipse.platform.ui-523f6369432e1fc810a86aa9c8ae2c1d9da44323.tar.gz eclipse.platform.ui-523f6369432e1fc810a86aa9c8ae2c1d9da44323.tar.xz eclipse.platform.ui-523f6369432e1fc810a86aa9c8ae2c1d9da44323.zip | |
Bug 379977 - Trying to delete a branch caused CCEv20120524-1810I20120524-2100
Having a core expression throw a CoreException should just count as
false.
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerActivation.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerActivation.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerActivation.java index f0c9e6a6ec1..57be99ecd40 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerActivation.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerActivation.java @@ -105,8 +105,16 @@ final class HandlerActivation implements IHandlerActivation { active = true; } else { try { + active = false; active = activeWhen.evaluate(context) != EvaluationResult.FALSE; } catch (CoreException e) { + /* + * Swallow the exception. It simply means the variable is not + * valid (most frequently, that the value is null or has a + * complex core expression with a property tester). This kind of + * information is not really useful to us, so we can just treat + * it as false. + */ Activator.trace(Policy.DEBUG_CMDS, "Failed to calculate active", e); //$NON-NLS-1$ } } |
