public class ModelResourceHandler
extends java.lang.Object
implements org.eclipse.e4.ui.workbench.IModelResourceHandler
ResourceHandler
. The copy is
registered in the plugin.xml in order to control the loading and saving of
the application model.Constructor and Description |
---|
ModelResourceHandler(boolean saveAndRestore,
boolean clearPersistedState)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.emf.ecore.resource.Resource |
createResourceWithApp(org.eclipse.e4.ui.model.application.MApplication theApp)
Creates a resource with an app Model, used for saving copies of the main app model.
|
protected long |
getLastApplicationModification() |
boolean |
hasTopLevelWindows() |
org.eclipse.emf.ecore.resource.Resource |
loadMostRecentModel() |
void |
save() |
@Inject public ModelResourceHandler(@Named(value="persistState") boolean saveAndRestore, @Named(value="clearPersistedState") boolean clearPersistedState)
saveAndRestore
- clearPersistedState
- public boolean hasTopLevelWindows()
true
if the current application model has top-level windows.public org.eclipse.emf.ecore.resource.Resource loadMostRecentModel()
loadMostRecentModel
in interface org.eclipse.e4.ui.workbench.IModelResourceHandler
public void save() throws java.io.IOException
save
in interface org.eclipse.e4.ui.workbench.IModelResourceHandler
java.io.IOException
public org.eclipse.emf.ecore.resource.Resource createResourceWithApp(org.eclipse.e4.ui.model.application.MApplication theApp)
createResourceWithApp
in interface org.eclipse.e4.ui.workbench.IModelResourceHandler
theApp
- the application model to add to the resourceprotected long getLastApplicationModification()
Copyright © 2007-2018. All Rights Reserved.