Community
Participate
Working Groups
In some circumstances, the expression evaluation throws a CoreException. Sometimes this is done because there is an error but sometimes also because an expression does not resolve for the current selection. With "expression", I mean for example a handler activation expression. This exception is thrown in TypeExtensionManager#getProperty(Object, String, String, boolean) and caught in EvaluationReference.evaluate(IEvaluationContext). With the fix of bug 545270, it was decided to log all cases of this core exception. Previously, it used to be logged only in trace mode [1]. However, there seem to be cases where a valid expression is evaluated to a CoreException. This causes log flooding that cannot be solved by the plugin developer. Attached is a project with a seemingly valid handler activation expression that results in throwing the CoreException. The issue seems to be in the evaluation of the expression. This process should be looked at but until this time, the logging should revert back to the behavior before bug 545270. [1] https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=64d6e13fbf08b37e6b5072c15f8543c3d50511fc
Created attachment 284093 [details] Project with handler enablement and property tester An example project that exposes the flooding of the error log. The coding in the plugin is valid (I hope). It contains a handler for a command with a enablement using a property tester. I have seen flooding in different plugins and RCP applications, including our plugins. The exception is thrown in TypeExtensionManager#getProperty(Object, String, String, boolean) Instructions: 1. Start Eclipse SDK 2. Import existing project into ws 3. Open manifest.mf 4. Press "Launch an eclipse application" (green button in manifest toolbar) In the started eclipse: 5. Open the error log and dock it in the editor area 6. Open the console, open the OSGi console 7. Find the bundle for the project and start it 8. Switch between views and see the flooding of the error log See instruction in the attached movie.
Created attachment 284094 [details] Visualization of issue
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/169074
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/169413
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/169074 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6621f11da4c66738eeb80bd5e582b7d1595609b9
Created attachment 284148 [details] Before the patch
Created attachment 284149 [details] After the patch
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/169413 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=35e796f3108d280474770c3d03723738ae4e69e0
Thanks for reviewing, Karsten.