|
8 | 8 | title: "ADR 11: Decide Module Structure"
|
9 | 9 | ---
|
10 | 10 |
|
| 11 | +Modules are hard to find because they are hidden in the Tools Module. We need to make them more visible and provide a better structure for them. |
| 12 | +At the moment the term "parser" is used as a general term and a specific term at the same time. E.g.: We have this message in our CCSH: "No usable parser was found for the input file path!" - this is misleading because we are not looking for specific parsers, but we are looking for parsers, exporters, tools,... |
| 13 | +We propose to change the general term "parser" to "analyser" and keep the term parser only for the specific parsers. |
| 14 | + |
| 15 | +We have 5 different analyser types: |
| 16 | +- export |
| 17 | +- filter |
| 18 | +- import |
| 19 | +- parser |
| 20 | +- tool |
| 21 | + |
| 22 | +All of those 5 analyser types implements the "Callable"-Interface and the "InteractiveParser"-Interface. |
| 23 | +Not all analysers that have a method like: "getAttributeDescriptorMaps" implement the "AttributeGenerator"-Interface - this can lead to confusion and potential errors. |
| 24 | + |
| 25 | +The Tool Module contains more than just tools, it also contains general super types like ccsh, inquirer or interactive parser. We need to separate the tools from the general super types. |
11 | 26 |
|
12 | 27 | # Status
|
13 | 28 |
|
14 | 29 | proposed
|
15 | 30 |
|
16 | 31 | # Decision
|
17 | 32 |
|
| 33 | +There will be a new Module: "Analysers". This module contains the 5 different analyser type modules. For every of those 5 analyser types, there is an interface. |
| 34 | +The "InteractiveParser" will be renamed to "AnalyserInterface". This interface implements the "Callable"-Interface. |
| 35 | +The "PipeableParser" will be renamed to "PipeableAnalyserInterface". (If all analysers should be pipable, we can remove this interface and implement the "PipeableInterface" in the "AnalyserInterface"). |
| 36 | + |
| 37 | +The Inquirer module will be placed in the new "AnalyserInterface" module (former "InteractiveParser" module), because all analysers that implement the "InteractiveParser"-Interface also need this "Inquirer"-Module. |
| 38 | + |
| 39 | +The "ccsh"-module will be moved one level up to the analysis folder. |
| 40 | +All mentions of "parser" in the ccsh are renamed to "analyser". |
| 41 | + |
| 42 | +All ParserDialogs will be renamed to Dialog. |
| 43 | + |
| 44 | +All analysers that have a method like: "getAttributeDescriptorMaps" implement the "AttributeGenerator"-Interface. |
| 45 | + |
| 46 | +The analyser modules will be renamed to: |
| 47 | +- export -> exporters |
| 48 | +- filter -> filters |
| 49 | +- import -> importers |
| 50 | +- parser -> parsers |
| 51 | + |
| 52 | +The analyser module contains those modules: |
| 53 | +- AnalyserInterface |
| 54 | +- PipeableAnalyserInterface |
| 55 | +- exporters |
| 56 | +- - ExporterInterface |
| 57 | +- - CSVExporter |
| 58 | +- filters |
| 59 | +- - FilterInterface |
| 60 | +- - EdgeFilter |
| 61 | +- - MergeFilter |
| 62 | +- - StructureFilter |
| 63 | +- importers |
| 64 | +- - ImporterInterface |
| 65 | +- - CSVImporter |
| 66 | +- - CodeMaatImporter |
| 67 | +- - MetricGardenerImporter |
| 68 | +- - SonarImporter |
| 69 | +- - SourceMonitorImporter |
| 70 | +- - TokeiImporter |
| 71 | +- parsers |
| 72 | +- - ParserInterface |
| 73 | +- - GitLogParser |
| 74 | +- - RawTextParser |
| 75 | +- - SourceCodeParser |
| 76 | +- - SVNLogParser |
| 77 | +- tools |
| 78 | +- - ToolInterface |
| 79 | +- - ValidationTool |
| 80 | +- - InspectorTool |
18 | 81 |
|
19 | 82 | # Consequences
|
| 83 | +A lot of renaming and restructuring. However, some output messages to the user will be changed slightly, to reflect the new terminology. |
| 84 | +The structure will be clearer for the users and the developers. |
0 commit comments