Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.ModuleNameResolver


     * @param listModuleCommand the command to suggest to the user to display a list of appropriate modules.
     * @return the corresponding fully qualified module name, or null if the given name cannot be unambiguously resolved.
     */
    private ModuleName resolveModuleName(String moduleNameString, ModuleName[] visibleModuleNames, boolean logWarningIfNotResolvable, String listModuleCommand) {
       
        ModuleNameResolver moduleNameResolver = ModuleNameResolver.make(new HashSet<ModuleName>(Arrays.asList(visibleModuleNames)));
        return resolveModuleName(moduleNameString, moduleNameResolver, logWarningIfNotResolvable, listModuleCommand);
    }
View Full Code Here


            synchronized (this.workspaceManager) {
               
                ModuleName unresolvedModuleName = ModuleName.maybeMake(moduleNameString);
               
                ModuleName[] moduleNamesInWorkspace = getWorkspaceManager().getWorkspace().getModuleNames();
                ModuleNameResolver workspaceModulesResolver = ModuleNameResolver.make(new HashSet<ModuleName>(Arrays.asList(moduleNamesInWorkspace)));
                ModuleNameResolver.ResolutionResult workspaceResolution = workspaceModulesResolver.resolve(unresolvedModuleName);
               
                ModuleNameResolver discoverableModulesResolver = ModuleNameResolver.make(getDiscoverableModules());

                ModuleName moduleName = resolveModuleName(moduleNameString, discoverableModulesResolver, workspaceResolution.isUnknown(), ":sdm");

                if (moduleName == null) {
View Full Code Here

                continue;
               
//                throw new RenamingException(errorMessage);
            }
           
            ModuleNameResolver oldExpressionContextModuleNameResolver = moduleTypeInfo.getModuleNameResolver();
            String newExpressionString = typeChecker.calculateUpdatedCodeExpression(oldExpression.getExpressionText(), oldExpression.getModuleContext(), oldExpressionContextModuleNameResolver, oldExpression.getQualificationMap(), oldName, newName, category, null);
           
            CodeAnalyser codeAnalyser = new CodeAnalyser(typeChecker, moduleTypeInfo, false, false);
            MessageLogger logger = new MessageLogger();
            QualificationResults qualificationResults = codeAnalyser.qualifyExpression(newExpressionString, null, oldExpression.getQualificationMap(), logger);
View Full Code Here

                if (workspace.getMetaModule(moduleName) == null) {
                    // the program contains the module but the workspace doesn't, so we cannot process it
                    continue;
                }
               
                ModuleNameResolver moduleNameResolver = workspaceManager.getModuleTypeInfo(moduleName).getModuleNameResolver();
                GemDesignManager designManager = (GemDesignManager)workspace.getResourceManager(moduleName, WorkspaceResource.GEM_DESIGN_RESOURCE_TYPE);
               
                // loop through the resources for this module
                for (Iterator<WorkspaceResource> it = ((GemDesignStore)designManager.getResourceStore()).getResourceIterator(moduleName); it.hasNext(); ) {
                    WorkspaceResource designResource = it.next();
View Full Code Here

     * @param gemCutter
     * @throws GemEntityNotPresentException
     */
    public void updateTableTop(GemCutter gemCutter) throws GemEntityNotPresentException {
        ModuleName workingModuleName = gemCutter.getPerspective().getWorkingModuleName();
        ModuleNameResolver workingModuleNameResolver = gemCutter.getPerspective().getWorkingModuleTypeInfo().getModuleNameResolver();
       
        for (final Gem gem : gemCutter.getTableTop().getGemGraph().getGems()) {
            if (gem instanceof FunctionalAgentGem) {
                FunctionalAgentGem fGem = (FunctionalAgentGem)gem;
                if (fGem.getName().equals(oldName)) {
View Full Code Here

        }
        for (final MetaModule hiddenModule: hiddenModules) {
            moduleNames.add(hiddenModule.getName());
        }
       
        ModuleNameResolver workspaceModuleNameResolver = ModuleNameResolver.make(moduleNames);
       
        // Add the visible modules in alphabetical order.
        Collections.sort(visibleModules, getModuleAlphaComparator(workspaceModuleNameResolver, moduleTreeDisplayMode));

        for (final MetaModule metaModule : visibleModules) {
View Full Code Here

        Set<ModuleName> moduleNames = new HashSet<ModuleName>();
        for (final MetaModule metaModule : modules) {
            moduleNames.add(metaModule.getName());
        }
       
        ModuleNameResolver workspaceModuleNameResolver = ModuleNameResolver.make(moduleNames);
       
        List<NavModuleNode> moduleNodes = new ArrayList<NavModuleNode>(modules.size());
       
        for (final MetaModule metaModule : modules) {
            NavModuleNode moduleNode = makeModuleNode(metaModule, workspaceModuleNameResolver, treeViewDisplayMode);
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.ModuleNameResolver

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.