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
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
;
21 * Pattern constructor utilities to localize warnings from using internal
22 * {@link PatternConstructor} class.
24 public abstract class PatternUtils
{
30 * @param isCaseSensitive
33 * @throws PatternSyntaxException
35 public static Pattern
createPattern(String pattern
,
36 boolean isCaseSensitive
, boolean isRegex
)
37 throws PatternSyntaxException
{
38 return PatternConstructor
.createPattern(pattern
, isCaseSensitive
,