Java DefaultRegExpPropertiesProvider Example

Introduction

The java defaultregexppropertiesprovider example is extracted from the most popular open source projects, you can refer to the following example for usage.

Programming language: Java

Namespace/package name: org.intellij.lang.regexp.psi

Example#1
File: RegExpLanguageHosts.javaProject: influencia0406/intellij-community

 @NotNull
 String[][] getKnownCharacterClasses(@NotNull final PsiElement element) {
   final RegExpLanguageHost host = findRegExpHost(element);
   return host != null
       ? host.getKnownCharacterClasses()
       : myDefaultProvider.getKnownCharacterClasses();
 }

Example#2
File: RegExpLanguageHosts.javaProject: influencia0406/intellij-community

 @Nullable
 String getPropertyDescription(@NotNull final PsiElement element, @Nullable final String name) {
   final RegExpLanguageHost host = findRegExpHost(element);
   return host != null
       ? host.getPropertyDescription(name)
       : myDefaultProvider.getPropertyDescription(name);
 }

Example#3
File: RegExpLanguageHosts.javaProject: influencia0406/intellij-community

 private RegExpLanguageHosts() {
   super("com.intellij.regExpLanguageHost");
   myDefaultProvider = DefaultRegExpPropertiesProvider.getInstance();
 }

Example#4
File: RegExpLanguageHosts.javaProject: influencia0406/intellij-community

 String[][] getPosixCharacterClasses(@NotNull final PsiElement element) {
   return myDefaultProvider.getPosixCharacterClasses();
 }

Example#5
File: RegExpLanguageHosts.javaProject: influencia0406/intellij-community

 @NotNull
 public String[][] getAllKnownProperties(@NotNull final PsiElement element) {
   final RegExpLanguageHost host = findRegExpHost(element);
   return host != null ? host.getAllKnownProperties() : myDefaultProvider.getAllKnownProperties();
 }

Example#6
File: RegExpLanguageHosts.javaProject: influencia0406/intellij-community

 public boolean isValidCategory(@NotNull final PsiElement element, @NotNull String category) {
   final RegExpLanguageHost host = findRegExpHost(element);
   return host != null
       ? host.isValidCategory(category)
       : myDefaultProvider.isValidCategory(category);
 }