From 45883b85ba84ab90df09ef6326f73aec9fb64bd0 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Tue, 24 Mar 2015 16:26:29 +0100 Subject: [PATCH] eclipse: ensure compiler output set after 'use module output' rb selection (IDEA-137955) --- .../roots/ui/configuration/BuildElementsEditor.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/BuildElementsEditor.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/BuildElementsEditor.java index a36acc61113c..ba7706c6ad20 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/BuildElementsEditor.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/BuildElementsEditor.java @@ -83,14 +83,14 @@ public class BuildElementsEditor extends ModuleElementsEditor { myOutputPathPanel = createOutputPathPanel(ProjectBundle.message("module.paths.output.title"), new CommitPathRunnable() { @Override public void saveUrl(String url) { - if (getCompilerExtension().isCompilerOutputPathInherited()) return; //do not override settings if any + if (myInheritCompilerOutput.isSelected()) return; //do not override settings if any getCompilerExtension().setCompilerOutputPath(url); } }); myTestsOutputPathPanel = createOutputPathPanel(ProjectBundle.message("module.paths.test.output.title"), new CommitPathRunnable() { @Override public void saveUrl(String url) { - if (getCompilerExtension().isCompilerOutputPathInherited()) return; //do not override settings if any + if (myInheritCompilerOutput.isSelected()) return; //do not override settings if any getCompilerExtension().setCompilerOutputPathForTests(url); } }); @@ -218,6 +218,14 @@ public class BuildElementsEditor extends ModuleElementsEditor { } }; + final ActionListener listener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + commitRunnable.run(); + } + }; + myPerModuleCompilerOutput.addActionListener(listener); + textField.getDocument().addDocumentListener(new DocumentAdapter() { @Override protected void textChanged(DocumentEvent e) {