File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
src/com/magento/idea/magento2plugin/actions/generation/generator Expand file tree Collapse file tree 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.
44
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0 ) .
66
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+
715## 2.0.0
816
917### Added
Original file line number Diff line number Diff line change 1313import com .intellij .psi .PsiDirectory ;
1414import com .intellij .psi .PsiFile ;
1515import com .maddyhome .idea .copyright .actions .UpdateCopyrightProcessor ;
16+ import com .magento .idea .magento2plugin .actions .generation .generator .util .DirectoryGenerator ;
1617import com .magento .idea .magento2plugin .bundles .ValidatorBundle ;
1718import com .magento .idea .magento2plugin .indexes .ModuleIndex ;
1819import com .magento .idea .magento2plugin .magento .packages .Areas ;
@@ -126,16 +127,9 @@ private PsiDirectory getTargetDirectory(
126127 PsiDirectory directory , //NOPMD
127128 final List <String > pathComponents
128129 ) {
130+ DirectoryGenerator generator = DirectoryGenerator .getInstance ();
129131 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 );
139133 }
140134
141135 return directory ;
You can’t perform that action at this time.
0 commit comments