logic: updated Java indexer

this fixes a lot of unsolved-symbol issues.
This commit is contained in:
malte_langkabel
2017-01-10 14:04:26 +01:00
parent d2ad2da1f1
commit 86def95c31
28 changed files with 893 additions and 1389 deletions
+12 -4
View File
@@ -2,6 +2,9 @@ package io.coati;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import com.github.javaparser.Position;
public class FileContent
{
@@ -26,13 +29,18 @@ public class FileContent
public Location find(String s)
{
return find(s, 1, 1);
return find(s, Position.pos(1, 1));
}
public Location find(String s, int fromLine, int fromColumn)
public Location find(String s, Optional<Position> from)
{
int lineIndex = fromLine - 1;
int startColumn = fromColumn - 1;
return find(s, from.orElse(Position.pos(1, 1)));
}
public Location find(String s, Position from)
{
int lineIndex = from.line - 1;
int startColumn = from.column - 1;
int column = -1;
while (lineIndex < m_lines.size())
{