Bug 269599 Compiler warnings in N20090320-2000
1. WARNING in /src/org/eclipse/swt/examples/texteditor/TextEditor.java (at line 760) baselineUpItem.setToolTipText(getResourceString(USE_BASELINE ? "IncreaseBaseline" : "IncreaseFont")); //$NON-NLS-1$ Dead code 2. WARNING in /src/org/eclipse/swt/examples/texteditor/TextEditor.java (at line 774) baselineDownItem.setToolTipText(getResourceString(USE_BASELINE ? "DecreaseBaseline" : "DecreaseFont")); //$NON-NLS-1$ Dead code
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
static final ResourceBundle resources = ResourceBundle.getBundle("examples_texteditor");  
	static String getResourceString(String key) {
		try {
			return resources.getString(key);
		} catch (MissingResourceException e) {
			return key;
		} catch (NullPointerException e) {
			return "!" + key + "!";  
		}
	}
	
	public static void main(String[] args) {
		Display display = new Display();
		TextEditor editor = new TextEditor(display);
		Shell shell = editor.shell;
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		editor.releaseResources();
		display.dispose();
	}
	public TextEditor(Display display) {
		this.display = display;
		initResources();
		shell = new Shell(display);
		shell.setText(getResourceString("Window_title")); 
		styledText = new StyledText(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
		createMenuBar();
		createToolBar();