NewTools icon indicating copy to clipboard operation
NewTools copied to clipboard

Spec tools should not refer directly to Smalltalk tools

Open Ducasse opened this issue 7 months ago • 0 comments

We should check all the users of toolNamed: and make sure that they use application toolNamed:

  • Epciea does it well.

Possible list of things to fix: (open an issue for each group).

  • We should introduce a quality rule that check if the class is a Spec subclass then we should not have a reference to Smalltalk tools.

  • IceTipMergePresenter >> changesTreeActions

  • StNode >> browseClass: if StNode does not know the application then the applicaiton should be passed to it at creation time (from the presenter that instantiate it).

  • StTranscriptPresenter >> menuCommandOn:

  • Please expand the list by analysis the senders of toolNamed:...

  • In some cases the logic should be changed. For example the CompiledMethod drTest.... cannot use application because the way is it done. The presenter should do something different. To be studied. We could use some double dispatch.

Instead of

browseSelectedItem
	"Because of DTBrowseSelectedItem>>#canBeExecuted, we know there is a single item in the selection.
	 Thus, we take the first one and browse it.
	"
	self selectedItems first drTestsBrowse
browseSelectedItem
	"Because of DTBrowseSelectedItem>>#canBeExecuted, we know there is a single item in the selection.
	 Thus, we take the first one and browse it.
	"
	self selectedItems first testBrowse: self 

Ducasse avatar Jul 23 '25 06:07 Ducasse