public final class ResourceSetHelpers extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
addResourceToSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.util.URI resourceURI)
Deprecated.
|
static boolean |
addResourceToSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.util.URI resourceURI,
Map<Object,Object> loadOptions)
Loads a resource from resourceURI and adds it to the resourceSet.
|
static org.eclipse.emf.ecore.resource.ResourceSet |
createResourceSet(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain domain)
Creates a ResourceSet with the given EditingDomain.
|
static org.eclipse.emf.ecore.resource.ResourceSet |
createResourceSet(org.eclipse.emf.common.command.CommandStack commandStack)
Creates a ResourceSet with a CommandStack attached to it.
|
static <T> List<T> |
findAllOf(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
Class<T> clazz,
boolean includeEcorePackage)
Find all of type in the ResourceSet.
|
static <T> List<T> |
findAllOfTypeInResourceSet(org.eclipse.emf.ecore.EObject object,
Class<T> clazz,
boolean includeEcorePackage)
Find all of type in resource set.
|
static List<?> |
findAllOfTypeInResourceSet(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EClassifier type,
boolean includeEcorePackage)
Find all of type in resource set.
|
static org.eclipse.emf.ecore.resource.ResourceSet |
loadResourceSetWithProxies(org.eclipse.emf.common.util.URI resourceURI,
org.eclipse.emf.common.command.BasicCommandStack commandStack)
Deprecated.
|
static org.eclipse.emf.ecore.resource.ResourceSet |
loadResourceSetWithProxies(org.eclipse.emf.common.util.URI resourceURI,
org.eclipse.emf.common.command.BasicCommandStack commandStack,
Map<Object,Object> options)
Load resource set with proxies.
|
static org.eclipse.emf.ecore.resource.ResourceSet |
loadResourceWithProxies(org.eclipse.emf.common.util.URI resourceURI,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Deprecated.
|
static org.eclipse.emf.ecore.resource.ResourceSet |
loadResourceWithProxies(org.eclipse.emf.common.util.URI resourceURI,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
Map<Object,Object> loadOptions)
Load resource set with proxies.
|
static void |
resolveAllProxies(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Visits all proxies in the resource set and tries to resolve them.
|
static boolean |
save(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Deprecated.
|
static boolean |
save(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
Map<Object,Object> saveOptions)
Save all changes in a ResourceSet.
|
@Deprecated public static boolean save(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
save(ResourceSet, Map)
resourceSet
- the resource setpublic static boolean save(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Map<Object,Object> saveOptions)
resourceSet
- the resource setsaveOptions
- the save options@Deprecated public static org.eclipse.emf.ecore.resource.ResourceSet loadResourceSetWithProxies(org.eclipse.emf.common.util.URI resourceURI, org.eclipse.emf.common.command.BasicCommandStack commandStack)
loadResourceSetWithProxies(URI, BasicCommandStack, Map)
resourceURI
- the resource uri (= File to load)commandStack
- the command stackpublic static org.eclipse.emf.ecore.resource.ResourceSet loadResourceSetWithProxies(org.eclipse.emf.common.util.URI resourceURI, org.eclipse.emf.common.command.BasicCommandStack commandStack, Map<Object,Object> options) throws IOException
resourceURI
- the resource uri (= File to load)commandStack
- the command stackoptions
- the resource load optionsIOException
- if an error occurred while loading the resource@Deprecated public static org.eclipse.emf.ecore.resource.ResourceSet loadResourceWithProxies(org.eclipse.emf.common.util.URI resourceURI, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
loadResourceWithProxies(URI, ResourceSet, Map)
resourceURI
- the resource uri (= File to load)resourceSet
- the resource setpublic static org.eclipse.emf.ecore.resource.ResourceSet loadResourceWithProxies(org.eclipse.emf.common.util.URI resourceURI, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Map<Object,Object> loadOptions) throws IOException
resourceURI
- the resource uri (= File to load)resourceSet
- the resource setloadOptions
- the resource load optionsIOException
- if an error occurred while loading the resourcepublic static org.eclipse.emf.ecore.resource.ResourceSet createResourceSet(org.eclipse.emf.common.command.CommandStack commandStack)
commandStack
- the command stackpublic static org.eclipse.emf.ecore.resource.ResourceSet createResourceSet(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain domain)
domain
- the editing domain@Deprecated public static boolean addResourceToSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI resourceURI)
addResourceToSet(ResourceSet, URI, Map)
resourceSet
- the resource setresourceURI
- the resource uripublic static boolean addResourceToSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI resourceURI, Map<Object,Object> loadOptions) throws IOException
resourceSet
- the resource setresourceURI
- the resource uriloadOptions
- the resource load optionsIOException
- if an error occurred while loading the resourcepublic static void resolveAllProxies(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
resourceSet
- The ResourceSet
containing the Resources
to resolvepublic static List<?> findAllOfTypeInResourceSet(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EClassifier type, boolean includeEcorePackage)
object
- the objecttype
- the typeincludeEcorePackage
- the include ecore packagepublic static <T> List<T> findAllOfTypeInResourceSet(org.eclipse.emf.ecore.EObject object, Class<T> clazz, boolean includeEcorePackage)
T
- the generic typeobject
- the objectclazz
- the clazzincludeEcorePackage
- the include ecore packagepublic static <T> List<T> findAllOf(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Class<T> clazz, boolean includeEcorePackage)
T
- the generic typeresourceSet
- the resource setclazz
- the clazzincludeEcorePackage
- the include ecore packageCopyright © 2019. All rights reserved.