Package org.openquark.gems.client

Examples of org.openquark.gems.client.CollectorGem$CollectingPart


                return saveMetadata(owner, parentAddress, parentMetadata);
            }
           
        } else if (method == NavAddress.COLLECTOR_METHOD) {
           
            CollectorGem collector = owner.getCollector(address.getBase());
           
            if (collector == null) {
                return false;
            }
               
            collector.setDesignMetadata((FunctionMetadata) metadata);
               
            // If a collector is not connected, it means it has no arguments.
            if (!collector.getCollectingPart().isConnected()) {
                return true;
            }
               
            // Set the argument metadata for the PartInputs.
            List<PartInput> inputs = collector.getTargetInputs();
            ArgumentMetadata[] argMetadata = ((FunctionMetadata) metadata).getArguments();
           
            for (int i = 0; i < argMetadata.length; i++) {
                inputs.get(i).setDesignMetadata(argMetadata[i]);
            }
View Full Code Here


           
            return isMetadataValid(entity, (InstanceMethodMetadata) metadata);
           
        } else if (method == NavAddress.COLLECTOR_METHOD) {
           
            CollectorGem collector = owner.getCollector(address.getBase());
           
            if (collector == null) {
                return false;
            }
           
View Full Code Here

           
            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);
            }
           
            typeStrings[typeStrings.length - 1] = collector.getCollectingPart().getType().toString(polymorphicVarContext, namingPolicy);

            return typeStrings;
        }
       
        return new String[0];
View Full Code Here

        } else if (method == NavAddress.COLLECTOR_METHOD) {
           
            // Special case collectors since the CAL name of the metadata always
            // returns the default collector name.
           
            CollectorGem collector = owner.getCollector(address.getBase());
           
            if (metadata.getDisplayName() != null) {
                return metadata.getDisplayName();
            }

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

            ClassInstance instance = owner.getPerspective().getWorkspace().getClassInstance(address.toFeatureName());
View Full Code Here

     * @param arguments the argument metadata objects to adjust
     */
    public static void adjustArgumentNames(NavFrameOwner owner, NavAddress address, ArgumentMetadata[] arguments) {
       
        if (address.getMethod() == NavAddress.COLLECTOR_METHOD) {
            CollectorGem collector = owner.getCollector(address.getBase());
            adjustArgumentNames(collector, arguments);
           
        } else if (address.getMethod() == NavAddress.INSTANCE_METHOD_METHOD) {
            CALFeatureName featureName = address.toFeatureName();
            ModuleName typeClassModuleName = featureName.toInstanceIdentifier().getTypeClassName().getModuleName();
View Full Code Here

TOP

Related Classes of org.openquark.gems.client.CollectorGem$CollectingPart

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.