Codota Logo
YAMLKeyValue.getValueText
Code IndexAdd Codota to your IDE (free)

How to use
getValueText
method
in
org.jetbrains.yaml.psi.YAMLKeyValue

Best Java code snippets using org.jetbrains.yaml.psi.YAMLKeyValue.getValueText (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: Haehnchen/idea-php-symfony2-plugin

@Nullable
public static String getYamlKeyValueAsString(@NotNull YAMLMapping yamlHash, @NotNull String keyName) {
  YAMLKeyValue yamlKeyValue = getYamlKeyValue(yamlHash, keyName, false);
  if(yamlKeyValue == null) {
    return null;
  }
  final String valueText = yamlKeyValue.getValueText();
  if(StringUtils.isBlank(valueText)) {
    return null;
  }
  return valueText;
}
origin: Haehnchen/idea-php-symfony2-plugin

@Nullable
public static String getYamlKeyValueAsString(@Nullable YAMLCompoundValue yamlCompoundValue, String keyName, boolean ignoreCase) {
  YAMLKeyValue yamlKeyValue1 = getYamlKeyValue(yamlCompoundValue, keyName, ignoreCase);
  if(yamlKeyValue1 == null) {
    return null;
  }
  String valueText = yamlKeyValue1.getValueText();
  if (StringUtils.isBlank(valueText)) {
    return null;
  }
  return valueText;
}
origin: Haehnchen/idea-php-symfony2-plugin

String valueText = ((YAMLKeyValue) element).getValueText();
if(StringUtils.isBlank(valueText)) {
  continue;
origin: Haehnchen/idea-php-symfony2-plugin

public static void attachYamlFieldTypeName(String keyName, DoctrineModelField doctrineModelField, YAMLKeyValue yamlKeyValue) {
  if("fields".equals(keyName) || "id".equals(keyName)) {
    YAMLKeyValue yamlType = YamlHelper.getYamlKeyValue(yamlKeyValue, "type");
    if(yamlType != null) {
      doctrineModelField.setTypeName(yamlType.getValueText());
    }
    YAMLKeyValue yamlColumn = YamlHelper.getYamlKeyValue(yamlKeyValue, "column");
    if(yamlColumn != null) {
      doctrineModelField.setColumn(yamlColumn.getValueText());
    }
    return;
  }
  if(RELATIONS.contains(keyName.toLowerCase())) {
    YAMLKeyValue targetEntity = YamlHelper.getYamlKeyValue(yamlKeyValue, "targetEntity");
    if(targetEntity != null) {
      doctrineModelField.setRelationType(keyName);
      doctrineModelField.setRelation(getOrmClass(yamlKeyValue.getContainingFile(), targetEntity.getValueText()));
    }
  }
}
origin: Haehnchen/idea-php-symfony2-plugin

/**
 * Find controller definition in yaml structure
 *
 * foo:
 *   defaults: { _controller: "Bundle:Foo:Bar" }
 *   defaults:
 *      _controller: "Bundle:Foo:Bar"
 *   controller: "Bundle:Foo:Bar"
 */
@Nullable
public static String getYamlController(@NotNull YAMLKeyValue psiElement) {
  YAMLKeyValue yamlKeyValue = YamlHelper.getYamlKeyValue(psiElement, "defaults");
  if(yamlKeyValue != null) {
    final YAMLValue container = yamlKeyValue.getValue();
    if(container instanceof YAMLMapping) {
      YAMLKeyValue yamlKeyValueController = YamlHelper.getYamlKeyValue(container, "_controller", true);
      if(yamlKeyValueController != null) {
        String valueText = yamlKeyValueController.getValueText();
        if(StringUtils.isNotBlank(valueText)) {
          return valueText;
        }
      }
    }
  }
  String controller = YamlHelper.getYamlKeyValueAsString(psiElement, "controller");
  if(controller != null && StringUtils.isNotBlank(controller)) {
    return controller;
  }
  return null;
}
origin: Haehnchen/idea-php-symfony2-plugin

/**
 * Symfony 3.3: "class" is optional; use service name for its it
 *
 * Foo\Bar:
 *  arguments: ~
 */
@Nullable
public static String getServiceClassFromServiceMapping(@NotNull YAMLMapping yamlMapping) {
  YAMLKeyValue classKeyValue = yamlMapping.getKeyValueByKey("class");
  // Symfony 3.3: "class" is optional; use service id for class
  // Foo\Bar:
  //   arguments: ~
  if(classKeyValue != null) {
    return classKeyValue.getValueText();
  }
  PsiElement parent = yamlMapping.getParent();
  if(parent instanceof YAMLKeyValue) {
    String keyText = ((YAMLKeyValue) parent).getKeyText();
    if(YamlHelper.isClassServiceId(keyText)) {
      return keyText;
    }
  }
  return null;
}
origin: zalando/intellij-swagger

@Override
public void visitElement(final PsiElement element) {
 if (element instanceof YAMLKeyValue) {
  final YAMLKeyValue yamlKeyValue = (YAMLKeyValue) element;
  if (OpenApiConstants.REF_KEY.equals(yamlKeyValue.getKeyText())) {
   final String refValue = StringUtils.removeAllQuotes(yamlKeyValue.getValueText());
   if (isYamlFile(refValue)) {
    result.add(
      extractFileNameFromFileRefValue(refValue)
        + DELIMITER
        + getOpenApiFileTypeFromRefElement(yamlKeyValue.getValue(), refValue));
   }
  }
 }
 super.visitElement(element);
}
origin: zalando/intellij-swagger

@Override
public void visitElement(final PsiElement element) {
 if (element instanceof YAMLKeyValue) {
  final YAMLKeyValue yamlKeyValue = (YAMLKeyValue) element;
  if (SwaggerConstants.REF_KEY.equals(yamlKeyValue.getKeyText())) {
   final String refValue = StringUtils.removeAllQuotes(yamlKeyValue.getValueText());
   if (isYamlFile(refValue)) {
    result.add(
      extractFileNameFromFileRefValue(refValue)
        + DELIMITER
        + getSwaggerFileType(yamlKeyValue.getValue(), refValue));
   }
  }
 }
 super.visitElement(element);
}
origin: Haehnchen/idea-php-symfony2-plugin

/**
 * foo:
 *   resources: 'FOO'
 */
private static void visitYamlFile(@NotNull YAMLFile yamlFile, @NotNull Consumer<FileResourceConsumer> consumer) {
  for (YAMLKeyValue yamlKeyValue : YamlHelper.getTopLevelKeyValues(yamlFile)) {
    YAMLKeyValue resourceKey = YamlHelper.getYamlKeyValue(yamlKeyValue, "resource", true);
    if(resourceKey == null) {
      continue;
    }
    String resource = PsiElementUtils.trimQuote(resourceKey.getValueText());
    if(StringUtils.isBlank(resource)) {
      continue;
    }
    consumer.consume(new FileResourceConsumer(resourceKey, yamlKeyValue, normalize(resource)));
  }
}
origin: Haehnchen/idea-php-symfony2-plugin

private static void addYamlClassMethods(@Nullable PsiElement psiElement, CompletionResultSet completionResultSet, String classTag) {
  if(psiElement == null) {
    return;
  }
  YAMLKeyValue classKeyValue = PsiElementUtils.getChildrenOfType(psiElement, PlatformPatterns.psiElement(YAMLKeyValue.class).withName(classTag));
  if(classKeyValue == null) {
    return;
  }
  PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), classKeyValue.getValueText());
  if(phpClass != null) {
    PhpElementsUtil.addClassPublicMethodCompletion(completionResultSet, phpClass);
  }
}
origin: Haehnchen/idea-php-symfony2-plugin

