private static void generateClass( IJThemeInfo ti, String toPath, StringBuilder allInfos, StringBuilder markdownTable ) {
		String resourceName = ti.resourceName;
		String resourcePath = null;
		int resSep = resourceName.indexOf( '/' );
		if( resSep >= 0 ) {
			resourcePath = resourceName.substring( 0, resSep );
			resourceName = resourceName.substring( resSep + 1 );
		}

		String name = ti.name;
		int nameSep = name.indexOf( '/' );
		if( nameSep >= 0 )
			name = name.substring( nameSep + 1 ).trim();

		String themeName = name;
		StringBuilder buf = new StringBuilder();
		if( "material-theme-ui-lite".equals( resourcePath ) ) {
			themeName += " (Material)";
			buf.append( "MT" );
		}

		for( String n : name.split( "[ \\-]" ) ) {
			if( n.length() == 0 || n.equals( "-" ) )
				continue;

			if( Character.isUpperCase( n.charAt( 0 ) ) )
				buf.append( n );
			else
				buf.append( Character.toUpperCase( n.charAt( 0 ) ) ).append( n.substring( 1 ) );
		}

		String subPackage = (resourcePath != null) ? '.' + resourcePath.replace( "-", "" ) : "";
		String themeClass = "Flat" + buf + "IJTheme";
		String themeFile = resourceName;

		String classBody = (CLASS_HEADER + CLASS_TEMPLATE)
			.replace( "${subPackage}", subPackage )
			.replace( "${themeClass}", themeClass )
			.replace( "${themeFile}", themeFile )
			.replace( "${themeName}", themeName );

		File toDir = new File( toPath );
		if( resourcePath != null )
			toDir = new File( toDir, resourcePath.replace( "-", "" ) );

		Path out = new File( toDir, themeClass + ".java" ).toPath();
		writeFile( out, classBody );

		if( allInfos.length() > 0 )
			allInfos.append( '\n' );
		allInfos.append( THEME_TEMPLATE
			.replace( "${subPackage}", subPackage )
			.replace( "${themeClass}", themeClass )
			.replace( "${themeName}", themeName )
			.replace( "${dark}", Boolean.toString( ti.dark ) ) );

		markdownTable.append( String.format( "[%s](%s) | `com.formdev.flatlaf.intellijthemes%s.%s`\n",
			themeName, ti.sourceCodeUrl, subPackage, themeClass ) );
	}
This tool creates look and feel classes for all themes listed in themes.json.

@author Karl Tauber
flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesClassGenerator.java