DataContext (Component component) { ThreadingAssertions.assertEventDispatchThread(); if (ourGetDataLevel.get()[0] > 0) { LOG.error("DataContext shall not be created and queried inside another getData() call."); } if (component instanceof DependentTransientComponent) { LOG.assertTrue(getDataProviderEx(component) == null, "DependentTransientComponent must not yield DataProvider"); } Component adjusted = component instanceof DependentTransientComponent ? ((DependentTransientComponent)component).getPermanentComponent() : component; return IdeUiService.getInstance().createUiDataContext(adjusted); }