Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.ScopedEntityNamingPolicy


                        String functionName = qualifiedFunctionName.getUnqualifiedName();
                        FunctionalAgent function = typeInfo.getFunctionOrClassMethod(functionName);
                        if (function == null) {
                            iceLogger.log(Level.INFO, "The function " + qualifiedFunctionName + " does not exist.");
                        } else {                           
                            ScopedEntityNamingPolicy scopedEntityNamingPolicy = new ScopedEntityNamingPolicy.UnqualifiedUnlessAmbiguous(typeInfo);
                           
                            iceLogger.log(Level.INFO, qualifiedFunctionName + " :: " + function.getTypeExpr().toString(true, scopedEntityNamingPolicy) + "\n");
                           
                            CALDocComment comment;
                            String kind;
View Full Code Here


                        String dataConsName = qualifiedDataConsName.getUnqualifiedName();
                        DataConstructor dataCons = typeInfo.getDataConstructor(dataConsName);
                        if (dataCons == null) {
                            iceLogger.log(Level.INFO, "The data constructor " + qualifiedDataConsName + " does not exist.");
                        } else {
                            ScopedEntityNamingPolicy scopedEntityNamingPolicy = new ScopedEntityNamingPolicy.UnqualifiedUnlessAmbiguous(typeInfo);
                           
                            iceLogger.log(Level.INFO, qualifiedDataConsName + " :: " + dataCons.getTypeExpr().toString(scopedEntityNamingPolicy) + "\n");
                           
                            CALDocComment comment = dataCons.getCALDocComment();
                            if (comment != null) {
View Full Code Here

                        ClassInstance instance = typeInfo.getVisibleClassInstance(id);
                       
                        if (instance == null) {
                            iceLogger.log(Level.INFO, "The instance " + id + " does not exist.");
                        } else {
                            ScopedEntityNamingPolicy scopedEntityNamingPolicy = new ScopedEntityNamingPolicy.UnqualifiedUnlessAmbiguous(typeInfo);
                           
                            TypeExpr instanceMethodTypeExpr = instance.getInstanceMethodType(methodName);
                           
                            iceLogger.log(Level.INFO, methodName + " :: " + instanceMethodTypeExpr.toString(scopedEntityNamingPolicy) + "\n");
                           
View Full Code Here

        if (gem instanceof FunctionalAgentGem) {
            ModuleTypeInfo currentModuleTypeInfo = tableTopExplorerOwner.getCurrentModuleTypeInfo();
            if (currentModuleTypeInfo == null) {
                return null;
            }
            ScopedEntityNamingPolicy namingPolicy = new UnqualifiedUnlessAmbiguous(currentModuleTypeInfo);
            FunctionalAgentGem functionalAgentGem = (FunctionalAgentGem) gem;
            return functionalAgentGem.getGemEntity().getAdaptedName(namingPolicy);

        } else if (gem instanceof CodeGem) {
            return ((CodeGem)gem).getUnqualifiedName();
View Full Code Here

    /**
     * @param typeExpr the expression to get the name for
     * @return the display name of the type expression
     */
    public String getTypeName(TypeExpr typeExpr) {
        ScopedEntityNamingPolicy namingPolicy = new UnqualifiedUnlessAmbiguous(getCurrentModule().getTypeInfo());
        return typeExpr.toString(namingPolicy);
    }
View Full Code Here

                // data constructor name as the preferred width.

                baseline = "()";
               
                DataConstructor[] visibleDataConstructors = getPerspective().getDataConstructorsForType(typeConsName);
                ScopedEntityNamingPolicy namingPolicy = new UnqualifiedUnlessAmbiguous(getPerspective().getWorkingModuleTypeInfo());
               
                if (visibleDataConstructors == null || visibleDataConstructors.length == 0) {

                    // Include non-visible constructors if there are no visible ones.
                   
View Full Code Here

        ValueEditorListener childListener = new ChildValueEditorListener();
        KeyAdapter editorPanelKeyListener = new EditorPanelKeyListener();
       
        boolean haveAddedPanel = false;
        FontMetrics fontMetrics = getFontMetrics(getFont().deriveFont(Font.BOLD));
        ScopedEntityNamingPolicy namingPolicy = new UnqualifiedUnlessAmbiguous(valueEditorManager.getPerspective().getWorkingModuleTypeInfo());

        // Remove components in case this is called twice.
        contentPanel.removeAll();

        // Create an editor panel for each supported data constructor.
View Full Code Here

    /**
     * @see TableTopExplorerOwner#getHTMLFormattedMetadata(Gem.PartInput)
     */
    public String getHTMLFormattedMetadata(Gem.PartInput input) {
        TableTop tableTop = gemCutter.getTableTop();
        ScopedEntityNamingPolicy namingPolicy = new ScopedEntityNamingPolicy.UnqualifiedUnlessAmbiguous(tableTop.getCurrentModuleTypeInfo());              
        return ToolTipHelpers.getPartToolTip(input, tableTop.getGemGraph(), namingPolicy, tableTopExplorer.getExplorerTree());
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public String getTypeString(final TypeExpr typeExpr) {
        final ScopedEntityNamingPolicy namingPolicy;
        final ModuleTypeInfo currentModuleTypeInfo = getCurrentModuleTypeInfo();
        if (currentModuleTypeInfo == null) {
            namingPolicy = ScopedEntityNamingPolicy.FULLY_QUALIFIED;
        } else {
            namingPolicy = new ScopedEntityNamingPolicy.UnqualifiedUnlessAmbiguous(currentModuleTypeInfo);
View Full Code Here

        TypeExpr outputType = getOutputType();

        // Do we have a code result type?
        if (outputType != null) {

            ScopedEntityNamingPolicy namingPolicy = new ScopedEntityNamingPolicy.UnqualifiedUnlessAmbiguous(
                    perspective.getWorkingModuleTypeInfo());

            if (incompatiblePartToInferredTypeMap.containsKey(codeGem.getOutputPart())) {
               
                // Doesn't match with connected output
View Full Code Here

TOP

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

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.