From 5879b3f7626bea5ea1c0952abe00781ad8e637e4 Mon Sep 17 00:00:00 2001 From: Soufyane Labsari <75275113+LABSARI@users.noreply.github.com> Date: Fri, 26 May 2023 12:06:10 +0200 Subject: [PATCH] Fix #747 Add a test that checks if browsers have the accepted entities information. Add this information in some browsers. --- src/MooseIDE-ButterflyMap/MiButterflyMapBrowser.class.st | 3 ++- src/MooseIDE-CoUsageMap/MiCoUsageMapBrowser.class.st | 3 ++- src/MooseIDE-Core/MiBusLogBrowser.class.st | 3 +++ src/MooseIDE-Core/MiLogsBrowser.class.st | 3 +++ src/MooseIDE-CriticBrowser/MiCriticBrowser.class.st | 2 +- src/MooseIDE-Dependency/MiArchitecturalMapBrowser.class.st | 1 + src/MooseIDE-Dependency/MiDMBrowser.class.st | 1 + src/MooseIDE-Dependency/MiDependencyBrowser.class.st | 2 +- src/MooseIDE-Dependency/MiTreeBrowser.class.st | 2 +- .../MiTreeMapVisualisationBrowser.class.st | 2 +- .../MiTreeVisualisationBrowser.class.st | 2 +- src/MooseIDE-Duplication/MiDuplicationBrowser.class.st | 4 +++- src/MooseIDE-Export/MiExportBrowser.class.st | 2 +- src/MooseIDE-Export/MiReportBrowser.class.st | 2 +- src/MooseIDE-Famix/MiFilesBrowser.class.st | 2 +- src/MooseIDE-Famix/MiSourceTextBrowser.class.st | 2 +- src/MooseIDE-Famix/MiUMLBrowser.class.st | 2 +- src/MooseIDE-Meta/MiFameBrowser.class.st | 2 +- src/MooseIDE-Meta/MiModelRootBrowser.class.st | 2 +- src/MooseIDE-Meta/MiMooseModelBrowser.class.st | 2 +- src/MooseIDE-Meta/MiPropertyBrowser.class.st | 2 +- src/MooseIDE-NewTools/MiInspectorBrowser.class.st | 2 ++ src/MooseIDE-QueriesBrowser/MiQueriesBrowser.class.st | 2 ++ src/MooseIDE-Tagging/MiTagBrowser.class.st | 4 +++- src/MooseIDE-Tests/MiAbstractBrowserTest.class.st | 7 +++++++ .../MiSystemComplexityBrowser.class.st | 2 +- 26 files changed, 44 insertions(+), 19 deletions(-) diff --git a/src/MooseIDE-ButterflyMap/MiButterflyMapBrowser.class.st b/src/MooseIDE-ButterflyMap/MiButterflyMapBrowser.class.st index 3eead34f7..b0396273a 100644 --- a/src/MooseIDE-ButterflyMap/MiButterflyMapBrowser.class.st +++ b/src/MooseIDE-ButterflyMap/MiButterflyMapBrowser.class.st @@ -1,6 +1,7 @@ " I am a Butterfly map. I can show incoming and outgoing dependencies from a central entity. It allows to navigate through several level of dependencies. -I accept a moose entity that is the central entity. +Accepted entities: a moose entity that is the central entity. + By default entities at left are all clients of the central entity, right ones are providers of the central entity. You can change these rules and custom the semantics of your butterfly map by playing with its settings. Controls: diff --git a/src/MooseIDE-CoUsageMap/MiCoUsageMapBrowser.class.st b/src/MooseIDE-CoUsageMap/MiCoUsageMapBrowser.class.st index 172579980..97d7b7570 100644 --- a/src/MooseIDE-CoUsageMap/MiCoUsageMapBrowser.class.st +++ b/src/MooseIDE-CoUsageMap/MiCoUsageMapBrowser.class.st @@ -1,9 +1,10 @@ " This browser shows dependencies between ""container entities"" (e.g. methods) and ""used entities"" (e.g. attributes) and it allows to mark entities with tags. -Use this browser with a moose collection entity. Use settings to configure it. In order to navigate across the visualization. +Accepted entities: a MooseGroup. + Controls: * Mouse over to highlight common inner boxes diff --git a/src/MooseIDE-Core/MiBusLogBrowser.class.st b/src/MooseIDE-Core/MiBusLogBrowser.class.st index c2b763c4c..6075d4969 100644 --- a/src/MooseIDE-Core/MiBusLogBrowser.class.st +++ b/src/MooseIDE-Core/MiBusLogBrowser.class.st @@ -1,3 +1,6 @@ +" +Accepted entities: Does not apply. +" Class { #name : #MiBusLogBrowser, #superclass : #MiAbstractBrowser, diff --git a/src/MooseIDE-Core/MiLogsBrowser.class.st b/src/MooseIDE-Core/MiLogsBrowser.class.st index a71b20aa3..0ba17e190 100644 --- a/src/MooseIDE-Core/MiLogsBrowser.class.st +++ b/src/MooseIDE-Core/MiLogsBrowser.class.st @@ -1,3 +1,6 @@ +" +Accepted entities: Does not apply. +" Class { #name : #MiLogsBrowser, #superclass : #MiAbstractBrowser, diff --git a/src/MooseIDE-CriticBrowser/MiCriticBrowser.class.st b/src/MooseIDE-CriticBrowser/MiCriticBrowser.class.st index f4009d38e..923809930 100644 --- a/src/MooseIDE-CriticBrowser/MiCriticBrowser.class.st +++ b/src/MooseIDE-CriticBrowser/MiCriticBrowser.class.st @@ -2,7 +2,7 @@ I am a MiBrowser used to create rules to apply on the entities of a model. If the entities return true when they are interrogated by the rules (represented through a boolean query), then a violation is created, linking the violating entity and the violated rule. Allows to export and import the created rules. -- Follow: Accepts MooseObjects +- Accepted entities: a MooseObject - Highlight: None diff --git a/src/MooseIDE-Dependency/MiArchitecturalMapBrowser.class.st b/src/MooseIDE-Dependency/MiArchitecturalMapBrowser.class.st index 1fab6090d..1405142f7 100644 --- a/src/MooseIDE-Dependency/MiArchitecturalMapBrowser.class.st +++ b/src/MooseIDE-Dependency/MiArchitecturalMapBrowser.class.st @@ -1,5 +1,6 @@ " I am a browser that displays an architectural map. +Accepted entities: a MooseObject. Controls: diff --git a/src/MooseIDE-Dependency/MiDMBrowser.class.st b/src/MooseIDE-Dependency/MiDMBrowser.class.st index e9185b111..3642cfdd9 100644 --- a/src/MooseIDE-Dependency/MiDMBrowser.class.st +++ b/src/MooseIDE-Dependency/MiDMBrowser.class.st @@ -1,5 +1,6 @@ " I am a browser that displays a distribution map. +Accepted entities: any MooseEntity. Controls: diff --git a/src/MooseIDE-Dependency/MiDependencyBrowser.class.st b/src/MooseIDE-Dependency/MiDependencyBrowser.class.st index 1f23b7f75..e3802b7de 100644 --- a/src/MooseIDE-Dependency/MiDependencyBrowser.class.st +++ b/src/MooseIDE-Dependency/MiDependencyBrowser.class.st @@ -1,7 +1,7 @@ " Shows dependencies between entities (using #queryIncomingDependencies and #queryOutgoingDependencies). -- Follow: Accepts a MooseGroup. +- Accepted entities: a MooseGroup. - Highlight: Entites if present. - Propagate: The selected entity if there is one. diff --git a/src/MooseIDE-Dependency/MiTreeBrowser.class.st b/src/MooseIDE-Dependency/MiTreeBrowser.class.st index 9b5b0ff45..38ca5364d 100644 --- a/src/MooseIDE-Dependency/MiTreeBrowser.class.st +++ b/src/MooseIDE-Dependency/MiTreeBrowser.class.st @@ -1,7 +1,7 @@ " Shows the containment tree (direct relations for now) between the entities. -- Follow: Accepts a MooseEntity using TEntityMetaLevelDependency. +- Accepted entities: a MooseEntity using TEntityMetaLevelDependency. - Highlight: Entities if present. - Propagate: " diff --git a/src/MooseIDE-Dependency/MiTreeMapVisualisationBrowser.class.st b/src/MooseIDE-Dependency/MiTreeMapVisualisationBrowser.class.st index 23143dfe4..cb8fda4b8 100644 --- a/src/MooseIDE-Dependency/MiTreeMapVisualisationBrowser.class.st +++ b/src/MooseIDE-Dependency/MiTreeMapVisualisationBrowser.class.st @@ -2,7 +2,7 @@ Shows the containment (direct relations for now) between entities. Dynamic presentation: clicking on an entity shows the entities it contains. -- Follow: Receives MooseObjects. +- Accepted entities: a MooseObject. - Highlight: Entities if present. - Propagate: . diff --git a/src/MooseIDE-Dependency/MiTreeVisualisationBrowser.class.st b/src/MooseIDE-Dependency/MiTreeVisualisationBrowser.class.st index 0736e467b..c1b0bfca9 100644 --- a/src/MooseIDE-Dependency/MiTreeVisualisationBrowser.class.st +++ b/src/MooseIDE-Dependency/MiTreeVisualisationBrowser.class.st @@ -1,7 +1,7 @@ " Shows the containment tree (direct relations for now) between entities, as a roassal visualization. -- Follow: Receives a MooseGroup. +- Accepted entities: a MooseGroup. - Highlight: Entities if present. - Propagate: The selected entity if there is one. diff --git a/src/MooseIDE-Duplication/MiDuplicationBrowser.class.st b/src/MooseIDE-Duplication/MiDuplicationBrowser.class.st index d7a6fcdce..6d644098e 100644 --- a/src/MooseIDE-Duplication/MiDuplicationBrowser.class.st +++ b/src/MooseIDE-Duplication/MiDuplicationBrowser.class.st @@ -1,5 +1,7 @@ " -A MooseIDE browser to present code clones +A MooseIDE browser to present code clones. + +Accepted entities: A collection of entities with a source anchor. " Class { #name : #MiDuplicationBrowser, diff --git a/src/MooseIDE-Export/MiExportBrowser.class.st b/src/MooseIDE-Export/MiExportBrowser.class.st index 6793e3483..5f8f3bd87 100644 --- a/src/MooseIDE-Export/MiExportBrowser.class.st +++ b/src/MooseIDE-Export/MiExportBrowser.class.st @@ -2,7 +2,7 @@ Prepares the export of entities as CSV file. Allows the addition of a comment for each entity. -- Follow: Accepts MooseObjects +- Accepted entities: a MooseObject - Highlight: TODO diff --git a/src/MooseIDE-Export/MiReportBrowser.class.st b/src/MooseIDE-Export/MiReportBrowser.class.st index 703f20f3f..af8e2b95f 100644 --- a/src/MooseIDE-Export/MiReportBrowser.class.st +++ b/src/MooseIDE-Export/MiReportBrowser.class.st @@ -1,6 +1,6 @@ " I am a moose notebook browser. -I accept any moose entity and get a moose model from it. +Accepted entities: any moose entity that knows its moose model. There are two kind of cells: - Microdown cells. diff --git a/src/MooseIDE-Famix/MiFilesBrowser.class.st b/src/MooseIDE-Famix/MiFilesBrowser.class.st index 5fe861385..d9bb6fd93 100644 --- a/src/MooseIDE-Famix/MiFilesBrowser.class.st +++ b/src/MooseIDE-Famix/MiFilesBrowser.class.st @@ -2,7 +2,7 @@ Root folder explorer. Allows to explore the root folder of a model (left panel) and shows the entities contained in each file (right panel). -- Follow: Receives a MooseModel that has a root folder +- Accepted entities: a MooseModel that has a root folder - Highlight: Entities if present and visible. Could highlight the file owning a received entity. diff --git a/src/MooseIDE-Famix/MiSourceTextBrowser.class.st b/src/MooseIDE-Famix/MiSourceTextBrowser.class.st index df1a5edb6..e8682bbd4 100644 --- a/src/MooseIDE-Famix/MiSourceTextBrowser.class.st +++ b/src/MooseIDE-Famix/MiSourceTextBrowser.class.st @@ -1,7 +1,7 @@ " Shows the source text of an entity if it has one. -- Follow: Receives a MooseEntity that uses FamixTSourceEntity. +- Accepted entities: a MooseEntity that uses FamixTSourceEntity. - Highlight: Nothing to do. - Propagate: diff --git a/src/MooseIDE-Famix/MiUMLBrowser.class.st b/src/MooseIDE-Famix/MiUMLBrowser.class.st index ac58a3b74..6beae3da0 100644 --- a/src/MooseIDE-Famix/MiUMLBrowser.class.st +++ b/src/MooseIDE-Famix/MiUMLBrowser.class.st @@ -1,7 +1,7 @@ " Shows UML of the received entities. -- Follow: Receives a TypeGroup or entities using TType. +- Accepted entities: a TypeGroup or entities using TType. - Highlight: Entities if present - Propagate: The selected entity if there is one. diff --git a/src/MooseIDE-Meta/MiFameBrowser.class.st b/src/MooseIDE-Meta/MiFameBrowser.class.st index baa4aae87..a1b63cc37 100644 --- a/src/MooseIDE-Meta/MiFameBrowser.class.st +++ b/src/MooseIDE-Meta/MiFameBrowser.class.st @@ -2,7 +2,7 @@ ** Expert user ** Shows the metadescription of a MooseObject. -- Follow: Recevies a MooseObject. +- Accepted entities: a MooseObject. - Highlight: Nothing to do. - Propagate: " diff --git a/src/MooseIDE-Meta/MiModelRootBrowser.class.st b/src/MooseIDE-Meta/MiModelRootBrowser.class.st index 7593e9317..ebcabe00c 100644 --- a/src/MooseIDE-Meta/MiModelRootBrowser.class.st +++ b/src/MooseIDE-Meta/MiModelRootBrowser.class.st @@ -2,7 +2,7 @@ ** Moose IDE entrypoint ** Shows installed models and allows model installation. -- Follow: Nothing to do. +- Accepted entities: Does not apply. - Highlight: Could highlight the model containing the received entity. - Propagate: The selected model. diff --git a/src/MooseIDE-Meta/MiMooseModelBrowser.class.st b/src/MooseIDE-Meta/MiMooseModelBrowser.class.st index 6a3a6d877..a67f2f7c6 100644 --- a/src/MooseIDE-Meta/MiMooseModelBrowser.class.st +++ b/src/MooseIDE-Meta/MiMooseModelBrowser.class.st @@ -1,7 +1,7 @@ " Shows entities in a MooseModel grouped by entity type. -- Follow: Receives a MooseModel. +- Accepted entities: a MooseModel. - Highlight: - Propagate: Selected entities if there are some. Improvement: not a collection but a mooseGroup. diff --git a/src/MooseIDE-Meta/MiPropertyBrowser.class.st b/src/MooseIDE-Meta/MiPropertyBrowser.class.st index 93fc0d7f8..7f5d28195 100644 --- a/src/MooseIDE-Meta/MiPropertyBrowser.class.st +++ b/src/MooseIDE-Meta/MiPropertyBrowser.class.st @@ -1,7 +1,7 @@ " Shows properties of a MooseObject. -- Follow: Receives MooseObjects +- Accepted entities: any MooseObject - Highlight: Nothing to do. - Propagate: The MooseObject it shows. " diff --git a/src/MooseIDE-NewTools/MiInspectorBrowser.class.st b/src/MooseIDE-NewTools/MiInspectorBrowser.class.st index efdfad548..647364a99 100644 --- a/src/MooseIDE-NewTools/MiInspectorBrowser.class.st +++ b/src/MooseIDE-NewTools/MiInspectorBrowser.class.st @@ -1,6 +1,8 @@ " I am a custom MooseIDE inspector. I have as a sub-presenter an instance of `MiInspectorPresenter` which is at the same time a subclass of `StInspector`. I am just like Pharo's inspector just that I am connected to the `MiApplication` bus. I have implemented the methods: `followAction` and `miSelectedItem` in order to listen and propagate entries to the bus. + +Accepted entities: a MooseEntity " Class { #name : #MiInspectorBrowser, diff --git a/src/MooseIDE-QueriesBrowser/MiQueriesBrowser.class.st b/src/MooseIDE-QueriesBrowser/MiQueriesBrowser.class.st index 91542236a..c8110a139 100644 --- a/src/MooseIDE-QueriesBrowser/MiQueriesBrowser.class.st +++ b/src/MooseIDE-QueriesBrowser/MiQueriesBrowser.class.st @@ -1,6 +1,8 @@ " I am a MooseIDE browser that allows to create custom queries that applies to a MooseModel. I have a `Mi queryBuilderPresenter` instance variable that contains a list with all the queries that you want to apply to the Moose model. + +Accepted entities: a MooseGroup with some named entities. " Class { #name : #MiQueriesBrowser, diff --git a/src/MooseIDE-Tagging/MiTagBrowser.class.st b/src/MooseIDE-Tagging/MiTagBrowser.class.st index 0210f67f3..18dd8aea3 100644 --- a/src/MooseIDE-Tagging/MiTagBrowser.class.st +++ b/src/MooseIDE-Tagging/MiTagBrowser.class.st @@ -1,7 +1,9 @@ " A tool to manage tags -Allows to create new tag, give them name, put them in a hierarchy of tags, give them a color, and of course add or remove entities carrying a tag +Allows to create new tag, give them name, put them in a hierarchy of tags, give them a color, and of course add or remove entities carrying a tag. + +Accepted entities: a MooseObject. " Class { diff --git a/src/MooseIDE-Tests/MiAbstractBrowserTest.class.st b/src/MooseIDE-Tests/MiAbstractBrowserTest.class.st index 9c4ff034f..05fd61750 100644 --- a/src/MooseIDE-Tests/MiAbstractBrowserTest.class.st +++ b/src/MooseIDE-Tests/MiAbstractBrowserTest.class.st @@ -291,6 +291,13 @@ MiAbstractBrowserTest >> testFollowOtherBus [ self assert: browser busButton label equals: '2 buses' ] +{ #category : #tests } +MiAbstractBrowserTest >> testHelpHasSomeInformation [ + + self assert: + (browser class comment includesSubstring: 'Accepted entities:') +] + { #category : #'tests - actions' } MiAbstractBrowserTest >> testHighlightEntity [ diff --git a/src/MooseIDE-Visualization/MiSystemComplexityBrowser.class.st b/src/MooseIDE-Visualization/MiSystemComplexityBrowser.class.st index 1d54dd3d7..8ea0c36e4 100644 --- a/src/MooseIDE-Visualization/MiSystemComplexityBrowser.class.st +++ b/src/MooseIDE-Visualization/MiSystemComplexityBrowser.class.st @@ -1,6 +1,6 @@ " I am a browser showing a System Complexity visualization on classes. -I accept a MooseGroup. +Accepted entities: a MooseGroup. Controls: