Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 259536 - [EditorMgmt] [Patch] Problems reloading a bundle
Summary: [EditorMgmt] [Patch] Problems reloading a bundle
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-22 19:12 EST by Carsten Pfeiffer CLA
Modified: 2009-01-30 09:45 EST (History)
3 users (show)

See Also:


Attachments
Fixes support for reloading of editor extensions (4.48 KB, patch)
2008-12-22 19:12 EST, Carsten Pfeiffer CLA
bokowski: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Pfeiffer CLA 2008-12-22 19:12:13 EST
Created attachment 121103 [details]
Fixes support for reloading of editor extensions

Build ID: M20080911-1700

I'm trying to reload a bundle using PackageAdmin. The bundle in question provides quite a few extensions, some of them being content types and editors, so reloading the bundle causes causes registry changes.

During unloading, the removal of the extensions causes exceptions to be thrown: InvalidRegistryObjectException: "Invalid registry object"

This is due to EditorRegistry.removeEditorFromMapping() calling FileEditorMapping.getEditors(), which then calls WorkbenchActivityHelper.restrictCollection() on the (now invalid) editor descriptors.

The fix is to add a method FileEditorMapping.getAllEditors(), which does not filter by activities and use that.

While I was at it I also took the liberty to implement
//TODO remove from content type mappings
(hopefully correctly).
Comment 1 Boris Bokowski CLA 2009-01-21 12:26:58 EST
Released to HEAD. Thanks for the patch!
Comment 2 Oleg Besedin CLA 2009-01-30 09:45:06 EST
Verified in I20090129-0100.