Package com.redhat.ceylon.compiler.java.runtime.model

Examples of com.redhat.ceylon.compiler.java.runtime.model.RuntimeModuleManager


                classLoader = getClassLoader("runtime model loader tests", moduleWithArtifact);
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
            }
            try{
                RuntimeModuleManager moduleManager = Metamodel.getModuleManager();
                RuntimeModelLoader modelLoader = moduleManager.getModelLoader();
                Modules modules = moduleManager.getContext().getModules();
                // now see if we can find our declarations
                compareDeclarations(modelCompare, decls, modelLoader, modules);
            }finally{
                try {
                    classLoader.close();
View Full Code Here


    protected void verifyRuntimeClassLoading(RunnableTest test) {
        RepositoryManager repoManager = CeylonUtils.repoManager()
                .buildManager();
        VFS vfs = new VFS();
        com.redhat.ceylon.compiler.typechecker.context.Context context = new com.redhat.ceylon.compiler.typechecker.context.Context(repoManager, vfs);
        RuntimeModuleManager moduleManager = new RuntimeModuleManager(context);
        moduleManager.initCoreModules();
        moduleManager.loadModule(AbstractModelLoader.CEYLON_LANGUAGE, Versions.CEYLON_VERSION_NUMBER, repoManager.getArtifactResult("ceylon.language", Versions.CEYLON_VERSION_NUMBER),
                getClass().getClassLoader());
        RuntimeModelLoader modelLoader = moduleManager.getModelLoader();
        modelLoader.setupWithNoStandardModules();
        modelLoader.loadStandardModules();
        test.test(modelLoader);
    }
View Full Code Here

        } else {
            fullPath = fullPath.substring(1);
        }
       
        // First lets ask the module manager for the contents of the resource
        RuntimeModuleManager moduleManager = Metamodel.getModuleManager();
        if (moduleManager != null) {
            RuntimeModelLoader modelLoader = moduleManager.getModelLoader();
            if (modelLoader != null) {
                byte[] contents = modelLoader.getContents(declaration, fullPath);
                if (contents != null) {
                    URI uri = modelLoader.getContentUri(declaration, fullPath);
                    return new ByteArrayResource(contents, uri);
View Full Code Here

           
        }, false, (int)com.redhat.ceylon.common.Constants.DEFAULT_TIMEOUT);
        RepositoryManager repoManager = builder.buildRepository();
        VFS vfs = new VFS();
        Context context = new Context(repoManager, vfs);
        moduleManager = new RuntimeModuleManager(context);
        moduleManager.initCoreModules();
        moduleManager.prepareForTypeChecking();
        typeCheckModelToRuntimeModel.clear();
        typeCheckModulesToRuntimeModel.clear();
        typeCheckPackagesToRuntimeModel.clear();
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.java.runtime.model.RuntimeModuleManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.