@@ -0,0 +1,1084 @@
+package com.cedricziel.idea.typo3.util;%0A%0Aimport com.intellij.ide.IdeView;%0Aimport com.intellij.openapi.actionSystem.AnActionEvent;%0Aimport com.intellij.openapi.actionSystem.DataContext;%0Aimport com.intellij.openapi.actionSystem.LangDataKeys;%0Aimport com.intellij.openapi.actionSystem.PlatformDataKeys;%0Aimport com.intellij.openapi.project.Project;%0Aimport com.intellij.psi.PsiDirectory;%0Aimport org.jetbrains.annotations.NotNull;%0A%0Apublic class ExtensionUtility %7B%0A%0A    public static PsiDirectory getExtensionDirectory(@NotNull AnActionEvent event) %7B%0A        Project project = event.getData(PlatformDataKeys.PROJECT);%0A        if (project == null) %7B%0A            return null;%0A        %7D%0A%0A        DataContext dataContext = event.getDataContext();%0A        IdeView view = LangDataKeys.IDE_VIEW.getData(dataContext);%0A        if (view == null) %7B%0A            return null;%0A        %7D%0A%0A        PsiDirectory%5B%5D directories = view.getDirectories();%0A        if (directories.length == 0) %7B%0A            return null;%0A        %7D%0A%0A        return FilesystemUtil.findParentExtensionDirectory(directories%5B0%5D);%0A    %7D%0A%7D%0A

Add ExtensionUtility::getExtensionDirectory