public final class ViewModelHelper extends Object
|Modifier and Type||Method and Description|
Creates a new view model file.
Tries to load a view from the given file.
Check whether the given view has been resolved, i.e.
public static VView createViewModel(org.eclipse.core.resources.IFile modelFile, org.eclipse.emf.ecore.EClass selectedEClass, org.eclipse.core.resources.IFile selectedEcore) throws IOException
modelFile- the file in which the view should be saved
selectedEClass- the Root EClass for the new
selectedEcore- the ecore containing the selectedEClass. If the selectedEcore is null, then the selectedEClass must come from an EPackage which is registered by default in the package registry.
IOException- when something goes wrong while loading or saving the resource
public static VView loadView(org.eclipse.core.resources.IFile file, Collection<String> registeredEcores) throws IOException
IFilethat contains the view model to be loaded
Collectionthat will contain the paths of all Ecores that are necessary to load the view. call
VView. Note that view resolution may fail, so callers should check whether the view has been resolved successfully
IOException- in case an error occurs while loading the view
Copyright © 2018. All rights reserved.