File (@NotNull String moduleName, @NotNull String relativePath) { @NonNls String jarPath = PathUtil.getJarPathForClass(PythonHelpersLocator.class); if (PluginManagerCore.isRunningFromSources()) { return new File(PathManager.getCommunityHomePath() + relativePath); } else { final File pluginBaseDir = getPluginBaseDir(jarPath); if (pluginBaseDir != null) { return new File(pluginBaseDir, PathUtil.getFileName(relativePath)); } else { return new File(new File(jarPath).getParentFile(), moduleName); } } }