Have icon for "reset" entry in reflog
[egit/eclipse.git] / org.eclipse.egit.ui / src / org / eclipse / egit / ui / internal / search / PatternUtils.java
blob2931bd3916506202d64fce309e9838889ed5dbd1
1 /*******************************************************************************
2 * Copyright (c) 2011 GitHub Inc.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License 2.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-2.0/
8 * SPDX-License-Identifier: EPL-2.0
10 * Contributors:
11 * Kevin Sawicki (GitHub Inc.) - initial API and implementation
12 *******************************************************************************/
13 package org.eclipse.egit.ui.internal.search;
15 import java.util.regex.Pattern;
16 import java.util.regex.PatternSyntaxException;
18 import org.eclipse.search.internal.core.text.PatternConstructor;
20 /**
21 * Pattern constructor utilities to localize warnings from using internal
22 * {@link PatternConstructor} class.
24 public abstract class PatternUtils {
26 /**
27 * Create pattern
29 * @param pattern
30 * @param isCaseSensitive
31 * @param isRegex
32 * @return pattern
33 * @throws PatternSyntaxException
35 public static Pattern createPattern(String pattern,
36 boolean isCaseSensitive, boolean isRegex)
37 throws PatternSyntaxException {
38 return PatternConstructor.createPattern(pattern, isCaseSensitive,
39 isRegex);