User Tools

Site Tools


This is an old revision of the document!

The Ptidej UI Viewer project provide interfaces and classes used by all the viewers. In particular, it provides the IRepresentation interface that is the “model” (as in the Model-View-Controller) of any viewer. This interface allows managing PADL models, Ptidej UI models, original sources, occurrences. It is essential that any viewer uses this interface for its model, as it allows extensions to the viewers to work seamlessly regardless of the viewer implementations.

This project also provides the IExtension interface that any extension to the viewers must implement. Differently from the IAnalysis interfaces defined in the PADL and Ptidej UI projects, this interfaces requires an extension to implement a invoke(IRepresentation) method. Therefore, it is possible for an extension to access the source paths from which a PADL model has been built, found occurrences, and so on.

There are implementations of different viewers. The most usable currently is ptidej.viewer.ProjectViewer in project Ptidej UI Viewer Standalone Swing. Here are some steps to use it:

  1. Starting-up the project viewer
  2. Using the File menu to create a new model from some C++ source files
  3. Giving a name to the model
  4. Selecting a directory containing C++ source files
  5. After reverse-engineering the C++ source code files, displaying the model
  6. Selecting the Tools tab and showing the list of micro-architectures similar to some motifs (either from design patterns, design anti-patterns, code smells, or micro-patterns)
  7. At first, the list is empty
  8. But selecting the Code Smells tab and the AbstractClass code smell reveals some potential problems
  9. These problem can be investigated by selecting the displayed occurrence in the list or in the model view
ptidej_ui_viewer.1371102507.txt.gz · Last modified: 2018/03/04 02:53 (external edit)