Bug 316568 Refactor data set editor pages' codes[26849]
Build Identifier: 20100610 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/Utility.java
/**
	 * get command stack
	 * 
	 * @return
	 */
	public static CommandStack getCommandStack( )
	{
		return SessionHandleAdapter.getInstance( ).getCommandStack( );
	}
	
    
	/**
	 * get unique data set name
	 * 
	 * @param baseName
	 * @return
	 */
    public static String getUniqueDataSetName(String baseName)
    {
        String finalName = baseName;
        int n = 1;
        
        while ( HandleAdapterFactory.getInstance( )
				.getReportDesignHandleAdapter( )
				.checkDataSetName( finalName ) )
		{
			finalName = baseName + n++;
		}    
        return finalName;
    }