Project: Eclipse_Platform_UI
Bug 324663 [ActivityMgmt] Enabling activity through core expression overrides pattern binding, causing exception
Reported: 2010-09-07 11:10:55 | Status: verified fixed

Build Identifier: 20100218-1602 If a plugin defines a view perspectiveExtension targeted at a perspective from another plugin, and the view is disabled by means of an activityPatternBinding with a core expression, the UI will try to create the view event though it is disabled, resulting in an exception. The exception only appears in the log. Heres my analysis: - PageLayout#createView(String partID) calls ViewRegistry#find(String id). - That method returns null because WorkbenchActivityHelper#restrictUseOf(desc)is true. - PageLayout#createView passes the null result to WorkbenchActivityHelper#filterItem, which returns false! - therefore LayoutHelper#createView is called, resulting in an exception Reproducible: Always Steps to Reproduce: 1. define a perspectiveExtension that adds a view to another plugins's perspective 2. add an activity with a regex expression, e.g. "com\.mycompany\.demo/..* 3. disable the activity 4. reset the perspective

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java