本文整理了Java中org.raml.parser.visitor.YamlDocumentSuggester
类的一些代码示例,展示了YamlDocumentSuggester
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlDocumentSuggester
类的具体详情如下:
包路径:org.raml.parser.visitor.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;
}
内容来源于网络,如有侵权,请联系作者删除!