Bug 166015 Refactor designer actions to eclipse command framework
Eclipse command framework provide a more explicit way to manage UI actions contributions, we can take it's advantage to make our actions code more clean and maintainable.
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/actions/InsertGroupActionFactory.java
return new InsertBelowGroupAction( selection, Messages
					.getString( "InsertGroupActionFactory.label.insertGroup" ) ); 
		}
		else
		{
			return new InsertBelowGroupAction( selection, Messages
					.getString( "InsertGroupActionFactory.label.insertGroup" ) ); 
		}
	}
	/**
	 * Gets actions array
	 * 
	 * @param selection
	 *            selected editparts
	 * @return actions array
	 */
	public static Action[] getInsertGroupActions( List selection )
	{
		initInstances( selection );
		return instances;
	}
	private static void initInstances( List selection )
	{
		for ( int i = 0; i < instances.length; i++ )
		{
			instances[i].setSelection( selection );
		}
	}
}
abstract class InsertPositionGroupAction extends Action