Bug 156469 Should not new a file that is not a *.properties on resource file
Desctiption: Should not create a file that is not a *.properties on resource file when the resource folder has not any other *.properties Step: 1.Set the resource folder path is blank. 2.New a report project. 3.New a report design. 4.Click the blank area on layout. 5.Select Property Editor - General - Resources 6.Click Add to add a resource file. 7.The browse resource file is pop up and select Resource Folder. 8.Input any word in text field. Excepted result: It prompt that the file name must end with .properties Actual result: Click OK and the file is create.
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/resource/NewResourceFileDialog.java
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
/**
 * A dialog which can browser all properties in BIRT resource folder. User can
 * select a properties or enter new file name to creat a new one.
 * 
 */
public class NewResourceFileDialog extends ResourceFileFolderSelectionDialog
{
	private Text text;
	private String ext = ".properties"; 
	protected String newFileName = ""; 
	private Status OKStatus = new Status( IStatus.OK,
			ReportPlugin.REPORT_UI,
			IStatus.OK,
			"", null ); 
	private Status ErrorStatus = new Status( IStatus.ERROR,
			ReportPlugin.REPORT_UI,
			IStatus.ERROR,
			Messages.getString( "NewResourceFileDialog.ErrorMessage" ), 
			null );
	private Status ErrorStatusNoSelection = new Status( IStatus.ERROR,
			ReportPlugin.REPORT_UI,
			IStatus.ERROR,
			Messages.getString( "" ), 
			null );
	private class Validator implements ISelectionStatusValidator