private void setCompletions( Set<String> keys ) {
			HashSet<String> keyParts = new HashSet<>();
			for( String key : keys ) {
				int delimIndex = key.length() + 1;
				while( (delimIndex = key.lastIndexOf( '.', delimIndex - 1 )) >= 0 )
					keyParts.add( key.substring( 0, delimIndex ) );
			}

			completions.clear();

			// add key parts
			for( String key : keyParts )
				completions.add( new BasicCompletion( this, key ) );

			// add all keys
			for( String key : keys ) {
				if( !keyParts.contains( key ) )
					completions.add( new BasicCompletion( this, key.concat( " = " ) ) );
			}

			Collections.sort( completions );
		}
A completion provider for keys, which always uses all known/predefined keys.
flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatCompletionProvider.java