eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Tools::MethodRewriter':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: MethodRewriter (in Tools)


Inheritance:

   Object
   |
   +--Model
      |
      +--ApplicationModel
         |
         +--Tools::MethodRewriter

Package:
stx:libtool
Category:
Interface-Tools
Version:
rev: 1.48 date: 2023/11/21 09:43:50
user: cg
file: Tools__MethodRewriter.st directory: libtool
module: stx stc-classLibrary: libtool

Description:


documentation to be added.

class:
    <a short class summary here, describing what instances represent>

responsibilities:    
    <describing what my main role is>

collaborators:    
    <describing with whom and how I talk to>

API:
    <public api and main messages>
    
example:
    <a one-line examples on how to use - can also be in a separate example method>

implementation:
    <implementation points>


[instance variables:]

[class variables:]

copyright

Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague Copyright (c) 2009-2010 eXept Software AG Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Class protocol:

example templates
o  templateReplaceAtIfAbsentByAtAifAbsentPut
automagically added to templates because my name starts with 'template'

o  templateReplaceErrorMayProceedByProceedableError
automagically added to templates because my name starts with 'template'

o  templateReplaceIfNilByIsNilIfTrue
automagically added to templates because my name starts with 'template'

o  templateReplaceIfNotNilByNotNilIfTrue
automagically added to templates because my name starts with 'template'

o  templateReplaceIsNilOrEmptyCollectionByIsEmptyOrNil
automagically added to templates because my name starts with 'template'

o  templateReplaceSelfHaltBySelfBreakPoint
automagically added to templates because my name starts with 'template'

o  templateReplaceSelfHaltBySelfError
automagically added to templates because my name starts with 'template'

o  templates
finds all methods here, which start with 'template'

Usage example(s):

     self templates

help specs
o  helpSpec
This resource specification was automatically generated
by the UIHelpTool of ST/X.

interface specs
o  classesSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:Tools::MethodRewriter andSelector:#classesSpec
     Tools::MethodRewriter new openInterface:#classesSpec

o  howToUseSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:Tools::MethodRewriter andSelector:#howToUseSpec
     Tools::MethodRewriter new openInterface:#howToUseSpec

o  rulesSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:Tools::MethodRewriter andSelector:#rulesSpec
     Tools::MethodRewriter new openInterface:#rulesSpec

o  searchAndReplaceSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:Tools::MethodRewriter andSelector:#searchAndReplaceSpec
     Tools::MethodRewriter new openInterface:#searchAndReplaceSpec

o  searchPatternHelpSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:Tools::MethodRewriter andSelector:#searchPatternHelpSpec
     Tools::MethodRewriter new openInterface:#searchPatternHelpSpec

o  templatesSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:Tools::MethodRewriter andSelector:#templatesSpec
     Tools::MethodRewriter new openInterface:#templatesSpec

o  windowSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:Tools::MethodRewriter andSelector:#windowSpec
     Tools::MethodRewriter new openInterface:#windowSpec
     Tools::MethodRewriter open

list specs
o  tabList
This resource specification was automatically generated
by the TabListEditor of ST/X.

Usage example(s):

     TabListEditor new openOnClass: self andSelector:#tabList


Instance protocol:

accessing
o  classes

o  classes: aCollectionOfClasses

o  info: aString

o  progress: anInteger

o  projects: aCollection

o  replacePattern

o  replacePattern: pattern

o  ruleTemplate

o  rules
construct a pseudo list from existing transformation rules

Usage example(s):

     self new rules

o  searchPattern

o  searchPattern: pattern

o  selectedClasses

o  selectedRule

o  selectedRuleSpec

o  selectedTemplate

o  templates

actions
o  addAllPackagesAction

o  addAllYourPackagesAction

o  addClassAction

o  addPackageAction

o  doRewrite: methodsMatching
text replace

o  doRewriteAction

o  doSearchAction

o  removeSeletedClassesAction

o  useAsRuleAction

o  useAsTemplateAction
ad hoc

aspects
o  actionInProgressHolder

o  adHocFindAndReplaceVisibleHolder

o  classesInfoTextHolder

o  howToUseRewriteToolURL

o  infoHolder

o  isMethodPatternHolder

o  isPlainStringPatternHolder

o  progressHolder

o  ruleExecutionVisibleHolder

o  ruleNameHolder

o  ruleNameList

o  ruleSearchAndReplacePatternHolder

o  searchPatternHelpURL

o  selectedClassesHolder

o  selectedRuleIndex

o  selectedTabIndex

o  selectedTemplateIndex

o  tabList
Generated by the TabListEditor

o  templateNameList

o  templateReplacePatternHolder

o  templateReplacePatternIsEditable

o  templateSearchPatternHolder

o  templateSearchPatternIsEditable

change & update
o  classesChanged
flush

o  selectedRuleIndexChanged
entries are:

o  selectedTemplateIndexChanged
entries are:

drag & drop
o  canDropClasses: dropContext
I accept classes, methods and packages

o  doDropClasses: dropContext
I accept classes, methods and packages

hooks
o  postBuildFindTextView: scrollableView

o  postBuildReplaceTextView: scrollableView

initialization
o  initialize
(comment from inherited method)
nothing done here;
but can be redefined in concrete applications

private
o  actionInProgress: aBoolean

o  doSearchPattern: pattern withResultDo: block
regular expression search

o  doSearchRule: rule withResultDo: block
searcher computeQuickSearchStrings.

o  methods

o  methods: aCollection
to explicitly set the set of methods to be processed

o  methodsForClasses

o  methodsMatchingPattern: searchPattern

o  methodsMatchingRule: rule
matches:searchPattern do:[:aNode :answer | matchingMethods add:mth ];

o  methodsToSearchOrAbortIfNone

o  showMethods: methods title: title
open a browser on matching methods

o  withMethods: givenMethods do: methodBlock

o  withMethods: methods do: methodBlock finallyDo: finallyBlock
self actionInProgress: false.

o  withMethodsDo: methodBlock finallyDo: finallyBlock

testing method
o  testXXX


Examples:


Notice that everything between [exBegin] and [exEnd] is extracted by the html-doc generator to create nicely formatted and clickable executable examples in the generated html-doc. (see the browser's class-documentation menu items for more) opening the application:
   Tools::MethodRewriter open
opening the application on some model:
   Tools::MethodRewriter openOn:aModel


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:25:04 GMT