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

Bug 338584

Summary: Make the standard addons 'auto-install'
Product: [Eclipse Project] e4 Reporter: Eric Moffatt <emoffatt>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: unspecified   
Target Milestone: 4.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 338707    
Bug Blocks:    
Attachments:
Description Flags
Auto-install the standard addons none

Description Eric Moffatt CLA 2011-03-01 15:14:19 EST
Create a model processor extension to the addons bundle to automatically add the Cleanup, Min/Max and DnD addons.

This will allow the addons to be 'installed' into an app just by adding the bundle.
Comment 1 Eric Moffatt CLA 2011-03-01 15:18:22 EST
Created attachment 190085 [details]
Auto-install the standard addons


This works out exceptionally well...just take the contacts demo and add the addons bundle to the launch config, voila; min/max and dnd are available. Uncheck the bundle and restart and they're gone.
Comment 2 Eric Moffatt CLA 2011-03-01 15:57:11 EST
Seems to be an issue with DnD leaving the model in a strange state. 

Start the contacts demo including the addons, drag the Contacts List above the Details view and shut down...

java.lang.IllegalStateException: org.eclipse.e4.ui.model.application.ui.basic.impl.PartStackImpl@929ba3 (elementId: _SeXUC-8EEd6FC9cDb6iV7g, tags: [active], contributorURI: platform:/plugin/org.eclipse.e4.demo.contacts, tranientData: null) (widget: null, renderer: null, toBeRendered: false, onTop: false, visible: true, containerData: 30, accessibilityPhrase: null) could not be identified
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.getResourceId(XMLModelReconciler.java:958)
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.getOriginalId(XMLModelReconciler.java:1513)
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.createOriginalReferenceElement(XMLModelReconciler.java:1606)
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.appendOriginalReferenceElements(XMLModelReconciler.java:1613)
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.createUnsetDeltaElement(XMLModelReconciler.java:1582)
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.createDeltaElement(XMLModelReconciler.java:1536)
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.persistObject(XMLModelReconciler.java:869)
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.persist(XMLModelReconciler.java:845)
	at org.eclipse.e4.ui.internal.workbench.XMLModelReconciler.serialize(XMLModelReconciler.java:817)
	at org.eclipse.e4.ui.internal.workbench.ResourceHandler.save(ResourceHandler.java:211)


The symptom is that the reconciler dies, the model appears to be ok but
Comment 3 Remy Suen CLA 2011-03-02 09:34:40 EST
There's an issue where EMF seems to think the parent of an element has changed even though said element wasn't originally in the model. I'm not sure what's going on yet at the moment.
Comment 4 Eric Moffatt CLA 2011-03-10 14:31:05 EST
Committed in >20110310. Applied the patch. I had to hand copy over the new classes, for some reason they won't apply (new package?)
Comment 5 Eric Moffatt CLA 2011-03-10 14:32:08 EST
You could argue that there should be a separate plugin for this since the current mechanism is 'all or nothing', this would make a good topic for an addons discussion (at the BOF?).