mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
RegExp: make getPattern() @NotNull
GitOrigin-RevId: 82b8089e824064f72212dd1086f66ef7fff34a55
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5958ca6260
commit
264aeca72a
@@ -16,14 +16,14 @@
|
||||
package org.intellij.lang.regexp.psi;
|
||||
|
||||
import com.intellij.psi.PsiNamedElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface RegExpGroup extends RegExpAtom, PsiNamedElement {
|
||||
|
||||
boolean isCapturing();
|
||||
|
||||
@Nullable
|
||||
RegExpPattern getPattern();
|
||||
@NotNull RegExpPattern getPattern();
|
||||
|
||||
/** @deprecated use #getType() */
|
||||
@Deprecated
|
||||
|
||||
@@ -38,9 +38,10 @@ public class RegExpGroupImpl extends RegExpElementImpl implements RegExpGroup {
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegExpPattern getPattern() {
|
||||
public @NotNull RegExpPattern getPattern() {
|
||||
final ASTNode node = getNode().findChildByType(RegExpElementTypes.PATTERN);
|
||||
return node != null ? (RegExpPattern)node.getPsi() : null;
|
||||
assert node != null;
|
||||
return (RegExpPattern)node.getPsi();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user