From 153b981aa2a3a3b9519d132fc7af65b671c96e68 Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 26 Feb 2003 22:05:59 +0000 Subject: [PATCH] Switched default for Ajde (batch compile) to have debug info turned on. --- .../ajde/internal/CompilerAdapter.java | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) 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() ) { -- 2.39.5