1 package org.simantics.graph.compiler;
\r
3 import java.util.List;
\r
5 import org.simantics.databoard.Bindings;
\r
6 import org.simantics.databoard.binding.Binding;
\r
7 import org.simantics.databoard.serialization.Serializer;
\r
9 public class SourceInfo {
\r
10 public static final Binding BINDING = Bindings.getBindingUnchecked(SourceInfo.class);
\r
11 public static final Serializer SERIALIZER = Bindings.getSerializerUnchecked(BINDING);
\r
13 public List<SourceFile> sourceFiles;
\r
15 public static class SourceFile {
\r
17 public List<Variable> variables;
\r
18 public List<DefinitionPosition> definitionPositions;
\r
20 public SourceFile(String name, List<Variable> variables, List<DefinitionPosition> definitionPositions) {
\r
22 this.variables = variables;
\r
23 this.definitionPositions = definitionPositions;
\r
27 public static class Variable {
\r
28 public String name;
\r
29 public int resource;
\r
31 public Variable(String name, int resource) {
\r
33 this.resource = resource;
\r
37 public static class DefinitionPosition {
\r
38 public int resource;
\r
43 public DefinitionPosition(int resource, int line, int begin, int end) {
\r
44 this.resource = resource;
\r
51 public SourceInfo(List<SourceFile> sourceFiles) {
\r
52 this.sourceFiles = sourceFiles;
\r