C# Class hoTools.Find.FindAndReplace

ファイルを表示 Open project: Helmut-Ortmann/EnterpriseArchitect_hoTools Class Usage Examples

Public Methods

Method Description
ChangeString ( string stringToChange, string newString = "" ) : string

Change strings of items to the stored 'newString' value. Optional you may use your own 'newString' parameter.

FindAndReplace ( EA rep, EA pkg, string findString, string replaceString, bool isCaseSensitive, bool isRegularExpression, bool isIgnoreWhiteSpace, bool isNameSearch, bool isDescriptionSearch, bool isStereotypeSearch, bool isTagSearch, string taggedValueNames, bool isPackageSearch, bool isElementSearch, bool isDiagramSearch, bool isAttributeSearch, bool isOperationSearch ) : System
FindInPackageRecursive ( ) : void

Find all choosen items beneath selected package (recursive). - Create item list (l_items) The task is delegated doRecursivePackage

FindNext ( ) : void
FindPrevious ( ) : void
FindStringInItem ( EA object_type, string GUID ) : int

Find the count of found searches in item: - add item to l_items - update item to l_items if item is already available

ItemShortDescription ( ) : string
LocateCurrentElement ( ) : void
ReplaceAll ( ) : void
ReplaceItem ( ) : int

Replace all occurences of "Search string" by "Replace String" in current selected item.

SetRtfBoxText ( System.Windows.Forms.RichTextBox rtfBox, string from ) : int

Output 'from' string to rtfBox and mark all possible changes. It returns the count of possible changes

currentItem ( ) : FindAndReplaceItem
lastItem ( ) : FindAndReplaceItem

Private Methods

Method Description
PrepareRegexp ( ) : Regex

Prepare a regular expression and returns it

Method Details

ChangeString() public method

Change strings of items to the stored 'newString' value. Optional you may use your own 'newString' parameter.
public ChangeString ( string stringToChange, string newString = "" ) : string
stringToChange string
newString string "Change the found values to 'neString'."
return string

FindAndReplace() public method

public FindAndReplace ( EA rep, EA pkg, string findString, string replaceString, bool isCaseSensitive, bool isRegularExpression, bool isIgnoreWhiteSpace, bool isNameSearch, bool isDescriptionSearch, bool isStereotypeSearch, bool isTagSearch, string taggedValueNames, bool isPackageSearch, bool isElementSearch, bool isDiagramSearch, bool isAttributeSearch, bool isOperationSearch ) : System
rep EA
pkg EA
findString string
replaceString string
isCaseSensitive bool
isRegularExpression bool
isIgnoreWhiteSpace bool
isNameSearch bool
isDescriptionSearch bool
isStereotypeSearch bool
isTagSearch bool
taggedValueNames string
isPackageSearch bool
isElementSearch bool
isDiagramSearch bool
isAttributeSearch bool
isOperationSearch bool
return System

FindInPackageRecursive() public method

Find all choosen items beneath selected package (recursive). - Create item list (l_items) The task is delegated doRecursivePackage
public FindInPackageRecursive ( ) : void
return void

FindNext() public method

public FindNext ( ) : void
return void

FindPrevious() public method

public FindPrevious ( ) : void
return void

FindStringInItem() public method

Find the count of found searches in item: - add item to l_items - update item to l_items if item is already available
public FindStringInItem ( EA object_type, string GUID ) : int
object_type EA
GUID string
return int

ItemShortDescription() public method

public ItemShortDescription ( ) : string
return string

LocateCurrentElement() public method

public LocateCurrentElement ( ) : void
return void

ReplaceAll() public method

public ReplaceAll ( ) : void
return void

ReplaceItem() public method

Replace all occurences of "Search string" by "Replace String" in current selected item.
public ReplaceItem ( ) : int
return int

SetRtfBoxText() public method

Output 'from' string to rtfBox and mark all possible changes. It returns the count of possible changes
public SetRtfBoxText ( System.Windows.Forms.RichTextBox rtfBox, string from ) : int
rtfBox System.Windows.Forms.RichTextBox
from string
return int

currentItem() public method

public currentItem ( ) : FindAndReplaceItem
return FindAndReplaceItem

lastItem() public method

public lastItem ( ) : FindAndReplaceItem
return FindAndReplaceItem