Namespace: Consultingwerk.Studio.Refactor
Class 
ClassRefactor Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:ClassRefactor
Purpose:Supports Refactoring (move / rename) operations for ABL
classes
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Fri Mar 13 10:20:19 AEST 2020
Notes:This class is depricated. New implementation is in
Consultingwerk.Studio.Refactor.RenameMove
Purpose: Moves a class/interface/enum from one package to another
Notes: Physically moves the .cls file
Rewrites CLASS/INTERFACE/ENUM Statement
Rewrites USING Statements to the class
When class has .* USING to old package, adds .* USING to the new Package



Top Method Summary
Options Name Purpose
+ MoveClass (character, character, character) Moves a class/interface/enum from one package to another
# RefactorTypeReferences (ParseUnit, RefactorSession, character, character, character, character, character) Refactors fully qualified type references
# RefactorTypeReferences (ParseUnit, RefactorSession, JPNode, character, character, character, character) Refactors fully qualified type references (recursively)
# RefactorUsings (ParseUnit, RefactorSession, character, character, character, character) Refactors the Using statements
+ RenameClass (character, character) Renames a class/interface/enum


Method Detail
Top

PUBLIC MoveClass (character, character, character)

Purpose: Moves a class/interface/enum from one package to another
Notes: Physically moves the .cls file
Rewrites CLASS/INTERFACE/ENUM Statement
Rewrites USING Statements to the class
When class has .* USING to old package, adds .* USING to the new Package

Parameters:
pcClassName CHARACTER
The name of the class (including package) to move
pcNewPackage CHARACTER
The name of the new package (exclusing class name) to move to
pcNewBaseFolder CHARACTER
The name of the new base folder, "" or ? for working directory
Top

PROTECTED RefactorTypeReferences (ParseUnit, RefactorSession, character, character, character, character, character)

Purpose: Refactors fully qualified type references
Notes: Rewrites USING Statements to the class
When class has .* USING to old package, adds .* USING to the new Package

Parameters:
poParseUnit org.prorefactor.treeparser.ParseUnit
The reference to the ParseUnit
poRefactor Consultingwerk.Studio.SmartRefactor.RefactorSession
The reference to the RefactorSession
pcTypeType CHARACTER
The type of type (CLASS, INTERFACE, ENUM)
pcOldPackage CHARACTER
The package name to replace
pcNewPackage CHARACTER
The package name to replace with
pcOldClassName CHARACTER
The old class name
pcNewClassName CHARACTER
The new class name
Top

PROTECTED RefactorTypeReferences (ParseUnit, RefactorSession, JPNode, character, character, character, character)

Purpose: Refactors fully qualified type references (recursively)
Notes: Rewrites USING Statements to the class
When class has .* USING to old package, adds .* USING to the new Package

Parameters:
poParseUnit org.prorefactor.treeparser.ParseUnit
The reference to the ParseUnit
poRefactor Consultingwerk.Studio.SmartRefactor.RefactorSession
The reference to the RefactorSession
poNode org.prorefactor.core.JPNode
The current node to process children of
pcOldPackage CHARACTER
The package name to replace
pcNewPackage CHARACTER
The package name to replace with
pcOldClassName CHARACTER
The old class name
pcNewClassName CHARACTER
The new class name
Top

PROTECTED RefactorUsings (ParseUnit, RefactorSession, character, character, character, character)

Purpose: Refactors the Using statements
Notes: Rewrites USING Statements to the class
When class has .* USING to old package, adds .* USING to the new Package

Parameters:
poParseUnit org.prorefactor.treeparser.ParseUnit
The reference to the ParseUnit
poRefactor Consultingwerk.Studio.SmartRefactor.RefactorSession
The reference to the RefactorSession
pcOldPackage CHARACTER
The package name to replace
pcNewPackage CHARACTER
The package name to replace with
pcOldClassName CHARACTER
The old class name
pcNewClassName CHARACTER
The new class name
Top

PUBLIC RenameClass (character, character)

Purpose: Renames a class/interface/enum
Notes: Physically renames the .cls file
Rewrites CLASS/INTERFACE/ENUM Statement
Rewrites USING Statements to the class

Parameters:
pcOldClassName CHARACTER
The name of the class (including package) to rename
pcNewClassName CHARACTER
The name of the class (excluding package) to rename to


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       09.11.2024 19:02:53