Package ptolemy.moml.filter

Examples of ptolemy.moml.filter.RemoveGraphicalClasses


            MoMLParser.addMoMLFilters(BackwardCompatibility.allFilters());

            // This is a bit of a misnomer, we remove only
            // GeneratorTableauAttribute here so that the Vergil applet has
            // the graphical classes
            RemoveGraphicalClasses removeGraphicalClasses = new RemoveGraphicalClasses();
            RemoveGraphicalClasses.clear();
            removeGraphicalClasses.put(
                    "ptolemy.copernicus.gui.GeneratorTableauAttribute", null);
            MoMLParser.addMoMLFilter(removeGraphicalClasses);

            // Parse the model.
            CompositeActor toplevel = null;
View Full Code Here


        try {
            // Handle Backward Compatibility.
            MoMLParser.addMoMLFilters(BackwardCompatibility.allFilters());

            // Filter out any graphical classes
            RemoveGraphicalClasses filter = new RemoveGraphicalClasses();

            // FIXME: Not sure why this is necessary, but it helps
            // when generating an applet for moml/demo/spectrum.xml
            filter.put("ptolemy.kernel.util.Location", null);
            MoMLParser.addMoMLFilter(filter);

            NamedObj toplevel = null;

            try {
View Full Code Here

        // causes problems at runtime because sometimes the parameters
        // are out of order, so there are dependency issues, or,
        // in the case of the applet generator, the parameters depend
        // on the value of Java system properties like ptolemy.ptII.directory
        // which is not accessible because of security concerns.
        RemoveGraphicalClasses removeGraphicalClasses = new RemoveGraphicalClasses();

        // FIXME: Not sure why this is necessary, but it helps
        // when generating an applet for moml/demo/spectrum.xml
        // However, if we remove Location, then shallow CG of Wireless fails.
        //removeGraphicalClasses.put("ptolemy.kernel.util.Location", null);
        // shallow/test/IIRGUI.xml has a GeneratorTableauAttribute in it.
        removeGraphicalClasses.put(
                "ptolemy.copernicus.gui.GeneratorTableauAttribute", null);

        // FIXME: If this is Deep codegen, then don't use Test, use CGTest
        // because Test has a SharedParameter
        //         removeGraphicalClasses.put("ptolemy.actor.lib.Test",
View Full Code Here

        // though we will lose any other filters.
        MoMLParser.setMoMLFilters(null);

        MoMLParser.setMoMLFilters(BackwardCompatibility.allFilters());

        RemoveGraphicalClasses removeNonAppletClasses = new RemoveGraphicalClasses();
        // If filterGraphicalClasses is true, then we filter out
        // graphical classes so that we do not require diva.jar.  If
        // it is false, then we clear the filter.  In both cases we
        // add some classes that are always filtered.
        if (!filterGraphicalClasses) {
            RemoveGraphicalClasses.clear();
        }

        // Exclude the code generator
        removeNonAppletClasses.put(
                "ptolemy.codegen.kernel.StaticSchedulingCodeGenerator", null);
        removeNonAppletClasses
                .put("ptolemy.vergil.kernel.attributes.DocumentationAttribute",
                        null);
        MoMLParser.addMoMLFilter(removeNonAppletClasses);

        URL docBase = getDocumentBase();
View Full Code Here

        // Filter out any graphical classes.
        // We should filter out graphical classes or the
        // treeShakeWithoutCodegen rule will fail when we run it on
        // actor/lib/test/auto/ComplexDivide.
        MoMLParser.addMoMLFilter(new RemoveGraphicalClasses());

        //parser.setErrorHandler(new StreamErrorHandler());
        // We use parse(URL, URL) here instead of parseFile(String)
        // because parseFile() works best on relative pathnames and
        // has problems finding resources like files specified in
View Full Code Here

            CodeGenerator codeGenerator = null;

            // See MoMLSimpleApplication for similar code
            MoMLParser parser = new MoMLParser();
            MoMLParser.setMoMLFilters(BackwardCompatibility.allFilters());
            MoMLParser.addMoMLFilter(new RemoveGraphicalClasses());

            // Reset the list each time we parse a parameter set.
            // Otherwise two calls to this method will share params!
            _parameterNames = new LinkedList<String>();
            _parameterValues = new LinkedList<String>();
View Full Code Here

        // so as to avoid adding filters every time we run an auto test.
        // We set the list of MoMLFilters to handle Backward Compatibility.
        MoMLParser.setMoMLFilters(BackwardCompatibility.allFilters());

        // Filter out any graphical classes.
        MoMLParser.addMoMLFilter(new RemoveGraphicalClasses());

        // If there is a MoML error, then throw the exception as opposed
        // to skipping the error.  If we call StreamErrorHandler instead,
        // then the nightly build may fail to report MoML parse errors
        // as failed tests
View Full Code Here

            // We use RemoveGraphicalClasses here to remove these
            // classes.
            // FIXME: this could cause problem with RemoveGraphicalClasses
            // elsewhere, but usually we run w/o _classesToRemove
            RemoveGraphicalClasses filter = new RemoveGraphicalClasses();
            filter.clear();
            // _classesToRemove is an array of Strings where each element
            // names a class to be added to the MoMLFilter for removal.
            for (int i = 0; i < classesToRemoveToken.length(); i++) {
                String classNameToRemove = ((StringToken) classesToRemoveToken
                    .getElement(i)).stringValue();
                filter.put(classNameToRemove, null);
            }
            _parser.addMoMLFilter(filter);
        }

        for (int i = 0; i < args.length; i++) {
View Full Code Here

            StringBuffer analysis = new StringBuffer();

            MoMLParser parser = new MoMLParser();
            MoMLParser.setMoMLFilters(BackwardCompatibility.allFilters());

            RemoveGraphicalClasses removeGraphicalClasses = new RemoveGraphicalClasses();

            // Remove StaticSchedulingCodeGenerator from Butterfly because during the
            // nightly build the codegenerator is not yet built when the tests in actor.gui
            // are run.
            removeGraphicalClasses.put(
                    "ptolemy.codegen.kernel.StaticSchedulingCodeGenerator",
                    null);

            // Filter out any graphical classes.
            MoMLParser.addMoMLFilter(removeGraphicalClasses);
View Full Code Here

            // We set the list of MoMLFilters to handle Backward Compatibility.
            MoMLParser.setMoMLFilters(BackwardCompatibility.allFilters());

            // Filter out any graphical classes.
            MoMLParser.addMoMLFilter(new RemoveGraphicalClasses());

            // If there is a MoML error, then throw the exception as opposed
            // to skipping the error.  If we call StreamErrorHandler instead,
            // then the nightly build may fail to report MoML parse errors
            // as failed tests
View Full Code Here

TOP

Related Classes of ptolemy.moml.filter.RemoveGraphicalClasses

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.