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
FileWriter file = null;
			try {
				file = new FileWriter(fileName);
		       	file.write(styledText.getText());
		       	file.close();
			} catch (IOException e) {
	        	showError(getResourceString("Error"), e.getMessage());
	        } finally {
	        	try {
	        		if (file != null) file.close();
	        	} catch (IOException e) {
	        		showError(getResourceString("Error"), e.getMessage());
	        	}
	        }
		}
	}
	
	void setBullet(int type) {
		Point selection = styledText.getSelection();
		int lineStart = styledText.getLineAtOffset(selection.x);
		int lineEnd = styledText.getLineAtOffset(selection.y);
		StyleRange styleRange = new StyleRange();
		styleRange.metrics = new GlyphMetrics(0, 0, BULLET_WIDTH);
		Bullet bullet = new Bullet(type, styleRange);
		for (int lineIndex = lineStart; lineIndex <= lineEnd; lineIndex++) {
			Bullet oldBullet = styledText.getLineBullet(lineIndex);
			styledText.setLineBullet(lineIndex, 1, oldBullet != null ? null : bullet);
		}
	}