mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DRY: use same xml file detection
This commit is contained in:
@@ -74,7 +74,7 @@ public class XmlSlashTypedHandler extends TypedHandlerDelegate {
|
||||
@Override
|
||||
public Result charTyped(final char c, final Project project, @NotNull final Editor editor, @NotNull final PsiFile editedFile) {
|
||||
if (!WebEditorOptions.getInstance().isAutoCloseTag()) return Result.CONTINUE;
|
||||
if ((editedFile.getLanguage() instanceof XMLLanguage || editedFile.getViewProvider().getBaseLanguage() instanceof XMLLanguage) && c == '/') {
|
||||
if ((XmlGtTypedHandler.fileContainsXmlLanguage(editedFile)) && c == '/') {
|
||||
PsiDocumentManager.getInstance(project).commitAllDocuments();
|
||||
|
||||
PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
|
||||
|
||||
Reference in New Issue
Block a user