Bug 164436 [Regression]Chart can't be converted to a template report item[02]
Description: Chart can't be converted to a template report item Build number: 2.2.0.v20061114-1013 Steps to reproduce: 1.New a chart 2.Right click the chart Expected result: "Create Template Report Item" is enabled Actual result: "Create Template Report Item" is grayed out Error log: N/A
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/ModelUtil.java
/**
	 * Returns the URL object of the given string. If the input value is in URL
	 * format, return it. Otherwise, create the corresponding file object then
	 * return the url of the file object.
	 * 
	 * @param filePath
	 *            the file path
	 * @return the URL object or <code>null</code> if the
	 *         <code>filePath</code> cannot be parsed to the URL.
	 */
	public static URL getURLPresentation( String filePath )
	{
		try
		{
			return new URL( filePath );
		}
		catch ( MalformedURLException e )
		{
		}
		try
		{
			return new File( filePath ).toURL( );
		}
		catch ( MalformedURLException e )
		{
		}
		return null;
	}
}