From: acolyer Date: Wed, 26 Feb 2003 22:05:59 +0000 (+0000) Subject: Switched default for Ajde (batch compile) to have X-Git-Tag: V_1_1_b5~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=153b981aa2a3a3b9519d132fc7af65b671c96e68;p=aspectj.git Switched default for Ajde (batch compile) to have debug info turned on. --- diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java index 60aa23d02..8d050d89c 100644 --- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java @@ -177,29 +177,32 @@ public class CompilerAdapter { Set debugOptions = options.getDebugLevel(); if (!LangUtil.isEmpty(debugOptions)) { - // default is all options off, so just need to selectively - // enable + // default is all options on, so just need to selectively + // disable + boolean sourceLine = false; + boolean varAttr = false; + boolean lineNo = false; Iterator it = debugOptions.iterator(); while (it.hasNext()){ String debug = (String) it.next(); if ( debug.equals( BuildOptionsAdapter.DEBUG_ALL )) { - javaOptions.put( CompilerOptions.OPTION_LineNumberAttribute, - CompilerOptions.GENERATE); - javaOptions.put( CompilerOptions.OPTION_SourceFileAttribute, - CompilerOptions.GENERATE); - javaOptions.put( CompilerOptions.OPTION_LocalVariableAttribute, - CompilerOptions.GENERATE); + sourceLine = true; + varAttr = true; + lineNo = true; } else if ( debug.equals( BuildOptionsAdapter.DEBUG_LINES )) { - javaOptions.put( CompilerOptions.OPTION_LineNumberAttribute, - CompilerOptions.GENERATE); + lineNo = true; } else if ( debug.equals( BuildOptionsAdapter.DEBUG_SOURCE )) { - javaOptions.put( CompilerOptions.OPTION_SourceFileAttribute, - CompilerOptions.GENERATE); + sourceLine = true; } else if ( debug.equals( BuildOptionsAdapter.DEBUG_VARS)) { - javaOptions.put( CompilerOptions.OPTION_LocalVariableAttribute, - CompilerOptions.GENERATE); + varAttr = true; } } + if (sourceLine) javaOptions.put(CompilerOptions.OPTION_SourceFileAttribute, + CompilerOptions.GENERATE); + if (varAttr) javaOptions.put(CompilerOptions.OPTION_LocalVariableAttribute, + CompilerOptions.GENERATE); + if (lineNo) javaOptions.put(CompilerOptions.OPTION_LineNumberAttribute, + CompilerOptions.GENERATE); } if ( options.getNoImportError() ) {