public void perform() {
DesignerCommand command = null;
IHTMLGraphicalViewer viewer = getViewer();
if (viewer.isInRangeMode()) {
command = new CopyCommand(viewer);
command.execute();
} else {
Command nodeCopy = new CopyNodeCommand(viewer);
nodeCopy.execute();
}