Online Manual



Representation of Results

Representation of Results

After the analysis was computed it's the time to use the analysis outcome - the main purpose of the analysis. Currently SourceGlider supports the three ways of representation of analysis results, each in its own view: Analysis Report, Analysis Query Tree and Metrics. The following three chapters will describe these views in details.

Selection of Java Elements

SourceGlider computes the dataflow information for the set of data elements. These elements are very similar to Java Elements in Eclipse terminology, so they are also called here the Java Elements. In simple words the Java Elements are the objects in Java programs. They can be of several types: methods, variables (fields and locals), objects (class instances and literals), types (classes and interfaces), packages and others. You can find the full list of Java Elements Types in the Reference. Each type has the special icon, for example for methods, for variables, for objects, for types, etc.

Analysis outcome is the set of relations between Java Elements, which helps to guide you through the sophisticated dataflow graph of the analyzed source program.

The main principle of SourceGlider analysis outcome representation is the set of context-sensitive Queries on Java Elements. In simple words it means that first you need to select some particular Java Element and then you will get the report on that element, where you can find the structured list of other Java Elements which are somehow related to the queried Java Element. You can select the Java Element by either of two ways:

  • Directly in Compilation Unit Editor (either Java source file editor or the class file viewer with the attached source). Simply mark the portion of source code that denotes the desired Java Element. Some Java Elements can be selected even simpler: if the Java Element represents the identifier name you can simply position the caret somewhere in the middle of that identifier to select it.
  • Select it in the Package Explorer, Outline or in some other Eclipse view. Not all items in these views correspond to Java Elements. For example you can't get the Java Element of the resource files or the closed projects.

Here are some illustrations on the selection of Java Elements:

The selection of g.drawLine(r.x, r.y, r.right(), r.y) element of type Invocation Sites ()

The selection of the flow element of type Variables ()

The selection of org.eclipse.draw2d.parts element of type Packages ()