Package org.openquark.cal.services

Examples of org.openquark.cal.services.MetaModule


                            final GemDrawer gemDrawer = (GemDrawer) selectedNode;
                            final ModuleName moduleName = gemDrawer.getModuleName();
                            if (gemDrawer.isNamespaceNode()) {
                                address = NavAddress.getModuleNamespaceAddress(moduleName);
                            } else {
                                MetaModule metaModule = browserTree.getNavigatorOwner().getPerspective().getMetaModule(moduleName);
                                address = NavAddress.getAddress(metaModule);
                            }
                            browserTree.getNavigatorOwner().editMetadata(address);
                        }
                    }
View Full Code Here


                            final GemDrawer gemDrawer = (GemDrawer) selectedNode;
                            final ModuleName moduleName = gemDrawer.getModuleName();
                            if (gemDrawer.isNamespaceNode()) {
                                address = NavAddress.getModuleNamespaceAddress(moduleName);
                            } else {
                                MetaModule metaModule = browserTree.getNavigatorOwner().getPerspective().getMetaModule(moduleName);
                                address = NavAddress.getAddress(metaModule);
                            }
                            browserTree.getNavigatorOwner().displayMetadata(address, true);
                        }
                    }
View Full Code Here

//                setNamingPolicy(ScopedEntityNamingPolicy.UNQUALIFIED);
                ModuleName[] matches = moduleResolutions.getPotentialMatches();
                HashSet<GemEntity> results = new HashSet<GemEntity>();
                for(int i = 0; i < matches.length; ++i){
                    ModuleName moduleName = matches[i];
                    MetaModule metaModule = (perspective.isVisibleModule(moduleName)? perspective.getMetaModule(moduleName) : null);
                    if (metaModule != null) {
                        results.addAll(perspective.getVisibleGemEntities(metaModule));
                    }
                }
                return results;
View Full Code Here

     * @param owner the navigator owner.
     * @param qualifiedName the name to check.
     * @return true if the given qualified name is a class method name, false otherwise.
     */
    private static boolean isNameForClassMethod(NavFrameOwner owner, QualifiedName qualifiedName) {
        MetaModule metaModule = owner.getPerspective().getMetaModule(qualifiedName.getModuleName());
        if (metaModule == null) {
            return false;
        }
        return metaModule.getTypeInfo().getClassMethod(qualifiedName.getUnqualifiedName()) != null;
    }
View Full Code Here

       
        // add links to the module vaults
        if (metadata instanceof ModuleMetadata) {
           
            ModuleName moduleName = ModuleName.make(url.getBase());
            MetaModule module = owner.getPerspective().getMetaModule(moduleName);

            if (module.getTypeInfo().getNFunctions() > 0) {
                NavAddress vaultUrl = url.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.FUNCTION_VAULT_VALUE);
                buffer.append(getLinkHtml(vaultUrl, NavigatorMessages.getString("NAV_Functions_Link")));
                buffer.append(" | ");
            }
       
            if (module.getTypeInfo().getNTypeConstructors() > 0) {
                NavAddress vaultUrl = url.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.TYPE_VAULT_VALUE);
                buffer.append(getLinkHtml(vaultUrl, NavigatorMessages.getString("NAV_Types_Link")));
                buffer.append(" | ");
            }
       
            if (module.getTypeInfo().getNTypeClasses() > 0) {
                NavAddress vaultUrl = url.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.CLASS_VAULT_VALUE);
                buffer.append(getLinkHtml(vaultUrl, NavigatorMessages.getString("NAV_Classes_Link")));
                buffer.append(" | ");
            }
       
            if (module.getTypeInfo().getNClassInstances() > 0) {
                NavAddress vaultUrl = url.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.INSTANCE_VAULT_VALUE);
                buffer.append(getLinkHtml(vaultUrl, NavigatorMessages.getString("NAV_Instances_Link")));
                buffer.append(" | ");
            }
        }
