Community
Participate
Working Groups
BuildId: HEAD components.e4xmi files contributed through the org.eclipse.e4.workbench.model extension point are processed in no defined order. As a result, a components.e4xmi cannot reliably depend on elements defined in another components.e4xmi file. The following patch (to follow) ensures that the extensions are topologically sorted by their contributor's dependencies. With this patch, components.e4xmi can depend on other components.e4xmi files -- providing their containing plugins have a direct dependency. This will likely be a necessary piece to help with bug 309867.
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.