Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » xmi version of the workbench model, can these be used to create a workbench?
xmi version of the workbench model, can these be used to create a workbench? [message #561920] Mon, 03 August 2009 09:13
No real name is currently offline 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.
Previous Topic:Legacy RCP Applications
Next Topic:Legacy RCP Applications
Goto Forum:
  


Current Time: Thu Aug 21 22:14:49 EDT 2014

Powered by FUDForum. Page generated in 0.07213 seconds