View Full Code Here

        buffer.append(getPageLocationHtml(owner, url));
        buffer.append("<table cellpadding='1' cellspacing='0' width='100%' bgcolor='#E0E0E0'><tr><td nowrap>");
        buffer.append("<font face='arial' size='2'>");
               
        ModuleName moduleName = ModuleName.make(url.getBase());
        MetaModule module = owner.getPerspective().getMetaModule(moduleName);

        url = url.withAllStripped();
       
        if (module.getTypeInfo().getNFunctions() > 0) {
            NavAddress vaultUrl = url.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.FUNCTION_VAULT_VALUE);
            buffer.append(getLinkHtml(vaultUrl, NavigatorMessages.getString("NAV_Functions_Link")));
            buffer.append(" | ");
        }
       
        if (module.getTypeInfo().getNTypeConstructors() > 0) {
            NavAddress vaultUrl = url.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.TYPE_VAULT_VALUE);
            buffer.append(getLinkHtml(vaultUrl, NavigatorMessages.getString("NAV_Types_Link")));
            buffer.append(" | ");
        }
       
        if (module.getTypeInfo().getNTypeClasses() > 0) {
            NavAddress vaultUrl = url.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.CLASS_VAULT_VALUE);
            buffer.append(getLinkHtml(vaultUrl, NavigatorMessages.getString("NAV_Classes_Link")));
            buffer.append(" | ");
        }
       
        if (module.getTypeInfo().getNClassInstances() > 0) {
            NavAddress vaultUrl = url.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.INSTANCE_VAULT_VALUE);
            buffer.append(getLinkHtml(vaultUrl, NavigatorMessages.getString("NAV_Instances_Link")));
            buffer.append(" | ");
        }
       
View Full Code Here

        buffer.append("<h1>" + NavigatorMessages.getString("NAV_FunctionVault_Header") + "</h1>");
        buffer.append(NavigatorMessages.getString("NAV_FunctionVault_Message", moduleLink));
        buffer.append("<br><br><tt>");
       
        ModuleName moduleName = ModuleName.make(url.getBase());
        MetaModule module = owner.getPerspective().getMetaModule(moduleName);
        SortedSet<ScopedEntity> entities = new TreeSet<ScopedEntity>(new ScopedEntityComparator());
        int count = module.getTypeInfo().getNFunctions();
       
        for (int n = 0; n < count; n++) {
            entities.add(module.getTypeInfo().getNthFunction(n));
        }

        for (final ScopedEntity entity : entities) {
            NavAddress entityAddress = NavAddress.getAddress(entity);
            buffer.append(getLinkHtml(entityAddress, NavAddressHelper.getDisplayText(owner, entityAddress, ScopedEntityNamingPolicy.UNQUALIFIED)));
View Full Code Here

        buffer.append("<h1>" + NavigatorMessages.getString("NAV_ClassVault_Header") + "</h1>");
        buffer.append(NavigatorMessages.getString("NAV_ClassVault_Message", moduleLink));
        buffer.append("<br><br><tt>");
       
        ModuleName moduleName = ModuleName.make(url.getBase());
        MetaModule module = owner.getPerspective().getMetaModule(moduleName);
        SortedSet<TypeClass> entities = new TreeSet<TypeClass>(new ScopedEntityComparator());
        int count = module.getTypeInfo().getNTypeClasses();
       
        for (int n = 0; n < count; n++) {
            entities.add(module.getTypeInfo().getNthTypeClass(n));
        }
          
        for (final ScopedEntity entity : entities) {
            NavAddress entityAddress = NavAddress.getAddress(entity);
            buffer.append(getLinkHtml(entityAddress, NavAddressHelper.getDisplayText(owner, entityAddress, ScopedEntityNamingPolicy.UNQUALIFIED)));
View Full Code Here

        buffer.append("<h1>" + NavigatorMessages.getString("NAV_TypeVault_Header") + "</h1>");
        buffer.append(NavigatorMessages.getString("NAV_TypeVault_Message", moduleLink));
        buffer.append("<br><br><tt>");
       
        ModuleName moduleName = ModuleName.make(url.getBase());
        MetaModule module = owner.getPerspective().getMetaModule(moduleName);
        SortedSet<TypeConstructor> entities = new TreeSet<TypeConstructor>(new ScopedEntityComparator());
        int count = module.getTypeInfo().getNTypeConstructors();
       
        for (int n = 0; n < count; n++) {
            entities.add(module.getTypeInfo().getNthTypeConstructor(n));
        }

        for (final ScopedEntity entity : entities) {
            NavAddress entityAddress = NavAddress.getAddress(entity);
            buffer.append(getLinkHtml(entityAddress, NavAddressHelper.getDisplayText(owner, entityAddress, ScopedEntityNamingPolicy.UNQUALIFIED)));
View Full Code Here

        }

        @Override
        protected Set<GemEntity> getDataObjects() {
           
            MetaModule targetMetaModule = workspace.getMetaModule(typeCheckInfo.getModuleName());
           
            GemViewer gemViewer = new GemViewer();
            gemViewer.addFilter(new UnorderedTypeMatchFilter(inputExpr, outputExpr, targetMetaModule.getTypeInfo(), true));

            Perspective perspective = new Perspective(workspace, targetMetaModule);
            perspective.setGemEntityViewer(gemViewer);
           
            return getVisibleGemsFromPerspective(perspective);  
View Full Code Here

TOP

Related Classes of org.openquark.cal.services.MetaModule

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.