-
Notifications
You must be signed in to change notification settings - Fork 42
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
Feature: ability to skip adding source directories if the directories do not exist #511
Feature: ability to skip adding source directories if the directories do not exist #511
Conversation
Hello @viktor-yengovatov , thank you very much for your efforts and contribution!!!
|
d4ee3e0
to
17f16f3
Compare
@@ -328,6 +330,10 @@ private static <P extends JpsElement> void addSourceFolderIfNotIgnored( | |||
@NotNull final List<File> dirsToIgnore | |||
) { | |||
if (dirsToIgnore.stream().noneMatch(it -> FileUtil.isAncestor(it, testSrcDir, false))) { | |||
final boolean ignoreEmpty = HybrisApplicationSettingsComponent.getInstance().getState().getIgnoreNonExistingSourceDirectories(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viktor-yengovatov , what do you think if we can refactor this part slightly and pass state of the HybrisApplicationSettingsComponent
to this class -> methods from the ImportProjectProgressModalWindow
by that we will get appSettings only once during import of all java modules?
variable can be declared in the public synchronized void run(@NotNull final ProgressIndicator indicator) {
of the ImportProjectProgressModalWindow
and then passed to createJavaModule
then to configuratorFactory.getContentRootConfigurator(moduleDescriptor).configure
and so on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, just take into account different target branch, I'll also change target branch for your PR #512
By this feature non exiting source directories like
kotlintestsrc
are excluded from source directories.The feature is disabled by default.
Signed-off-by: Your Real Name [email protected]