Envision
A visual programming IDE for object-oriented languages
Try Envision

Once you have successfully compiled Envision and are able to run it you can try launching one of the projects and experience Envision for yourself.

  • Using Qt Creator: Choose a run configuration from the development kit and start it.
  • Using Eclipse: Select a project you would like to test and launch it. The default launch configuration for each project will run Envision and will initiate the built-in tests for it.
  • Command line: To test a particular plug-in on the command line, you need to run Envision and supply a plug-in to test via the –test argument:
    Envision -graphicssystem raster --test project_name 
    where project_name is the lowercase name of one of the projects (e.g. controlflowvisualization). Make sure to run Envision from within the DebugBuild directory.

Running Envision tests (demos)

Projects such as OOVisualization, OOInteraction, ControlFlowVisualization, and CustomMethodCall visualize some existing code and are interesting to explore.

Running the tests for the OOVisualization and OOInteraction projects will display some code in a few methods. You might want to explore the visualizations and try interacting with the various elements.

Launching the ControlFlowVisualization project displays two methods with some non-trivial control flow graph. Selecting a method and pressing F2 (several times) will switch the visualizations between the standard one and the control flow alternative.

Launching the CustomMethodCall project shows a very simple class that defines a few methods. On the right the methods are called and one can see that each method call is visualized in a non-standard way that is dependent on the called method.

Launching the ContractsLibrary project shows how libraries can introduce specialized visualizations to code fragments.

Launching the Comments project shows various types of rich comments supported by Envision. This includes diagrams, markdown, and html. To edit a diagram select it and press CTRL+E. To edit the markdown that corresponds to a comment, select a non-diagram object and press CTRL+E.

In all cases it is possible to zoom and pan by holding CTRL and using the mouse wheel and buttons. Selecting an object and pressing ESC will show the command prompt, where you can type commands for the selected object.

Importing and visualizing a Java project in Envision

This is a two step process:

  1. Convert a Java program into Envision's storage format. To do this you need to use the JavaImportTool Java project. To compile it you must manually download some of its dependencies. See the DEPENDENCIES.txt file in the project directory. As some of the dependencies are found in a typical Eclipse distribution, it is required to have an Eclipse installation. To compile the project either use
    gradle build
    or import the project into Eclipse (
    gradle eclipse
    ) and compile the project in Eclipse. You can run it on the command line. It takes three arguments:
    • The name of the project. It is recommended that this is just one word, without spaces.
    • The directory that contains the Java source code of the project you want to import. Recursively, all .java files in this directory will be explored and converted to an Envision format.
    • Envision's projects directory. This should be a directory called projects in the same directory where Envision is run from (typically DebugBuild). You might need to manually create the projects directory.
    • Here is an example run of the tool:
      java JavaImportTool myTestProject /home/user/myTestProject/javaSrc/ /home/user/git/Envision/DebugBuild/projects/
  2. Open the project in Envision. After successfully converting the project to Envision's storage format, there should be a corresponding directory inside the projects directory. In the example above, this is:
    /home/user/git/Envision/DebugBuild/projects/myTestProject
    To load a project, start Envision without specifying any tests, and use Envision's command prompt to invoke the load command. The command takes only one argument - the name of the project that you want to load. Note that Envision supports command abbreviation and you don't have to type the full command and arguments. For the example above these different versions of the command should work:
    load myTestProject
    lo my
    
    The load command will load and visualize the entire project. Depending on the size of the project this could be instant or take several minutes (e.g. if you're trying to visualize a million lines of code). If you want to experiment with projects that have more than a few tens of classes, you must manually compile and use the latest version of Qt as explained here, otherwise the interface will be unusably slow.