Skip to content

Commit

Permalink
#232 | Not all extension names shown in the code completion
Browse files Browse the repository at this point in the history
  • Loading branch information
mlytvyn authored Feb 19, 2023
1 parent 3cd6f74 commit 9f67d2f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions resources/META-INF/plugin-release-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
<li><i>Feature:</i> Disable spell check for properties with custom named values (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/228" target="_blank" rel="nofollow">#228</a>)</li>
<li><i>Bug Fix:</i> Impex & FlexibleSearch actions always visible (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/issues/223" target="_blank" rel="nofollow">#223</a>)</li>
<li><i>Bug Fix:</i> SAP Commerce Project specific Settings should be visible only for [y] projects (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/issues/206" target="_blank" rel="nofollow">#206</a>)</li>
<li><i>Bug Fix:</i> Not all extension names shown in the code completion (project refresh required)</req> (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/issues/232" target="_blank" rel="nofollow">#232</a>)</li>
<li><i>Other:</i> Upgraded to Gradle 8 (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/222" target="_blank" rel="nofollow">#222</a>)</li>
</ul>
<h3>2022.3.1</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;

import static com.intellij.idea.plugin.hybris.common.HybrisConstants.DICTIONARY_NAME;
Expand Down Expand Up @@ -285,11 +286,11 @@ private Module createJavaModule(

private List<HybrisModuleDescriptor> getHybrisModuleDescriptors() {
return hybrisProjectDescriptor
.getModulesChosenForImport()
.stream()
.filter(e -> !(e instanceof MavenModuleDescriptor))
.filter(e -> !(e instanceof EclipseModuleDescriptor))
.filter(e -> !(e instanceof GradleModuleDescriptor))
.getModulesChosenForImport().stream()
.filter(e -> !(e instanceof MavenModuleDescriptor)
&& !(e instanceof EclipseModuleDescriptor)
&& !(e instanceof GradleModuleDescriptor)
)
.collect(Collectors.toList());
}

Expand All @@ -313,7 +314,7 @@ private void configureEclipseModules(final @NotNull ProgressIndicator indicator,
final List<EclipseModuleDescriptor> eclipseModules = hybrisProjectDescriptor
.getModulesChosenForImport()
.stream()
.filter(e -> e instanceof EclipseModuleDescriptor)
.filter(EclipseModuleDescriptor.class::isInstance)
.map(EclipseModuleDescriptor.class::cast)
.collect(Collectors.toList());
if (!eclipseModules.isEmpty()) {
Expand All @@ -336,7 +337,7 @@ private void configureGradleModules(final @NotNull ProgressIndicator indicator,
final List<GradleModuleDescriptor> gradleModules = hybrisProjectDescriptor
.getModulesChosenForImport()
.stream()
.filter(e -> e instanceof GradleModuleDescriptor)
.filter(GradleModuleDescriptor.class::isInstance)
.map(GradleModuleDescriptor.class::cast)
.collect(Collectors.toList());
if (!gradleModules.isEmpty()) {
Expand Down Expand Up @@ -479,7 +480,10 @@ private void saveImportedSettings(final Project project) {
hybrisProjectSettings.setJavadocUrl(hybrisProjectDescriptor.getJavadocUrl());
final Set<String> completeSetOfHybrisModules = new HashSet<>();
hybrisProjectDescriptor.getFoundModules().stream()
.filter(e -> e instanceof OotbHybrisModuleDescriptor || e instanceof CustomHybrisModuleDescriptor)
.filter(e -> !(e instanceof MavenModuleDescriptor)
&& !(e instanceof EclipseModuleDescriptor)
&& !(e instanceof GradleModuleDescriptor)
)
.forEach(e -> completeSetOfHybrisModules.add(e.getName()));
hybrisProjectSettings.setCompleteSetOfAvailableExtensionsInHybris(completeSetOfHybrisModules);
hybrisProjectSettings.setExcludeTestSources(hybrisProjectDescriptor.isExcludeTestSources());
Expand Down

0 comments on commit 9f67d2f

Please sign in to comment.