File tree 2 files changed +11
-9
lines changed
src/com/magento/idea/magento2plugin/actions/generation/generator
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0 ) .
6
6
7
+ ## 2.0.1
8
+
9
+ ### Fixed
10
+
11
+ - Directories structure for the override in theme action
12
+ - Constant disabling plugin on startup if Magento not in the root
13
+ - New module generation for the default Magento version
14
+
7
15
## 2.0.0
8
16
9
17
### Added
Original file line number Diff line number Diff line change 13
13
import com .intellij .psi .PsiDirectory ;
14
14
import com .intellij .psi .PsiFile ;
15
15
import com .maddyhome .idea .copyright .actions .UpdateCopyrightProcessor ;
16
+ import com .magento .idea .magento2plugin .actions .generation .generator .util .DirectoryGenerator ;
16
17
import com .magento .idea .magento2plugin .bundles .ValidatorBundle ;
17
18
import com .magento .idea .magento2plugin .indexes .ModuleIndex ;
18
19
import com .magento .idea .magento2plugin .magento .packages .Areas ;
@@ -126,16 +127,9 @@ private PsiDirectory getTargetDirectory(
126
127
PsiDirectory directory , //NOPMD
127
128
final List <String > pathComponents
128
129
) {
130
+ final DirectoryGenerator generator = DirectoryGenerator .getInstance ();
129
131
for (final String directoryName : pathComponents ) {
130
- if (directory .findSubdirectory (directoryName ) != null ) { //NOPMD
131
- directory = directory .findSubdirectory (directoryName );
132
- } else {
133
- final PsiDirectory finalDirectory = directory ;
134
- ApplicationManager .getApplication ().runWriteAction (() -> {
135
- finalDirectory .createSubdirectory (directoryName );
136
- });
137
- return finalDirectory ;
138
- }
132
+ directory = generator .findOrCreateSubdirectory (directory , directoryName );
139
133
}
140
134
141
135
return directory ;
You can’t perform that action at this time.
0 commit comments