Class ColorRefactoring
java.lang.Object
com.iizigo.color.ColorRefactoring
The refactoring participant for palette colors (THEME-DESIGN section 5, phase B3): when a palette color file, or a folder under a module's
style folder, is renamed or moved - by the Rename dialog, a drag in the IIZI Explorer, or their undo - the property tree hears it as a rename or move of the file's or folder's container, and this class turns that event into the old and new canonical paths and has every % color reference in every loaded module follow (ColorRefRefactor.rename(Collection, String, String)). The files holding the rewritten references go dirty; the undo of the rename arrives as another rename and rewrites them back.Hooked from ModuleRootPropCnr.onEventSelf, which every event of a module's tree reaches.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionstatic voidonEvent(ModuleRootPropCnr root, GEvent event) Called for every event a module root hears: acts on a rename or move of a palette color file or of a folder under the style folder, ignores everything else.
Method Details
onEvent
Called for every event a module root hears: acts on a rename or move of a palette color file or of a folder under the style folder, ignores everything else.- Parameters:
root- The module root.event- The event.