! simpleStyleCheck.pvc - simple client component for Style Check Contributed Tool
! Copyright (c) 2008-2010 Sage Software Canada Ltd. All Rights Reserved

!
! ** This class is required on each client workstation to enable the SytleCheck
! ** capability that is included in the ProvideX plug-in in the class %PvxClass(ecStyleCheck)%.
! **
! ** This class does not extend any of the standard functionality - simply overrides the
! ** location of the rules file and description of the contributed tool.
! **

def class "simpleStyleCheck" create required
      like "ecStyleCheck"

      ! ** specify the full path to the location of the file that contains the style rules
      local styleRulesFile$=mid(pgn,1,pos(dlm=pgn,-1))+_obj'_Class$+"_rules.txt"
      local theDescription$="Simple rule-based Style Check"

end def

on_create:
      ! Use the method from the parent class to load the rules
      _obj'loadRules(from "ecStyleCheck",styleRulesFile$)
return

end