| Summary: | components.e4xmi should be processed in bundle-dependency order | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Brian de Alwis <bsd> | ||||
| Component: | UI | Assignee: | Project Inbox <e4.ui-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, ob1.eclipse, pwebster, tom.schindl | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 1.0 RC0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Brian de Alwis
Created attachment 170253 [details]
patch to ModelExtensionProcessor.java
Cause the ModelExtensionProcessor to process extensions in dependency
order. This ensures that components.e4xmi can rely on elements
defined in other components.e4xmi (providing their plugins express
the appropriate dependency, of course).
Interesting approach. In menu contributions we dealt with this by providing a processing loop that continues to process contributions until the only ones left cannot have their target location met (a combination of parent ID and before/after sibling ID) PW Wow, Brian, thank you! Very nice addition. We might need to add cycles to the processing as Paul suggested in the comment 2, but this change improves current behavior a lot. This leads to an exception when launching the the Contacts-Demo: -----8<----- !ENTRY org.eclipse.e4.ui.workbench 4 0 2010-05-31 17:13:01.219 !MESSAGE !STACK 0 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.eclipse.e4.workbench.ui.internal.ModelExtensionProcessor.topoSort(ModelExtensionProcessor.java:268) at org.eclipse.e4.workbench.ui.internal.ModelExtensionProcessor.addModelExtensions(ModelExtensionProcessor.java:97) at org.eclipse.e4.workbench.ui.internal.ResourceHandler.loadMostRecentModel(ResourceHandler.java:195) -----8<----- ... which leads to shutdown problems because the reconciler is not created Oops. Thanks for finding that, Tom. Fix committed to CVS. |