Skip to content

[RB] Comment on RBClassRegexRefactoring and superclass is wrong #17543

Closed
@guillep

Description

@guillep

Trying the following script that is found on the comment of RBClassRegexRefactoring's superclass, it fails

| pkgPrefix newClassPrefix env model |
pkgPrefix := 'PrefixOfPackageNames'.
newClassPrefix := 'ZG'.
env := RBBrowserEnvironment new 
			forPackageNames: (Package organizer packageNames select: [ : pkgName | (pkgName beginsWith: pkgPrefix) ]).
model := (RBNamespace onEnvironment: env) name: 'MyModel'; yourself.
RBClassRegexRefactoring new
	model: model;
	renameClasses; 					"Here I just want a rename no copy"
	replace: '^YK(.*)$' with: newClassPrefix,'$1';
  execute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    DONE

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions