Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.ModuleName.toSourceText()


        // Get the module location.
        VaultLocation storedModuleLocation = getVaultLocation(vaultElement);
       
        // Create the vault info.
        VaultElementInfo vaultInfo = VaultElementInfo.makeBasic(storedModuleLocation.getVaultDescriptor(),
                                                          moduleName.toSourceText(),
                                                          storedModuleLocation.getLocationString(),
                                                          moduleRevisionNum.intValue());
       
        // Update the info map.
        workspace.updateVaultInfo(moduleName, vaultInfo);
View Full Code Here


               
                public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                    Pair<ModuleName, Boolean> p = UnsafeCast.<Pair<ModuleName, Boolean>>unsafeCast(value);
                    ModuleName moduleName = p.fst();
                    boolean isUserSelected = (p.snd()).booleanValue();
                    label.setText(moduleName.toSourceText());
                    if (!list.isEnabled()) {
                        label.setForeground(SystemColor.textInactiveText);
                    } else if (isUserSelected) {
                        label.setForeground(SystemColor.textText);
                        label.setFont(boldFont);
View Full Code Here

            if (codeGenerationStats != null) {
                // Check if this is a module we want to generate stats for.
                String statsModuleNameString = System.getProperty("org.openquark.cal.machine.lecc.code_generation_stats");

                if (statsModuleNameString != null &&
                    (statsModuleNameString.equals("") || statsModuleNameString.equals(moduleName.toSourceText()) || statsModuleNameString.trim().toLowerCase().equals("all"))) {
                    // Set the object used to collect code generation info.
                    javaGenerator.setCodeGenerationStatsCollector(codeGenerationStats);
                    // Inform the stats collector that we're generating stats for new module.
                    codeGenerationStats.startNewModule(moduleName);
                }
View Full Code Here

           
            // For now, return the name of the last metamodule in the program that starts with "GemCutter".
            int nModules = workspace.getNMetaModules();
            for (int i = nModules - 1; i > -1; i--) {
                ModuleName moduleName = workspace.getNthMetaModule(i).getName();
                if (moduleName.toSourceText().startsWith("GemCutter")) {
                    workingModuleName = moduleName;
                    break;
                }
            }
        }
View Full Code Here

            ModuleName moduleName = featureName.toModuleName();
           
            Map<String, String> parameters = new HashMap<String, String>();
            parameters.put(INSTANCE_CLASS_PARAMETER, identifier.getTypeClassName().getQualifiedName());
            parameters.put(INSTANCE_TYPE_PARAMETER, identifier.getTypeIdentifier());
            parameters.put(INSTANCE_MODULE_PARAMETER, moduleName.toSourceText());
           
            return new NavAddress(CLASS_INSTANCE_METHOD, null, null, parameters);
           
        } else if (type == CALFeatureName.INSTANCE_METHOD) {
           
View Full Code Here

            String methodName = featureName.toInstanceMethodName();
           
            Map<String, String> parameters = new HashMap<String, String>();
            parameters.put(INSTANCE_CLASS_PARAMETER, identifier.getTypeClassName().getQualifiedName());
            parameters.put(INSTANCE_TYPE_PARAMETER, identifier.getTypeIdentifier());
            parameters.put(INSTANCE_MODULE_PARAMETER, moduleName.toSourceText());
            parameters.put(INSTANCE_METHOD_PARAMETER, methodName);
           
            return new NavAddress(INSTANCE_METHOD_METHOD, null, null, parameters);
        }
       
View Full Code Here

           
            // add link to module
            ModuleName moduleName = featureName.toModuleName();
            MetaModule module = owner.getPerspective().getMetaModule(moduleName);
            NavAddress moduleUrl = NavAddress.getAddress(module);
            buffer.append(getLinkHtml(NavAddress.getAddress(module), moduleName.toSourceText()));
            buffer.append(separator);

            // add link to parent or vault
            if (metadata instanceof FunctionMetadata) {
                NavAddress vaultUrl = moduleUrl.withParameter(NavAddress.VAULT_PARAMETER, NavAddress.FUNCTION_VAULT_VALUE);
View Full Code Here

        getNameLabel().setText(identifier.getName());
        ModuleName minimallyQualifiedModuleNameOrNull = identifier.getMinimallyQualifiedModuleName();
        if (minimallyQualifiedModuleNameOrNull == null) {
            getModuleLabel().setText("");
        } else {
            getModuleLabel().setText(minimallyQualifiedModuleNameOrNull.toSourceText());
        }
        setToolTipText(toolTipText);
    }
   
    /**
 
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.