public IpnbPyFragment(
     Project project, CharSequence text, boolean isPhysical, IpnbCodeSourcePanel codeSourcePanel) {
   super(
       PsiManagerEx.getInstanceEx(project)
           .getFileManager()
           .createFileViewProvider(
               new LightVirtualFile("code.py", IpnbPyLanguageDialect.getInstance(), text),
               isPhysical));
   myPhysical = isPhysical;
   myCodeSourcePanel = codeSourcePanel;
   myFilePanel = codeSourcePanel.getIpnbCodePanel().getFileEditor().getIpnbFilePanel();
   ((SingleRootFileViewProvider) getViewProvider()).forceCachedPsi(this);
 }
 public JavaFileManagerImpl(Project project) {
   myManager = PsiManagerEx.getInstanceEx(project);
   myPackageIndex = PackageIndex.getInstance(myManager.getProject());
   project
       .getMessageBus()
       .connect()
       .subscribe(
           ProjectTopics.PROJECT_ROOTS,
           new ModuleRootAdapter() {
             @Override
             public void rootsChanged(final ModuleRootEvent event) {
               myNontrivialPackagePrefixes = null;
             }
           });
 }