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/AddStyleAction.java
import org.eclipse.birt.report.designer.internal.ui.util.Policy;
import org.eclipse.birt.report.designer.nls.Messages;
import org.eclipse.birt.report.designer.ui.dialogs.StyleBuilder;
import org.eclipse.birt.report.designer.ui.newelement.DesignElementFactory;
import org.eclipse.birt.report.model.api.CommandStack;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.ModuleHandle;
import org.eclipse.birt.report.model.api.ReportElementHandle;
import org.eclipse.birt.report.model.api.SharedStyleHandle;
import org.eclipse.birt.report.model.api.StyleHandle;
import org.eclipse.birt.report.model.api.ThemeHandle;
import org.eclipse.birt.report.model.api.command.StyleException;
import org.eclipse.jface.window.Window;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
/**
 * Add style rule action
 */
public class AddStyleAction extends ContextSelectionAction
{
	private static final String STACK_MSG_ADD_STYLE = Messages.getString( "AddStyleAction.stackMsg.addStyle" ); 
	private static final String ACTION_MSG_ADD_STYLE_RULE = Messages.getString( "AddStyleAction.actionMsg.addStyleRule" ); 
	
	public static final String ID = "AddStyleAction"; 
	private ThemeHandle themeHandle;
	/**
	 * Contructor
	 * 
	 * @param part
	 */