private KeyValue getKeyValueAtLine( int line ) {
		try {
			// get text at line
			int startOffset = textArea.getLineStartOffset( line );
			int endOffset = textArea.getLineEndOffset( line );
			String text = textArea.getText( startOffset, endOffset - startOffset );

			// remove trailing backslash from multi-line properties usually used for styles
			if( text.endsWith( "\\\n" ) )
				text = text.substring( 0, text.length() - 2 ).trim();
			// remove trailing semicolon from styles
			if( text.endsWith( ";" ) )
				text = text.substring( 0, text.length() - 1 ).trim();

			// remove key starting with "[style]" so that first property name
			// in CSS styled value is used as key to detect value type
			if( text.startsWith( "[style]" ) ) {
				int sepIndex = text.indexOf( '=' );
				if( sepIndex >= 0 )
					text = text.substring( sepIndex + 1 );
			}

			// parse line
			Properties properties = new Properties();
			properties.load( new StringReader( text ) );
			if( properties.isEmpty() )
				return null;

			// get key and value for line
			String key = (String) properties.keys().nextElement();
			String value = properties.getProperty( key );
			return new KeyValue( key, value );
		} catch( BadLocationException | IOException ex ) {
			// ignore
			return null;
		}
	}
Supports parsing content of text area in FlatLaf properties syntax.

@author Karl Tauber
flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemePropertiesSupport.java