Examples of MetaModule


Examples of org.openquark.cal.services.MetaModule

        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

Examples of org.openquark.cal.services.MetaModule

        }

        @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

Examples of org.openquark.cal.services.MetaModule

        compileWorkspace(false);

        // Create the perspective
        CALWorkspace workspace = workspaceManager.getWorkspace();
        ModuleName workingModuleName = getInitialWorkingModuleName(workspace);
        MetaModule initialWorkingModule = workspace.getMetaModule(workingModuleName);
        perspective = new Perspective(workspace, initialWorkingModule);

        // Set the initial preferred working module name.
        setInitialPreferredWorkingModuleName();
       
View Full Code Here

Examples of org.openquark.cal.services.MetaModule

                /** Get the target collector and dump it's definition to the console */
                public void actionPerformed(ActionEvent evt) {
                    CollectorGem targetCollector = tableTop.getTargetCollector();
                    Target targetGem = tableTop.getDisplayedGem(targetCollector).getTarget();                   
                    MetaModule currentMetaModule = getWorkspace().getMetaModule(getWorkingModuleName());
                    ModuleTypeInfo currentModuleTypeInfo = currentMetaModule.getTypeInfo();
                   
                    System.out.println("Gem Definition:");
                    System.out.println(targetGem.getTargetDef(null, currentModuleTypeInfo)+"\n");
                   
                }
View Full Code Here

Examples of org.openquark.cal.services.MetaModule

       
        if (selectedModuleName == null) {
            return;
        }
       
        MetaModule metaModule = getWorkspaceManager().getWorkspace().getMetaModule(selectedModuleName);
        if (metaModule == null) {
            String title = getResourceString("ExportModuleFailedDialogTitle");
            String message = getResourceString("GetModulesErrorMessage");
            JOptionPane.showMessageDialog(GemCutter.this, message, title, JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

Examples of org.openquark.cal.services.MetaModule

                            } else {
                                newWorkingModuleName = getInitialWorkingModuleName(workspace);
                            }
                           
                            // Create the perspective
                            MetaModule initialWorkingModule = workspace.getMetaModule(newWorkingModuleName);
                            perspective = new Perspective(workspace, initialWorkingModule);
                           
                            // Clear the TableTop before resetting the runners, so that value editors can be closed
                            // by the original ValueEditorHierarchyManager.
                            newTableTop();
View Full Code Here

Examples of org.openquark.cal.services.MetaModule

           
            // Pick the module with the most imports.
            // In the event of a tie, pick the later one, as it will tend to depend on earlier ones.
            int maxImportedModules = 0;
            for (int i = 0; i < nModules; i++) {
                MetaModule nthMetaModule = workspace.getNthMetaModule(i);
                int nImportedModules = nthMetaModule.getNImportedModules();
               
                if (nImportedModules >= maxImportedModules) {
                    maxImportedModules = nImportedModules;
                    workingModuleName = nthMetaModule.getName();
                }
            }
        }
       
        return workingModuleName;           
View Full Code Here

Examples of org.openquark.cal.services.MetaModule

        Set<GemEntity> entities = new LinkedHashSet<GemEntity>();
        List<MetaModule> modules = perspective.getVisibleMetaModules();
       
        for (int i = 0, size = modules.size(); i < size; i++) {
           
            MetaModule module = modules.get(i);
           
            if (visibilityPolicy.isModuleVisible(module)) {
                // TODO currently we don't support metadata expert/hidden/preferred flag
                // checking for gem entities, so as long as the module is visible,
                // all public gems are visible
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.