use of org.eclipse.che.jdt.javaeditor.SemanticHighlightingReconciler in project che by eclipse.
the class ReconcileTest method init.
@Before
public void init() throws Exception {
reconciler = new JavaReconciler(new SemanticHighlightingReconciler());
//.getWorkingCopy(this.wcOwner, null);
this.workingCopy = project.findType("p1.X").getCompilationUnit();
}
use of org.eclipse.che.jdt.javaeditor.SemanticHighlightingReconciler in project che by eclipse.
the class ReconcileTest method testSemanticHighlight.
@Test
public void testSemanticHighlight() throws Exception {
IType type = project.findType("java.lang.Object");
ICompilationUnit copy = type.getClassFile().getWorkingCopy(DefaultWorkingCopyOwner.PRIMARY, null);
CompilationUnit unit = copy.reconcile(AST.JLS8, true, DefaultWorkingCopyOwner.PRIMARY, null);
SemanticHighlightingReconciler reconciler = new SemanticHighlightingReconciler();
List<HighlightedPosition> positions = reconciler.reconcileSemanticHighlight(unit);
assertThat(positions).isNotNull().isNotEmpty();
}
Aggregations