xmi version of the workbench model, can these be used to create a workbench? [message #561920] |
Mon, 03 August 2009 13:13 |
No real name Messages: 113 Registered: July 2009 |
Senior Member |
|
|
The current e4 platform has a loader for the Application.ecore model as
part of the workbench initialization. It uses standard EMF readers for
the model then attaches to the workbench as the workbench's "model".
That code is in org.eclipse.e4.workbench.ui.internal.Workbench.java here:
....
private MApplication<? extends MWindow> workbench;
....
private MApplication<? extends MWindow> loadDefaultModel(URI
defaultModelPath) {
Resource resource = new
ResourceSetImpl().getResource(defaultModelPath, true);
MApplication<MWindow> app = (MApplication<MWindow>)
resource.getContents().get(0);
final EList<MWindow> windows = app.getWindows();
for (MWindow window : windows) {
processPartContributions(resource, window);
}
return app;
}
....
So that works. However, is there a place where the Workbench model is
read in a similar way that creates the workbench? It looks like it would
need to happen in the WorkbenchApplication class but it looks like it is
all manually created.
|
|
|
Powered by
FUDForum. Page generated in 0.02929 seconds