Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 381899

Summary: Plugins should have explicit state
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Simon Kaegi <simon_kaegi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: simon_kaegi
Version: 0.5   
Target Milestone: 1.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 336260    

Description Mark Macdonald CLA 2012-06-06 14:05:10 EDT
A Plugin can be in one of several different states. Currently this logic is encoded among a few boolean variables inside the Plugin class. Sometimes events are dispatched when these change, but it's not really consistent.

Plugin state should be recorded using an explicit field with a setState() function responsible for managing state transitions and firing the appropriate events.

The states, transitions, and events should be documented.
Comment 1 Mark Macdonald CLA 2012-06-28 16:45:16 EDT
First commit, adds a getState() method, and events (dispatched on the pluginregistry) when state changes:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug381899&id=88f42c0d62a1a9c3948938cf03aabdbddbbef9fd

Second commit removes the 'pluginAdded' and 'pluginRemoved' events. These were not used by any Orion code, and are superseded by pluginInstalled and pluginUninstalled (unless there are some subtleties I've missed..)

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug381899&id=c487a37f5d26b7c727bd89f68a05eb76be4bdac7