Search in sources :

Example 6 with TypesLibrary

use of org.obeonetwork.dsl.typeslibrary.TypesLibrary in project InformationSystem by ObeoNetwork.

the class TypeInstanceItemProvider method getUsedNativeTypesLibraries.

protected Collection<NativeTypesLibrary> getUsedNativeTypesLibraries(Object object) {
    final Collection<NativeTypesLibrary> nativeTypesLibraries = new ArrayList<NativeTypesLibrary>();
    if (object instanceof EObject) {
        EObject eObject = (EObject) object;
        final TypesLibraryUser user = getTypesLibraryUserFromParents(eObject);
        if (user != null && user.getUsedLibraries().isEmpty() == false) {
            for (TypesLibrary library : user.getUsedLibraries()) {
                if (library instanceof NativeTypesLibrary) {
                    nativeTypesLibraries.add((NativeTypesLibrary) library);
                }
            }
        }
    }
    return nativeTypesLibraries;
}
Also used : TypesLibraryUser(org.obeonetwork.dsl.typeslibrary.TypesLibraryUser) NativeTypesLibrary(org.obeonetwork.dsl.typeslibrary.NativeTypesLibrary) EObject(org.eclipse.emf.ecore.EObject) ArrayList(java.util.ArrayList) NativeTypesLibrary(org.obeonetwork.dsl.typeslibrary.NativeTypesLibrary) TypesLibrary(org.obeonetwork.dsl.typeslibrary.TypesLibrary)

Aggregations

TypesLibrary (org.obeonetwork.dsl.typeslibrary.TypesLibrary)6 EObject (org.eclipse.emf.ecore.EObject)3 DataBase (org.obeonetwork.dsl.database.DataBase)3 NativeTypesLibrary (org.obeonetwork.dsl.typeslibrary.NativeTypesLibrary)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 TypesLibraryUser (org.obeonetwork.dsl.typeslibrary.TypesLibraryUser)2 File (java.io.File)1 Timestamp (java.sql.Timestamp)1 SimpleDateFormat (java.text.SimpleDateFormat)1 LinkedHashMap (java.util.LinkedHashMap)1 MissingResourceException (java.util.MissingResourceException)1 IFile (org.eclipse.core.resources.IFile)1 IResource (org.eclipse.core.resources.IResource)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 URI (org.eclipse.emf.common.util.URI)1 Resource (org.eclipse.emf.ecore.resource.Resource)1 ResourceSet (org.eclipse.emf.ecore.resource.ResourceSet)1 ResourceSetImpl (org.eclipse.emf.ecore.resource.impl.ResourceSetImpl)1 XMLResource (org.eclipse.emf.ecore.xmi.XMLResource)1