YAMLKeyValue classKeyValue = parentMapping.getKeyValueByKey("class");
if (classKeyValue != null) {
  String valueText = classKeyValue.getValueText();
  if (StringUtils.isNotBlank(valueText)) {
    return valueText;
origin: Haehnchen/idea-php-symfony2-plugin

  valueText = ((YAMLKeyValue) element).getValueText();
} else {
origin: Haehnchen/idea-php-symfony2-plugin

String routePath = path.getValueText();
if(StringUtils.isNotBlank(routePath)) {
  route.setPath(routePath);
origin: Haehnchen/idea-php-symfony2-plugin

String valueText = ((YAMLKeyValue) yamlKeyValue).getValueText();
if(StringUtils.isBlank(valueText)) {
  return;
origin: Haehnchen/idea-php-symfony2-plugin

if(classKeyValue != null) {
  String valueText = classKeyValue.getValueText();
  if(StringUtils.isNotBlank(valueText)) {
    consumer.consume(valueText);
org.jetbrains.yaml.psiYAMLKeyValuegetValueText

Popular methods of YAMLKeyValue

  • getKeyText
  • getKey
  • getName
  • getValue
  • getContainingFile
  • getFirstChild
  • getLastChild
  • getParent
  • getParentMapping
  • getProject
  • getText
  • getTextRange
  • getText,
  • getTextRange,
  • getYAMLElements

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • String (java.lang)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now