Chapter 5. Scripting 
JEvolve supports scripting in JMScript, our proprietary language built on top of Java. The built-in scripting facility allows you to access all information about the projects being compared. This is one way of extending the functionality of JEvolve. You may even export the analyzed information to an outside environment by writing a script.

Here is a simple script. Enter the code in an empty document in the editor and save it myscript.jms.

    main(s) {
        app = getApplication();
        ase = getEquivalence();
        defs = app.AtomicChangeDefs;
       
foreach(def in defs){
            println(def.id + ": "+def.representation);
        }
        changes = ase.AllAtomicChanges();
        println("ATOMIC CHANGES PRESENT IN ACTIVE COMPARISON: " + changes.Count);
        foreach(change in changes){
            println(change.id + ": " +change.representation);
        }
    }

The above script prints all the atomic changes known to JEvolve and all the changes in the analyzed two projects. To run the script right click in the editor view and select Run Script from the context-sensitive menu. The output appears in the Output tab at the bottom.

Fig. 5.1

Details about the various objects exposed to the scripting environment are available in the online help.
 

Index     Top    Previous

Copyright © Man Machine Systems 1997-2001.
All Rights Reserved.
We acknowledge all trademarks.