Bug 279917 SWT Editor Example does not work RC3
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
}					
		});
		
		final MenuItem saveItem = new MenuItem(fileMenu, SWT.PUSH);
		saveItem.setText(getResourceString("Save_menuitem")); 
		saveItem.addSelectionListener(new SelectionAdapter () {
			public void widgetSelected(SelectionEvent event) {
				saveFile();
			}											
		});
		
		fileMenu.addMenuListener(new MenuAdapter() {
			public void menuShown(MenuEvent event){
				saveItem.setEnabled(fileName != null);
			}			 			
		});
		
		MenuItem saveAsItem = new MenuItem(fileMenu, SWT.PUSH);
		saveAsItem.setText(getResourceString("SaveAs_menuitem")); 
		saveAsItem.addSelectionListener(new SelectionAdapter () {
			public void widgetSelected(SelectionEvent event) {
				FileDialog dialog = new FileDialog (shell, SWT.SAVE);
				dialog.setFilterNames(new String [] {getResourceString("Text_Documents")});  
				dialog.setFilterExtensions(new String [] {"*.txt"}); 
				if (fileName != null) dialog.setFileName(fileName);
				String name = dialog.open(); 
				if (name != null) {
					fileName = name;
					saveFile();
				}