1 11 12 package org.eclipse.ui.internal.commands; 13 14 import java.util.List ; 15 16 import org.eclipse.ui.internal.util.Util; 17 18 public abstract class AbstractMutableCommandRegistry 19 extends AbstractCommandRegistry 20 implements IMutableCommandRegistry { 21 22 protected AbstractMutableCommandRegistry() { 23 } 25 26 public void setActiveKeyConfigurationDefinitions(List activeKeyConfigurationDefinitions) { 27 activeKeyConfigurationDefinitions = 28 Util.safeCopy( 29 activeKeyConfigurationDefinitions, 30 ActiveKeyConfigurationDefinition.class); 31 32 if (!activeKeyConfigurationDefinitions 33 .equals(this.activeKeyConfigurationDefinitions)) { 34 this.activeKeyConfigurationDefinitions = 35 activeKeyConfigurationDefinitions; 36 fireCommandRegistryChanged(); 37 } 38 } 39 40 public void setCategoryDefinitions(List categoryDefinitions) { 41 categoryDefinitions = 42 Util.safeCopy(categoryDefinitions, CategoryDefinition.class); 43 44 if (!categoryDefinitions.equals(this.categoryDefinitions)) { 45 this.categoryDefinitions = categoryDefinitions; 46 fireCommandRegistryChanged(); 47 } 48 } 49 50 public void setCommandDefinitions(List commandDefinitions) { 51 commandDefinitions = 52 Util.safeCopy(commandDefinitions, CommandDefinition.class); 53 54 if (!commandDefinitions.equals(this.commandDefinitions)) { 55 this.commandDefinitions = commandDefinitions; 56 fireCommandRegistryChanged(); 57 } 58 } 59 60 public void setKeyConfigurationDefinitions(List keyConfigurationDefinitions) { 61 commandDefinitions = 62 Util.safeCopy( 63 keyConfigurationDefinitions, 64 KeyConfigurationDefinition.class); 65 66 if (!keyConfigurationDefinitions 67 .equals(this.keyConfigurationDefinitions)) { 68 this.keyConfigurationDefinitions = keyConfigurationDefinitions; 69 fireCommandRegistryChanged(); 70 } 71 } 72 73 public void setKeySequenceBindingDefinitions(List keySequenceBindingDefinitions) { 74 keySequenceBindingDefinitions = 75 Util.safeCopy( 76 keySequenceBindingDefinitions, 77 KeySequenceBindingDefinition.class); 78 79 if (!keySequenceBindingDefinitions 80 .equals(this.keySequenceBindingDefinitions)) { 81 this.keySequenceBindingDefinitions = keySequenceBindingDefinitions; 82 fireCommandRegistryChanged(); 83 } 84 } 85 } 86 | Popular Tags |