String (@Nullable OrderEntry orderEntry, @NotNull VirtualFile sourceRootOfFile) { if (orderEntry instanceof ModuleSourceOrderEntry) { for (ContentEntry e : ((ModuleSourceOrderEntry)orderEntry).getRootModel().getContentEntries()) { for (SourceFolder sf : e.getSourceFolders(JavaModuleSourceRootTypes.SOURCES)) { if (sourceRootOfFile.equals(sf.getFile())) { String s = sf.getPackagePrefix(); if (!s.isEmpty()) { return s; } } } } } return ""; }