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 unique data source name
     * 
     * @param baseName
     * @return
     */
    public static String getUniqueDataSourceName(String baseName)
    {
        String finalName = baseName;
        int n = 1;
        
        while ( HandleAdapterFactory.getInstance( )
				.getReportDesignHandleAdapter( )
				.checkDataSourceName( finalName ) )
		{
			finalName = baseName + n++;
		}        
        return finalName;
    }
    /**
     * check whether the data source name exist
     * 
     * @param name
     * @return
     */
    public static boolean checkDataSourceName( String name )
	{
		return HandleAdapterFactory.getInstance( )
				.getReportDesignHandleAdapter( )