Search in sources :

Example 6 with Value

use of org.springframework.ide.vscode.java.properties.parser.PropertiesAst.Value in project sts4 by spring-projects.

the class PropertiesAstTest method positionEmptyValue.

@Test
public void positionEmptyValue() throws Exception {
    ParseResults results = parser.parse("# Comment\n" + "key  =");
    Node node = results.ast.findNode(16);
    assertTrue(node instanceof Value);
    assertTrue(node.getOffset() <= 16 && 16 <= node.getOffset() + node.getLength());
}
Also used : Node(org.springframework.ide.vscode.java.properties.parser.PropertiesAst.Node) Value(org.springframework.ide.vscode.java.properties.parser.PropertiesAst.Value) ParseResults(org.springframework.ide.vscode.java.properties.parser.ParseResults) Test(org.junit.Test)

Aggregations

ParseResults (org.springframework.ide.vscode.java.properties.parser.ParseResults)6 Node (org.springframework.ide.vscode.java.properties.parser.PropertiesAst.Node)6 Value (org.springframework.ide.vscode.java.properties.parser.PropertiesAst.Value)6 Test (org.junit.Test)3 Key (org.springframework.ide.vscode.java.properties.parser.PropertiesAst.Key)3 ImmutableList (com.google.common.collect.ImmutableList)1 Builder (com.google.common.collect.ImmutableList.Builder)1 Collection (java.util.Collection)1 Optional (java.util.Optional)1 SPACES (org.springframework.ide.vscode.boot.common.CommonLanguageTools.SPACES)1 CommonLanguageTools.getValueHints (org.springframework.ide.vscode.boot.common.CommonLanguageTools.getValueHints)1 CommonLanguageTools.getValueType (org.springframework.ide.vscode.boot.common.CommonLanguageTools.getValueType)1 InformationTemplates (org.springframework.ide.vscode.boot.common.InformationTemplates)1 PropertyInfo (org.springframework.ide.vscode.boot.metadata.PropertyInfo)1 SpringPropertyIndex (org.springframework.ide.vscode.boot.metadata.SpringPropertyIndex)1 StsValueHint (org.springframework.ide.vscode.boot.metadata.hints.StsValueHint)1 Type (org.springframework.ide.vscode.boot.metadata.types.Type)1 TypeUtil (org.springframework.ide.vscode.boot.metadata.types.TypeUtil)1 EnumCaseMode (org.springframework.ide.vscode.boot.metadata.types.TypeUtil.EnumCaseMode)1 IJavaProject (org.springframework.ide.vscode.commons.java.IJavaProject)1