Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.ClassInstance$InstanceStyle


        buffer.append("<h2>" + getAnchorHtml(INSTANCE_METHODS_ANCHOR, NavigatorMessages.getString("NAV_InstanceMethods_Header")) + "</h2>");
       
        buffer.append("<tt>");
       
        ModuleTypeInfo featureModuleTypeInfo = owner.getPerspective().getMetaModule(metadata.getFeatureName().toModuleName()).getTypeInfo();
        ClassInstance instance = featureModuleTypeInfo.getClassInstance(identifier);
       
        int count = instance.getNInstanceMethods();
        for (int i = 0; i < count; i++) {
            ClassMethod method = typeClass.getNthClassMethod(i);
            String methodName = method.getName().getUnqualifiedName();
           
            NavAddress methodUrl = NavAddress.getAddress(CALFeatureName.getInstanceMethodFeatureName(identifier, metadata.getFeatureName().toModuleName(), methodName));
            buffer.append("<b>" + getLinkHtml(methodUrl, NavAddressHelper.getDisplayText(owner, methodUrl, ScopedEntityNamingPolicy.UNQUALIFIED) + "</b> :: "));
            buffer.append("<i>" + getTypeStringHtml(owner, instance.getInstanceMethodType(i), namingPolicy) + "</i>");
            buffer.append("<br>");
        }
       
        // remove trailing <br>
        buffer.delete(buffer.length() - 4, buffer.length());
View Full Code Here


        } else if (method == NavAddress.INSTANCE_METHOD_METHOD) {
           
            CALFeatureName featureName = address.toFeatureName();
            String methodName = featureName.toInstanceMethodName();

            ClassInstance instance = owner.getPerspective().getMetaModule(featureName.toModuleName()).getTypeInfo().getClassInstance(featureName.toInstanceIdentifier());
           
            TypeExpr[] typePieces = instance.getInstanceMethodType(methodName).getTypePieces();
            String[] typeStrings = new String[typePieces.length];           
            PolymorphicVarContext polymorphicVarContext = PolymorphicVarContext.make();
           
            for (int i = 0; i < typePieces.length; i++) {
                typeStrings[i] = typePieces[i].toString(polymorphicVarContext, namingPolicy);
View Full Code Here

            return collector != null ? collector.getUnqualifiedName() : "Unknown Collector";
           
        } else if (method == NavAddress.CLASS_INSTANCE_METHOD) {

            ClassInstance instance = owner.getPerspective().getWorkspace().getClassInstance(address.toFeatureName());

            if (metadata.getDisplayName() != null) {
                return metadata.getDisplayName();
           
            } else if (instance == null) {
                return address.toString();
           
            } else if (namingPolicy != null) {
                return instance.getNameWithContext(namingPolicy);
           
            } else {
                return instance.getNameWithContext();
            }
           
        } else if (method == NavAddress.INSTANCE_METHOD_METHOD) {

            String methodName = address.toFeatureName().toInstanceMethodName();
View Full Code Here

            ModuleName typeClassModuleName = featureName.toInstanceIdentifier().getTypeClassName().getModuleName();
            String methodName = featureName.toInstanceMethodName();
           
            CALWorkspace workspace = owner.getPerspective().getWorkspace();
            GemEntity entity = workspace.getGemEntity(QualifiedName.make(typeClassModuleName, methodName));
            ClassInstance instance = workspace.getClassInstance(CALFeatureName.getClassInstanceFeatureName(featureName.toInstanceIdentifier(), featureName.toModuleName()));
           
            adjustArgumentNames(entity, instance.getMethodCALDocComment(methodName), arguments);
           
        } else {
            GemEntity entity = owner.getPerspective().getWorkspace().getGemEntity(address.toFeatureName().toQualifiedName());
            adjustArgumentNames(entity, arguments);
        }
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.ClassInstance$InstanceStyle

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.