Exploring deprecated Glamorous Toolkit classes

This page provides a way to explore classes that are deprecated in Glamorous Toolkit.

Its main usage is in the development of Glamorous Toolkit to understand how those classes are used and if we can remove them.

In total there are 90 deprecated classes in GT. Ouf of these 53 are not used within the system.

We can browse deprecated classes by the repository that defines them.

This information can also be extracted using the code snippet below:

GtDeprecatedClassProjectWrapper forGToolkit.
  

The above views are using a cache in GtDeprecatedClassGToolkitMetrics Object subclass: #GtDeprecatedClassGToolkitMetrics instanceVariableNames: 'gtoolkitProject' classVariableNames: '' package: 'GToolkit-Utility-Deprecation' . To update the computed values we should reset the cache using the snippet below.

GtDeprecatedClassGToolkitMetrics cleanUp
  

Including deprecation time

For each deprecated class we can look through its history to determine the date when it was deprecated.

The snippet below performs this update. It can take several minutes to execute.

project := GtDeprecatedClassGToolkitMetrics defaultInstance gtoolkitProject.
  
project deprecatedClasses do: [ :aDeprecatedClass | 
	aDeprecatedClass updateDeprecatedTimestamp ].	
  

We can now sort classes ascending by the time when they were deprecated.

We can also write queries like finding classes deprecated for more than a year that are still used within the system.

referenceDate := DateAndTime now - 1 year.
project deprecatedClasses select: [ :aDeprecatedClass |
	aDeprecatedClass deprecatedTimestamp notNil and: [
		aDeprecatedClass deprecatedTimestamp < referenceDate and: [
			aDeprecatedClass isReferenced ] ] ]