void () { myFixture.configureByFile(getTestName(false)+".java"); Map<String, RangeMarker> sliceUsageName2Offset = SliceTestUtil.extractSliceOffsetsFromDocument(getEditor().getDocument()); PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); PsiElement element = SliceHandler.create(false).getExpressionAtCaret(getEditor(), getFile()); assertNotNull(element); SliceTestUtil.Node tree = SliceTestUtil.buildTree(element, sliceUsageName2Offset); Collection<HighlightInfo> errors = myFixture.doHighlighting(HighlightSeverity.ERROR); assertEmpty(errors); SliceAnalysisParams params = new SliceAnalysisParams(); params.scope = new AnalysisScope(getProject()); params.dataFlowToThis = false; SliceUsage usage = LanguageSlicing.getProvider(element).createRootUsage(element, params); SliceTestUtil.checkUsages(usage, tree); }