Example
The following example shows how to add a metric that measures the number of applications in a configuration map edition.
CmApplications class
CtConfigurationMapMeasure subclass: #CmApplications
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
CmApplications public class methods
defaultUpperThreshold
   "Answer the default upper threshold for the receiver.
   The thresholds are affected by many factors (ex. prototype,
   first release, UI...) and the user has to tailor the thresholds
   to his own needs and experience.
   PARAMETERS
      None
   RETURN VALUE
      <Number>"
   ^10
 
group
   "Answer the functional group the receiver is in.
   In addition to being grouped by the type of object they
   apply to (Application, Class etc.) measures are also organized
   into functional groups. A measure belongs to one group.
   Group names are also used when generating the user interface.
   PARAMETERS
      None
   RETURN VALUE
      <String>"
   ^'Decomposition'
 
descriptionText
   "Answer the information text about the receiver.
   PARAMETERS
      None
   RETURN VALUE
      <String>"
   ^' Measure the number of applications contained in a
   configuration map'
 
adviceText
   "Answer the advice text about the receiver..
   PARAMETERS
     None
   RETURN VALUE
      <String>"
   ^' Helps estimate the packaging effort.
isMetric
   "Answer true if the receiver is a metric
   otherwise answer false.
   PARAMETERS
      None
   RETURN VALUE
      <Boolean>"
   ^true
 
label
   "Answer a single line label briefly describing the receiver.
   PARAMETERS
      None
   RETURN VALUE
      <String>"
   ^'Applications'
 
CmApplications public instance methods
measure: aConfigurationMap
   "Measure aConfigurationMap for the number of applications
   it contains.
   PARAMETERS
      aConfigurationMap <EmConfigurationMap>
   RETURN VALUE
      <CtMeasurement>"
   ^self
      defaultMeasurementOf: aConfigurationMap
      result:aConfigurationMap applicationNames size
Last modified date: 06/30/2015