Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.PolymorphicVarContext


        }

        if (metadata instanceof FunctionalAgentMetadata) {

            FunctionalAgent envEntity = (FunctionalAgent)scopedEntity;
            PolymorphicVarContext polymorphicVarContext = PolymorphicVarContext.make();
            TypeExpr[] typePieces = envEntity.getTypeExpr().getTypePieces();

            CALDocComment caldoc = envEntity.getCALDocComment();

            // Add the result type.           
View Full Code Here


     * @see org.openquark.gems.client.valueentry.ValueEditor#refreshDisplay()
     */
    @Override
    public void refreshDisplay() {
       
        PolymorphicVarContext polymorphicVarContext = PolymorphicVarContext.make();
       
        for (final DataConstructorEditorPanel childEditor : editorPanelList) {
            childEditor.refreshDisplay(polymorphicVarContext);
        }
       
View Full Code Here

            method == NavAddress.DATA_CONSTRUCTOR_METHOD) {

            GemEntity entity = owner.getPerspective().getWorkspace().getGemEntity(address.toFeatureName().toQualifiedName());
            TypeExpr[] typePieces = entity.getTypeExpr().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);
            }
           
            return typeStrings;
           
        } 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);
            }
           
            return typeStrings;
               
        } else if (method == NavAddress.COLLECTOR_METHOD) {
           
            CollectorGem collector = owner.getCollector(address.getBase());
           
            if (collector == null || !collector.getCollectingPart().isConnected()) {
                return new String[0];
            }
           
            List<PartInput> inputs = collector.getTargetInputs();
            String[] typeStrings = new String[inputs.size() + 1];
            PolymorphicVarContext polymorphicVarContext = PolymorphicVarContext.make();
           
            for (int i = 0, length = typeStrings.length - 1; i < length; i++) {
                typeStrings[i] = inputs.get(i).getType().toString(polymorphicVarContext, namingPolicy);
            }
           
View Full Code Here

TOP

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

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.