1414import com .intellij .openapi .extensions .PluginId ;
1515import com .intellij .openapi .project .Project ;
1616import com .intellij .openapi .vfs .VfsUtil ;
17+ import com .intellij .psi .search .FilenameIndex ;
18+ import com .intellij .psi .search .GlobalSearchScope ;
1719import com .intellij .util .indexing .FileBasedIndex ;
1820import org .jetbrains .annotations .NotNull ;
1921import org .jetbrains .annotations .Nullable ;
@@ -89,7 +91,7 @@ public boolean isEnabled(@Nullable Project project) {
8991 }
9092
9193 private void checkProject () {
92- if (!this .isEnabled (project ) && !notificationIsDismissed () && containsTYPO3Libraries ()) {
94+ if (!this .isEnabled (project ) && !notificationIsDismissed () && containsPluginRelatedFiles ()) {
9395 IdeHelper .notifyEnableMessage (project );
9496 }
9597 }
@@ -99,8 +101,8 @@ private boolean notificationIsDismissed() {
99101 return TYPO3CMSProjectSettings .getInstance (project ).dismissEnableNotification ;
100102 }
101103
102- private boolean containsTYPO3Libraries () {
103-
104- return VfsUtil . findRelativeFile ( this . project . getBaseDir () , "vendor " , "typo3" ) != null ;
104+ private boolean containsPluginRelatedFiles () {
105+ return ( VfsUtil . findRelativeFile ( this . project . getBaseDir (), "vendor" , "typo3" ) != null )
106+ || FilenameIndex . getFilesByName ( project , "ext_emconf.php " , GlobalSearchScope . allScope ( project )). length > 0 ;
105107 }
106108}
0 commit comments