void () { String templateName = getTemplateName(); if (templateName == null) return; if (myShowJavaCodeInfo) { myJavaCodeInfoPanel.setVisible(showResourceBundleTextField(templateName, myProject)); } ReadAction .nonBlocking(() -> JavaI18nUtil.suggestExpressionOfType(myResourceBundleType, myLiteralExpression.getSourcePsi())) .finishOnUiThread(ModalityState.any(), suggestedBundles -> { if (suggestedBundles.isEmpty()) { suggestedBundles.add(getResourceBundleText()); ContainerUtil.addIfNotNull(suggestedBundles, PropertiesComponent.getInstance(myProject).getValue(RESOURCE_BUNDLE_EXPRESSION_USED)); } myRBEditorTextField.setHistory(ArrayUtilRt.toStringArray(suggestedBundles)); myRBEditorTextField.setSelectedIndex(0); }) .submit(PooledThreadExecutor.INSTANCE); }