@SuppressWarnings("unchecked") public void decode(Decoder decoder) { decoder.setEncoding(encoding); commandClass = (Class<? extends Command>)decoder.decode(); commandParameter = (CommandParameter)decoder.decode(); }
protected Command createDragAndDropOverrideCommand(DragAndDropCommand dragAndDropCommand) { if (!isSameEditingDomainAdapterFactory && optimizeCopy && !(dragAndDropCommand instanceof DragAndDropOverrideCommand)) { return new DragAndDropOverrideCommand(this, dragAndDropCommand); } return null; }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.RemoveMappingCommand}. */ protected Command createRemoveMappingCommand(MappingDomain domain, Collection<?> collection) { return new RemoveMappingCommand(domain, collection); }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.RestoreInitialStateCommand}. */ protected Command createRestoreInitialStateCommand(MappingDomain domain) { return new RestoreInitialStateCommand(domain); }
protected Command createPasteFromClipboardOverrideCommand(PasteFromClipboardCommand pasteFromClipboardCommand) { if (!isSameEditingDomainAdapterFactory && optimizeCopy && !(pasteFromClipboardCommand instanceof PasteFromClipboardOverrideCommand)) { return new PasteFromClipboardOverrideCommand(this, pasteFromClipboardCommand); } return null; }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.AddMappingCommand}. */ protected Command createAddMappingCommand(MappingDomain domain, Collection<?> collection) { return new AddMappingCommand(domain, collection); }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.NameMatchMappingCommand}. */ protected Command createNameMatchMappingCommand(MappingDomain domain, Mapping mapping) { return new NameMatchMappingCommand(domain, mapping); }
/** * This is called for every command created by the domain. */ public void handleCreateCommand(Class<? extends Command> commandClass, CommandParameter commandParameter, Command command) { if (persistentCommandStack != null) { persistentCommandStack.handleCreateCommand(commandClass, commandParameter, command); } }
/** * You can overide this to create your own type of encoder. */ protected Encoder createEncoder() { return new Encoder(); }
protected Command createInitializeCopyOverrideCommand(InitializeCopyCommand initializeCopyCommand) { // If the owner and the copy are of the same type, we can proceed with the command, i.e. no override. // If not, we will skip this command by returning a do-nothing override. // if (!isSameEditingDomainAdapterFactory) { return new InitializeCopyOverrideCommand(this, initializeCopyCommand); } return null; }
/** * You can overide this to create your own type of decoder. */ protected Decoder createDecoder(MappingRoot mappingRoot, ResourceSet resourceSet, ClassLoader classLoader) { return new Decoder(mappingRoot, resourceSet, classLoader); }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.CreateMappingCommand}. */ protected Command createCreateMappingCommand(MappingDomain domain, Collection<?> collection) { return new CreateMappingCommand(domain, collection); }
@SuppressWarnings("unchecked") public void decode(Decoder decoder) { decoder.setEncoding(encoding); commandClass = (Class<? extends Command>)decoder.decode(); commandParameter = (CommandParameter)decoder.decode(); }
protected Command createDragAndDropOverrideCommand(DragAndDropCommand dragAndDropCommand) { if (!isSameEditingDomainAdapterFactory && optimizeCopy && !(dragAndDropCommand instanceof DragAndDropOverrideCommand)) { return new DragAndDropOverrideCommand(this, dragAndDropCommand); } return null; }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.RemoveMappingCommand}. */ protected Command createRemoveMappingCommand(MappingDomain domain, Collection<?> collection) { return new RemoveMappingCommand(domain, collection); }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.RestoreInitialStateCommand}. */ protected Command createRestoreInitialStateCommand(MappingDomain domain) { return new RestoreInitialStateCommand(domain); }
protected Command createPasteFromClipboardOverrideCommand(PasteFromClipboardCommand pasteFromClipboardCommand) { if (!isSameEditingDomainAdapterFactory && optimizeCopy && !(pasteFromClipboardCommand instanceof PasteFromClipboardOverrideCommand)) { return new PasteFromClipboardOverrideCommand(this, pasteFromClipboardCommand); } return null; }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.AddMappingCommand}. */ protected Command createAddMappingCommand(MappingDomain domain, Collection<?> collection) { return new AddMappingCommand(domain, collection); }
/** * This creates a primitive {@link org.eclipse.emf.mapping.command.NameMatchMappingCommand}. */ protected Command createNameMatchMappingCommand(MappingDomain domain, Mapping mapping) { return new NameMatchMappingCommand(domain, mapping); }