public static String createExtensionMatcher(String extension) {
		StringBuilder builder = new StringBuilder();

		if (Platform.isMacintosh() || Platform.isWindows()) {
			builder.append("(?i)"); //$NON-NLS-1$
		}
		builder.append("^.*\\"); //$NON-NLS-1$
		if (!extension.startsWith(".")) { //$NON-NLS-1$
			builder.append('.');
		}
		builder.append(extension);
		builder.append('$');
		return builder.toString();
	}