From c03a41ff5d45dde3238f5fc7192b24ccaeb822e5 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Tue, 25 Aug 2015 17:19:57 +0200 Subject: [PATCH] don't write custom output if inherited --- .../impl/CompilerModuleExtensionImpl.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/java/java-impl/src/com/intellij/openapi/roots/impl/CompilerModuleExtensionImpl.java b/java/java-impl/src/com/intellij/openapi/roots/impl/CompilerModuleExtensionImpl.java index eeaa91381bb5..e3eaaa858c1a 100644 --- a/java/java-impl/src/com/intellij/openapi/roots/impl/CompilerModuleExtensionImpl.java +++ b/java/java-impl/src/com/intellij/openapi/roots/impl/CompilerModuleExtensionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -104,15 +104,17 @@ public class CompilerModuleExtensionImpl extends CompilerModuleExtension { @Override public void writeExternal(final Element element) throws WriteExternalException { assert !myDisposed; - if (myCompilerOutput != null) { - final Element pathElement = new Element(OUTPUT_TAG); - pathElement.setAttribute(ATTRIBUTE_URL, myCompilerOutput); - element.addContent(pathElement); - } - if (myCompilerOutputForTests != null) { - final Element pathElement = new Element(TEST_OUTPUT_TAG); - pathElement.setAttribute(ATTRIBUTE_URL, myCompilerOutputForTests); - element.addContent(pathElement); + if (!myInheritedCompilerOutput) { + if (myCompilerOutput != null) { + final Element pathElement = new Element(OUTPUT_TAG); + pathElement.setAttribute(ATTRIBUTE_URL, myCompilerOutput); + element.addContent(pathElement); + } + if (myCompilerOutputForTests != null) { + final Element pathElement = new Element(TEST_OUTPUT_TAG); + pathElement.setAttribute(ATTRIBUTE_URL, myCompilerOutputForTests); + element.addContent(pathElement); + } } element.setAttribute(INHERIT_COMPILER_OUTPUT, String.valueOf(myInheritedCompilerOutput)); if (myExcludeOutput) {