private void addOtherOptions(final Element rootElement) { final Map<String, String> options = new THashMap<String, String>(myProjectLevelCompilerOptions.getAllOptions()); options.putAll(myModuleLevelCompilerOptions.getAllOptions()); options.putAll(myBC.getCompilerOptions().getAllOptions()); final String addOptions = myProjectLevelCompilerOptions.getAdditionalOptions() + " " + myModuleLevelCompilerOptions.getAdditionalOptions() + " " + myBC.getCompilerOptions().getAdditionalOptions(); final List<String> contextRootInAddOptions = FlexCommonUtils.getOptionValues(addOptions, "context-root", "compiler.context-root"); if (options.get("compiler.context-root") == null && contextRootInAddOptions.isEmpty()) { final List<String> servicesInAddOptions = FlexCommonUtils.getOptionValues(addOptions, "services", "compiler.services"); if (options.get("compiler.services") != null || !servicesInAddOptions.isEmpty()) { options.put("compiler.context-root", ""); } } for (final Map.Entry<String, String> entry : options.entrySet()) { addOption(rootElement, CompilerOptionInfo.getOptionInfo(entry.getKey()), entry.getValue()); } final String namespacesRaw = options.get("compiler.namespaces.namespace"); if (namespacesRaw != null && myBC.getOutputType() == OutputType.Library) { final String namespaces = FlexCommonUtils.replacePathMacros( namespacesRaw, myModule, myFlexmojos ? "" : mySdk.getHomePath()); final StringBuilder buf = new StringBuilder(); for (final String listEntry : StringUtil.split(namespaces, CompilerOptionInfo.LIST_ENTRIES_SEPARATOR)) { final int tabIndex = listEntry.indexOf(CompilerOptionInfo.LIST_ENTRY_PARTS_SEPARATOR); assert tabIndex != -1 : namespaces; final String namespace = listEntry.substring(0, tabIndex); if (buf.length() > 0) buf.append(CompilerOptionInfo.LIST_ENTRIES_SEPARATOR); buf.append(namespace); } if (buf.length() > 0) { addOption(rootElement, CompilerOptionInfo.INCLUDE_NAMESPACES_INFO, buf.toString()); } } }