Index: /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2669)
+++ /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2670)
@@ -1873,2 +1873,26 @@
 	CKEDITOR.dialog.addUIElement( 'vbox', commonBuilder );
 })();
+
+/**
+ * Generic dialog command. It opens a specific dialog when executed.
+ * @constructor
+ * @augments CKEDITOR.commandDefinition
+ * @param {string} dialogName The name of the dialog to open when executing
+ *		this command.
+ * @example
+ * // Register the "link" command, which opens the "link" dialog.
+ * editor.addCommand( 'link', <b>new CKEDITOR.dialogCommand( 'link' )</b> );
+ */
+CKEDITOR.dialogCommand = function( dialogName )
+{
+	this.dialogName = dialogName;
+};
+
+CKEDITOR.dialogCommand.prototype =
+{
+	/** @ignore */
+	exec : function( editor )
+	{
+		editor.openDialog( this.dialogName );
+	}
+};
Index: /CKEditor/branches/prototype/_source/plugins/link/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/link/plugin.js	(revision 2669)
+++ /CKEditor/branches/prototype/_source/plugins/link/plugin.js	(revision 2670)
@@ -24,7 +24,5 @@
 	init : function( editor, pluginPath )
 	{
-		var link = CKEDITOR.plugins.link;
-
-		editor.addCommand( 'link', link.commands.link );
+		editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) );
 		editor.ui.addButton( 'Link',
 			{
@@ -32,5 +30,5 @@
 				command : 'link'
 			} );
-		CKEDITOR.dialog.add( 'link', link.dialog );
+		CKEDITOR.dialog.add( 'link', CKEDITOR.plugins.link.dialog );
 	}
 } );
@@ -38,15 +36,4 @@
 CKEDITOR.plugins.link =
 {
-	commands :
-	{
-		link :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'link' );
-			}
-		}
-	},
-
 	dialog : function( editor )
 	{
Index: /CKEditor/branches/prototype/_source/plugins/smiley/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/smiley/plugin.js	(revision 2669)
+++ /CKEditor/branches/prototype/_source/plugins/smiley/plugin.js	(revision 2670)
@@ -24,7 +24,5 @@
 	init : function( editor, pluginPath )
 	{
-		var smiley = CKEDITOR.plugins.smiley;
-
-		editor.addCommand( 'smiley', smiley.commands.smiley );
+		editor.addCommand( 'smiley', new CKEDITOR.dialogCommand( 'smiley' ) );
 		editor.ui.addButton( 'Smiley',
 			{
@@ -32,5 +30,5 @@
 				command : 'smiley'
 			});
-		CKEDITOR.dialog.add( 'smiley', smiley.dialog );
+		CKEDITOR.dialog.add( 'smiley', CKEDITOR.plugins.smiley.dialog );
 	},
 
@@ -40,15 +38,4 @@
 CKEDITOR.plugins.smiley =
 {
-	commands : 
-	{
-		smiley :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'smiley' );
-			}
-		}
-	},
-
 	dialog : function( editor )
 	{
