Best viewed in the Internet Explorer.
Contact us at info@sourceglider.com
for feedback about MetriX.
Online Manual
Modifying the Analysis
Modifying the Analysis
The key concept of SourceGlider is that first you collect all the analysis information and then you use the
analysis outcome. However, if you modify source files in the current Working Set, the whole analysis becomes out-of-date.
It happens because the dataflow information from the modified Compilation Units can propagate through the
whole Working Set, and in general, the analysis information will be inconsistent. You need to perform an incremental analysis
recomputation (update) to make the analysis up-to-date.
However in 90% cases modifications are local and don't affect untouched Compilation Units. In this case simply ignoring
source changes is the best choice. You will still have the correct analysis outcome for untouched Compilation Units, and the
analysis outcome for modified units will be mostly consistent.
Note: Most of Java Elements have source coordinates. Source
coordinates are needed for projection of Java Elements to the source code. Modifying of the source code implies the changing of
the source coordinates of Java Elements projected to that source code. Therefore if you ignore the source changes and don't perform
the recomputation of the analysis, the Java Elements that are related to the modified source code will have wrong source coordinates.
When you reveal such Java Elements in the source, you may get senseless results. Sometimes you can't pick such Java Elements from the
source at their actual locations.
You can update the analysis by either of three ways:
Press button in Analysis Summary View
Select Source Analysis > Update Analysis in Eclipse menu
Follow the corresponding link in Analysis Summary View - the estimated time of reanalysis is shown near the link
You can ignore the source changes by following the corresponding link in Analysis Summary View. If the view is closed,
you need to open it by selecting Window > Show View > Other... and choosing Source Analysis > Analysis Report
in the list.
Note: If you choose to ignore source changes once, all subsequent source changes will be ignored automatically
without asking you to do so until you decide to update the analysis or start the new analysis.
Another way to update analysis/ignore the source changes is even simpler: just select some Java Element and press
Ctrl+`. You will be asked whether to update or ignore:
If you press Update, analysis will be updated and the report on selected Java Element will be shown.
If you press Ignore, source changes will be ignored and the report on selected Java Element will be shown.
If you press Cancel, nothing will happen.
It is possible to change the Working Set during the phase Analyzed.
To add some Compilation Units to the Working Set select them in Package Explorer and choose Source Analysis > Add To
Analysis in the Eclipse menu or click the right mouse button and select Source Analysis >
Add To Analysis in the context menu.
To remove Compilation Units from the Working Set select them in Package Explorer and choose Source Analysis > Remove From
Analysis in the Eclipse menu or click the right mouse button and select Source Analysis >
Remove From Analysis in the context menu.
You can add/remove either single Compilation Units or the folders. In the latter case all the recursive Compilation Unit children
will be added/removed. You can select arbitrary number of Compilation Units to add/remove. You can add the new Compilation Units from
any project in the Eclipse workspace.
When the new Compilation Units are added to the current analysis or when some units are removed from it, the dataflow information
will no longer be consistent, and analysis will be out-of-date (see above). You need to update the analysis to get the new files
analyzed or ignore the changes to leave them non-analyzed.
You can add Compilation Units even when the phase Not Analyzed is active. In this case the
Composite Analysis Wizard will be launched and the selected Compilation Units
will compose the new Working Set. Press Finish to get the units analyzed.
Compilation Units that belong to the current Working Set are marked by special icons in Package Explorer and some other Eclipse
views (see the illustration above). There are two types of markers:
Units marked with have been analyzed and are up-to-date.
Units marked with have been analyzed but they are out-of-date because
they were modified since last analysis or they were added to the analysis and haven't yet been analyzed.
All the parent folders that contain marked units are also marked. If there is a unit marked with
, all its parent folders are also marked with
and the whole analysis is considered out-of-date.
Analysis Summary View is an essential part of the analysis. During the phaseAnalyzed this view is always active. If you close this view, analysis will terminate.
The view displays all the major parameters of the current analysis such as:
The date and time when the analysis was computed
Packages - the short representation of Working Set for this
analysis (only root packages are displayed)
Size & Time - information about the size of Working Set, memory that is required to load this analysis and
time that was spent during computing of this analysis
Modified units - the list of Compilation Units that were modified since this analysis was computed
If the button is enabled, the current analysis is unsaved or has been changed since the last
save. Press this button or select Source analysis > Save Analysis to save
the current analysis.
If the button is enabled, the current analysis is out-of-date (see above). Press this button
or select Source analysis > Update Analysis to update the current analysis.
Press the button or select Source analysis > Kill Analysis to terminate the current analysis
and release the memory resources that were allocated by current analysis.