Skip to content

619: Overriding layouts and templates allows to select an incompatibl… #930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.magento.idea.magento2plugin.actions.generation.dialog.validator.rule.NotEmptyRule;
import com.magento.idea.magento2plugin.actions.generation.generator.OverrideInThemeGenerator;
import com.magento.idea.magento2plugin.indexes.ModuleIndex;
import com.magento.idea.magento2plugin.magento.packages.Areas;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
Expand Down Expand Up @@ -131,9 +132,13 @@ public static void open(final @NotNull Project project, final PsiFile psiFile) {
}

private void fillThemeOptions() {
final String area = psiFile.getVirtualFile().getPath().split("view/")[1].split("/")[0];
final List<String> themeNames = new ModuleIndex(project).getEditableThemeNames();
for (final String themeName: themeNames) {
theme.addItem(themeName);

for (final String themeName : themeNames) {
if (Areas.base.toString().equals(area) || themeName.split("/")[0].equals(area)) {
theme.addItem(themeName);
}
}
}
}