@Nullable public static String getStringValueOfKeyInProbablyMapping(@Nullable YAMLValue node, @NotNull String keyText) { YAMLKeyValue mapping = YAMLUtil.findKeyInProbablyMapping(node, keyText); if(mapping == null) { return null; } YAMLValue value = mapping.getValue(); if(value == null) { return null; } return value.getText(); }
for (YAMLPsiElement element : value.getYAMLElements()) { if(!(element instanceof YAMLKeyValue)) { continue;
appendEndOffset = yamlCompoundValue.getTextRange().getEndOffset(); insertString = eol + StringUtils.join(yamlSequences, eol);
@Override public boolean isUniqueArrayStringValue(final String value, final PsiElement psiElement) { return Optional.ofNullable(psiElement.getParent()) .map(PsiElement::getParent) .map(PsiElement::getParent) .filter(el -> el instanceof YAMLSequence) .map(el -> Arrays.asList(el.getChildren())) .map(children -> children.stream().filter(c -> c instanceof YAMLSequenceItem)) .map(childrenStream -> childrenStream.map(YAMLSequenceItem.class::cast)) .map( childrenStream -> childrenStream.noneMatch( item -> item.getValue() != null && value.equals( StringUtils.removeAllQuotes(item.getValue().getText())))) .orElse(true); }
for (YAMLPsiElement element : value.getYAMLElements()) { if(!(element instanceof YAMLKeyValue)) { continue;
for (YAMLPsiElement yamlPsiElement : value.getYAMLElements()) { if(!(yamlPsiElement instanceof YAMLKeyValue)) { continue; for (YAMLPsiElement yamlPsiElement : value.getYAMLElements()) { if(!(yamlPsiElement instanceof YAMLSequenceItem)) { continue;