]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/editor/TextAndErrors.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.scl.ui / src / org / simantics / scl / ui / editor / TextAndErrors.java
1 package org.simantics.scl.ui.editor;
2
3 import java.util.List;
4
5 import org.simantics.scl.compiler.errors.CompilationError;
6
7 public class TextAndErrors {
8
9         public final String text;
10         public final CompilationError[] errors;
11
12         public TextAndErrors(String text, CompilationError[] errors) {
13                 this.text = text;
14                 this.errors = errors;
15         }
16         
17         public static TextAndErrors createTextAndErrors(String text, List<CompilationError> errors) {
18                 return new TextAndErrors(text, errors.toArray(new CompilationError[errors.size()]));
19         }
20         
21 }