Skip to content
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

Configure IDEA import only on run integration #220

Closed
Closed
Show file tree
Hide file tree
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 @@ -191,7 +191,7 @@ public void apply(final IdeImportAction toPerform) {
public void onIdea(final IdeaIdeImportAction toPerform) {
//When the IDEA plugin is available, configure it
project.getPlugins().withType(IdeaExtPlugin.class, plugin -> {
if (!isIdeaImport()) {
if (!toPerform.shouldConfigureIdeaImport()) {
//No IDEA import even though the plugin is available, so don't configure it.
return;
}
Expand Down Expand Up @@ -289,6 +289,13 @@ public interface IdeaIdeImportAction {
* @param ideaExtension JetBrain's extensions to the base idea model
*/
void idea(Project project, IdeaModel idea, ProjectSettings ideaExtension);

/**
* {@return whether the import action should be configured}
*/
default boolean shouldConfigureIdeaImport() {
return Boolean.getBoolean("idea.sync.active");
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ public void idea(Project project, IdeaModel idea, ProjectSettings ideaExtension)

}

@Override
public boolean shouldConfigureIdeaImport() {
return Boolean.getBoolean("idea.active");
}

@Override
public void eclipse(Project project, EclipseModel eclipse) {
ProjectUtils.afterEvaluate(project, () -> {
Expand Down
Loading