@NotNull
    private static String getVersion(@NotNull IdeaPluginDescriptor plugin) {
      if (!plugin.isBundled()) {
        return Objects.requireNonNull(plugin.getVersion());
      }

      ApplicationInfo appInfo = ApplicationInfo.getInstance();
      BuildNumber build = appInfo.getBuild();
      if (!build.isSnapshot()) {
        return build.asString();
      }

      // there is no good way to decide whether to update resources or not when switching to a different development build.
      return build.getProductCode() + "-" + build.getBaselineVersion() + "-" + appInfo.getBuildDate().getTimeInMillis();
    }
@NotNull
    private static String getVersion(@NotNull IdeaPluginDescriptor plugin)