gpt4 book ai didi

org.raml.parser.visitor.YamlDocumentSuggester类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 18:07:31 28 4
gpt4 key购买 nike

本文整理了Java中org.raml.parser.visitor.YamlDocumentSuggester类的一些代码示例,展示了YamlDocumentSuggester类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlDocumentSuggester类的具体详情如下:
包路径:org.raml.parser.visitor.YamlDocumentSuggester
类名称:YamlDocumentSuggester

YamlDocumentSuggester介绍

暂无

代码示例

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

private String digestSuggestRaml(String topSection, String bottomSection, int contextColumn)
{
  if (bottomSection == null)
  {
    return trimTrailingComments(topSection);
  }
  String bottom = digestBottomSection(bottomSection, contextColumn);
  return trimTrailingComments(topSection + "\n" + bottom);
}

代码示例来源:origin: org.raml/raml-parser

@Override
public boolean onDocumentStart(MappingNode node)
{
  if (node == null)
  {
    pushNode(0, null);
  }
  else
  {
    pushNode(node, node);
  }
  return builder.onDocumentStart(node);
}

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

public List<Suggestion> suggest(String topSection, String context)
{
  return suggest(topSection, context, null);
}

代码示例来源:origin: org.raml/raml-parser

int contextColumn = calculateContextColumn(context);
String suggestRaml = digestSuggestRaml(topSection, bottomSection, contextColumn);
this.offset = suggestRaml.length();
if (offset == 0)
while (!nodes.isEmpty())
  nodeContext = popNode();
  parentNodeBuilder = (NodeBuilder) this.builder.getBuilderContext().pop();
  if (nodeContext.getParentIndentation() < contextColumn)
if (!isContextInValue(context))
  addKeySuggestions(context, result, parentNodeBuilder, nodeContext);

代码示例来源:origin: org.raml/raml-parser

@Override
public void onTupleEnd(NodeTuple nodeTuple)
{
  Node valueNode = nodeTuple.getValueNode();
  if (validateOffset(valueNode))
  {
    popNode();
    builder.onTupleEnd(nodeTuple);
  }
}

代码示例来源:origin: org.raml/raml-parser

@Override
public void onSequenceEnd(SequenceNode node, TupleType tupleType)
{
  popNode();
  builder.onSequenceEnd(node, tupleType);
}

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

int contextColumn = calculateContextColumn(context);
String suggestRaml = digestSuggestRaml(topSection, bottomSection, contextColumn);
this.offset = suggestRaml.length();
if (offset == 0)
while (!nodes.isEmpty())
  nodeContext = popNode();
  parentNodeBuilder = (NodeBuilder) this.builder.getBuilderContext().pop();
  if (nodeContext.getParentIndentation() < contextColumn)
if (!isContextInValue(context))
  addKeySuggestions(context, result, parentNodeBuilder, nodeContext);

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

@Override
public void onTupleEnd(NodeTuple nodeTuple)
{
  Node valueNode = nodeTuple.getValueNode();
  if (validateOffset(valueNode))
  {
    popNode();
    builder.onTupleEnd(nodeTuple);
  }
}

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

@Override
public void onSequenceEnd(SequenceNode node, TupleType tupleType)
{
  popNode();
  builder.onSequenceEnd(node, tupleType);
}

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

@Override
public boolean onDocumentStart(MappingNode node)
{
  if (node == null)
  {
    pushNode(0, null);
  }
  else
  {
    pushNode(node, node);
  }
  return builder.onDocumentStart(node);
}

代码示例来源:origin: org.raml/raml-parser

private String digestSuggestRaml(String topSection, String bottomSection, int contextColumn)
{
  if (bottomSection == null)
  {
    return trimTrailingComments(topSection);
  }
  String bottom = digestBottomSection(bottomSection, contextColumn);
  return trimTrailingComments(topSection + "\n" + bottom);
}

代码示例来源:origin: org.raml/raml-parser

public List<Suggestion> suggest(String topSection, String context)
{
  return suggest(topSection, context, null);
}

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

@Override
@SuppressWarnings("unchecked")
public boolean onSequenceStart(SequenceNode node, TupleType tupleType)
{
  pushNode(node, null);
  return builder.onSequenceStart(node, tupleType);
}

代码示例来源:origin: org.raml/raml-parser

@Override
@SuppressWarnings("unchecked")
public boolean onSequenceStart(SequenceNode node, TupleType tupleType)
{
  pushNode(node, null);
  return builder.onSequenceStart(node, tupleType);
}

代码示例来源:origin: org.raml/raml-parser

private void pushNode(Node node, MappingNode mappingNode)
{
  pushNode(node.getStartMark().getColumn(), mappingNode);
}

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

private void pushNode(Node node, MappingNode mappingNode)
{
  pushNode(node.getStartMark().getColumn(), mappingNode);
}

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

@Override
public boolean onTupleStart(NodeTuple nodeTuple)
{
  try
  {
    builder.onTupleStart(nodeTuple);
    MappingNode mapping = nodeTuple.getValueNode().getNodeId() == NodeId.mapping ? (MappingNode) nodeTuple.getValueNode() : null;
    pushNode(nodeTuple.getKeyNode(), mapping);
  }
  catch (Exception e)
  {
    return false;
  }
  return true;
}

代码示例来源:origin: org.raml/raml-parser

@Override
public boolean onTupleStart(NodeTuple nodeTuple)
{
  try
  {
    builder.onTupleStart(nodeTuple);
    MappingNode mapping = nodeTuple.getValueNode().getNodeId() == NodeId.mapping ? (MappingNode) nodeTuple.getValueNode() : null;
    pushNode(nodeTuple.getKeyNode(), mapping);
  }
  catch (Exception e)
  {
    return false;
  }
  return true;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com