diff --git a/src/main/java/de/gebit/plugins/autoconfig/handlers/java/JavaHandler.java b/src/main/java/de/gebit/plugins/autoconfig/handlers/java/JavaHandler.java index 730e05c..bf1dad5 100644 --- a/src/main/java/de/gebit/plugins/autoconfig/handlers/java/JavaHandler.java +++ b/src/main/java/de/gebit/plugins/autoconfig/handlers/java/JavaHandler.java @@ -11,12 +11,12 @@ import com.intellij.compiler.CompilerConfiguration; import com.intellij.compiler.CompilerConfigurationImpl; import com.intellij.compiler.impl.javaCompiler.BackendCompiler; +import com.intellij.debugger.settings.DebuggerSettings; import com.intellij.openapi.project.Project; import de.gebit.plugins.autoconfig.UpdateHandler; import de.gebit.plugins.autoconfig.handlers.AbstractHandler; -import de.gebit.plugins.autoconfig.model.AnnotationProcessor; import de.gebit.plugins.autoconfig.model.Compiler; -import de.gebit.plugins.autoconfig.model.JavaConfiguration; +import de.gebit.plugins.autoconfig.model.*; import org.jetbrains.annotations.NonNls; import org.jetbrains.jps.model.java.compiler.ProcessorConfigProfile; @@ -81,6 +81,17 @@ public List updateConfiguration(JavaConfiguration configuration, Project applySetting(buildProcessHeapSize, compilerConfiguration.getBuildProcessHeapSize(0), compilerConfiguration::setBuildProcessHeapSize, changedConfigs, "Build process heap size"); } } + + Debugger debugger = configuration.getDebugger(); + if (debugger != null) { + AsyncStackTraces asyncStackTraces = debugger.getAsyncStackTraces(); + if (asyncStackTraces != null) { + applySetting(asyncStackTraces.getUseInstrumentingAgent(), + DebuggerSettings.getInstance().INSTRUMENTING_AGENT, + v -> DebuggerSettings.getInstance().INSTRUMENTING_AGENT = v, changedConfigs, + "Use instrumenting agent (application setting)"); + } + } return changedConfigs; } } diff --git a/src/main/resources/schema/java.schema.json b/src/main/resources/schema/java.schema.json index 4160afe..430fc71 100644 --- a/src/main/resources/schema/java.schema.json +++ b/src/main/resources/schema/java.schema.json @@ -4,6 +4,22 @@ "title": "Java configuration", "type": "object", "properties": { + "debugger": { + "type": "object", + "description": "Debugger settings", + "properties": { + "asyncStackTraces": { + "description": "Settings for async stack traces", + "type": "object", + "properties": { + "useInstrumentingAgent": { + "type": "boolean", + "description": "Whether instrumenting agent should be used (application wide setting!)" + } + } + } + } + }, "compiler": { "type": "object", "description": "Compiler settings",