Bug 88724 Provide 'since' javadoc in snippets
It would be a useful additional information in some snippets if there were an @since javadoc tag that tells from which version on the snippet will work. For instance, snippet 175 works only from Eclipse 3.1 on, since it uses the GridData.exclude field which was introduced in 3.1
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet197.java
final static String longString = "The preferred size of a widget is the minimum size needed to show its content. In the case of a Composite, the preferred size is the smallest rectangle that contains all of its children. If children have been positioned by the application, the Composite computes its own preferred size based on the size and position of the children. If a Composite is using a layout class to position its children, it asks the Layout to compute the size of its clientArea, and then it adds in the trim to determine its preferred size.";
public static void main(String[] args) {
	Display display = new Display();
	final Shell shell = new Shell(display);
	final TextLayout layout = new TextLayout(display);
	layout.setText(longString);
	Listener listener = new Listener() {
		public void handleEvent (Event event) {
			switch (event.type) {
			case SWT.Paint:
				layout.draw(event.gc, 10, 10);
				break;
			case SWT.Resize:
				layout.setWidth(shell.getSize().x - 20);
				break;
			}
		}
	};
	shell.addListener(SWT.Paint, listener);
	shell.addListener(SWT.Resize, listener);
	shell.setSize(300, 300);
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
	display.dispose();
}
}