]> source.dussan.org Git - aspectj.git/commitdiff
spring cleaning in advance of 1.2 enhancements:
authoracolyer <acolyer>
Fri, 23 Jan 2004 11:49:16 +0000 (11:49 +0000)
committeracolyer <acolyer>
Fri, 23 Jan 2004 11:49:16 +0000 (11:49 +0000)
removed unused imports, local variables, and private methods
(still there, just commented out).

40 files changed:
org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AccessForInlineVisitor.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AdviceDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectClinit.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/DeclareDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/IfMethodDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ProceedVisitor.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ThisJoinPointVisitor.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseScope.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseShadow.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseTypeMunger.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InlineAccessFieldBinding.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMemberFinder.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/PrivilegedFieldBinding.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/PrivilegedHandler.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/parser/AjParser.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EmacsStructureModelManager.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/StatefulNameEnvironment.java
org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/BuildArgParserTestCase.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/BasicCommandTestCase.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java
taskdefs/src/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java
taskdefs/src/org/aspectj/tools/ant/taskdefs/Ajc2.java
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java

index 9527d635c7c7303cd62b8c23ab7491d0233ab087..a04231cd23d3c11f75894d1f821276f801ce0319 100644 (file)
@@ -26,7 +26,7 @@ public class AjdtCommand implements ICommand {
     /** Message String for any AbortException thrown from ICommand API's */
     public static final String ABORT_MESSAGE = "ABORT";
     
-    private boolean canRepeatCommand = true;
+//    private boolean canRepeatCommand = true;
        
        AjBuildManager buildManager = null;
        String[] savedArgs = null;
index 6580e6e21fb5f2de244b2dbea5df492601d77e9e..d4af2905cd7850fb46e7f0aeba55d79e6f125044 100644 (file)
@@ -13,7 +13,7 @@
 
 package org.aspectj.ajdt.internal.compiler.ast;
 
-import java.util.Arrays;
+//import java.util.Arrays;
 
 import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
 import org.aspectj.ajdt.internal.compiler.lookup.InlineAccessFieldBinding;
@@ -167,7 +167,7 @@ public class AccessForInlineVisitor extends ASTVisitor {
                }
 
                
-               ResolvedMember m = world.makeResolvedMember(binding);
+               ResolvedMember m = EclipseFactory.makeResolvedMember(binding);
                if (inAspect.accessForInline.containsKey(m)) return (MethodBinding)inAspect.accessForInline.get(m);
                MethodBinding ret = world.makeMethodBinding(
                        AjcMemberMaker.inlineAccessMethodForMethod(inAspect.typeX, m)
@@ -186,7 +186,7 @@ public class AccessForInlineVisitor extends ASTVisitor {
        }
        
        private MethodBinding getSuperAccessMethod(MethodBinding binding) {
-               ResolvedMember m = world.makeResolvedMember(binding);
+               ResolvedMember m = EclipseFactory.makeResolvedMember(binding);
                ResolvedMember superAccessMember = AjcMemberMaker.superAccessMethod(inAspect.typeX, m);
                if (inAspect.superAccessForInline.containsKey(superAccessMember)) {
                        return ((SuperAccessMethodPair)inAspect.superAccessForInline.get(superAccessMember)).accessMethod;
index 40955af6b001898154033007e8445ff8b3209cb3..6b6b801f5a6d9bc7562827ae8706e46c378b253b 100644 (file)
@@ -131,7 +131,7 @@ public class AdviceDeclaration extends MethodDeclaration {
                
                if (kind == AdviceKind.Around) {
                        int n = proceedCalls.size();
-                       EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(upperScope);
+//                     EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(upperScope);
                                                
                        //System.err.println("access to: " + Arrays.asList(handler.getMembers()));
                        
index ebead22ebe1a5205880abbaa6e7ee12e0996d375..4c1ed2ff1389e6b0e954895e76f392fb51368420 100644 (file)
@@ -55,7 +55,7 @@ public class AspectClinit extends Clinit {
 
                        codeStream.invokestatic(world.makeMethodBindingForCall(
                                AjcMemberMaker.ajcPreClinitMethod(
-                                       world.fromBinding(classScope.referenceContext.binding)
+                                       EclipseFactory.fromBinding(classScope.referenceContext.binding)
                                )));
                }
                super.generateSyntheticCode(classScope, codeStream);
@@ -71,7 +71,7 @@ public class AspectClinit extends Clinit {
 
                        codeStream.invokestatic(world.makeMethodBindingForCall(
                                AjcMemberMaker.ajcPostClinitMethod(
-                                       world.fromBinding(classScope.referenceContext.binding)
+                                       EclipseFactory.fromBinding(classScope.referenceContext.binding)
                                )));
                }
                
index a823f10b047ea9571167e8c8806a080cbdc07aae..f2f343a6932a35f6462575b7832400e31303ca8f 100644 (file)
@@ -21,14 +21,14 @@ import org.aspectj.weaver.*;
 import org.aspectj.weaver.patterns.*;
 import org.eclipse.jdt.internal.compiler.ClassFile;
 import org.eclipse.jdt.internal.compiler.CompilationResult;
-import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
+//import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Clinit;
-import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration;
+//import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
 import org.eclipse.jdt.internal.compiler.codegen.Label;
 import org.eclipse.jdt.internal.compiler.lookup.*;
-import org.eclipse.jdt.internal.compiler.parser.Parser;
+//import org.eclipse.jdt.internal.compiler.parser.Parser;
 
 
 // (we used to...) making all aspects member types avoids a nasty hierarchy pain
@@ -286,7 +286,7 @@ public class AspectDeclaration extends TypeDeclaration {
        }
        
        private void generateMethod(ClassFile classFile, MethodBinding methodBinding, BodyGenerator gen) {
-               EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
+//             EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
                classFile.generateMethodInfoHeader(methodBinding);
                int methodAttributeOffset = classFile.contentsOffset;
                int attributeNumber = classFile.generateMethodInfoAttribute(methodBinding, AstUtil.getAjSyntheticAttribute());
@@ -346,7 +346,7 @@ public class AspectDeclaration extends TypeDeclaration {
        {
                final EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
                generateMethod(classFile, world.makeMethodBinding(AjcMemberMaker.perCflowPush(
-                               world.fromBinding(binding))), 
+                               EclipseFactory.fromBinding(binding))), 
                new BodyGenerator() {
                        public void generate(CodeStream codeStream) {
                                // body starts here
@@ -378,7 +378,7 @@ public class AspectDeclaration extends TypeDeclaration {
        {
                final EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
                generateMethod(classFile, world.makeMethodBinding(AjcMemberMaker.ajcPreClinitMethod(
-                               world.fromBinding(binding))), 
+                               EclipseFactory.fromBinding(binding))), 
                new BodyGenerator() {
                        public void generate(CodeStream codeStream) {
                                // body starts here
@@ -480,7 +480,7 @@ public class AspectDeclaration extends TypeDeclaration {
                final TypeBinding interfaceType) 
        {
                final EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
-               generateMethod(classFile, AjcMemberMaker.perObjectBind(world.fromBinding(binding)), 
+               generateMethod(classFile, AjcMemberMaker.perObjectBind(EclipseFactory.fromBinding(binding)), 
                new BodyGenerator() {
                        public void generate(CodeStream codeStream) {
                                // body starts here
@@ -563,7 +563,7 @@ public class AspectDeclaration extends TypeDeclaration {
        {
                final EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
                generateMethod(classFile, world.makeMethodBinding(AjcMemberMaker.ajcPostClinitMethod(
-                               world.fromBinding(binding))), 
+                               EclipseFactory.fromBinding(binding))), 
                new BodyGenerator() {
                        public void generate(CodeStream codeStream) {
                                // body starts here
index 34791014d3272803b0da2e15cba1cc0f17450a9d..b1a57c116afaaae3453bc026183539548cc6239c 100644 (file)
@@ -13,7 +13,7 @@
 
 package org.aspectj.ajdt.internal.compiler.ast;
 
-import java.util.List;
+//import java.util.List;
 
 import org.aspectj.ajdt.internal.compiler.lookup.EclipseScope;
 import org.aspectj.weaver.AjAttribute;
index e770dfc235f3e20cc3b63a24b107921d46488f76..5103a8a7820360341463d23feee1d0304315afee 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.jdt.internal.compiler.ClassFile;
 import org.eclipse.jdt.internal.compiler.CompilationResult;
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
-import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
+//import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
 import org.eclipse.jdt.internal.compiler.parser.Parser;
 
 public class IfMethodDeclaration extends MethodDeclaration {
index 59d13912173adfacee9e86b588c5f4bc8013dd9f..0f189c34c56309ee062cf4b1f9bd053c0e476c36 100644 (file)
@@ -92,7 +92,7 @@ public class InterTypeConstructorDeclaration extends InterTypeDeclaration {
                
                pre.binding = world.makeMethodBinding(
                        AjcMemberMaker.preIntroducedConstructor(aspectTypeX, targetTypeX, 
-                                       world.fromBindings(binding.parameters)));
+                                       EclipseFactory.fromBindings(binding.parameters)));
                
                pre.bindArguments();
                pre.bindThrownExceptions();
@@ -140,7 +140,7 @@ public class InterTypeConstructorDeclaration extends InterTypeDeclaration {
                        
                        Expression arg = explicitConstructorCall.arguments[i];
                        ResolvedMember conversionMethod = 
-                               AjcMemberMaker.toObjectConversionMethod(world.fromBinding(explicitConstructorCall.binding.parameters[i]));
+                               AjcMemberMaker.toObjectConversionMethod(EclipseFactory.fromBinding(explicitConstructorCall.binding.parameters[i]));
                        if (conversionMethod != null) {
                                arg = new KnownMessageSend(world.makeMethodBindingForCall(conversionMethod),
                                        new CastExpression(new NullLiteral(0, 0), 
@@ -154,7 +154,7 @@ public class InterTypeConstructorDeclaration extends InterTypeDeclaration {
                        LocalVariableBinding binding = pre.arguments[i].binding;
                        Expression arg = AstUtil.makeResolvedLocalVariableReference(binding);
                        ResolvedMember conversionMethod = 
-                               AjcMemberMaker.toObjectConversionMethod(world.fromBinding(binding.type));
+                               AjcMemberMaker.toObjectConversionMethod(EclipseFactory.fromBinding(binding.type));
                        if (conversionMethod != null) {
                                arg = new KnownMessageSend(world.makeMethodBindingForCall(conversionMethod),
                                        new CastExpression(new NullLiteral(0, 0), 
@@ -208,7 +208,7 @@ public class InterTypeConstructorDeclaration extends InterTypeDeclaration {
                ResolvedTypeX declaringTypeX = world.fromEclipse(onTypeBinding);
                ResolvedTypeX aspectType = world.fromEclipse(classScope.referenceContext.binding);
                
-               ResolvedMember bindingAsMember = world.makeResolvedMember(binding);
+               ResolvedMember bindingAsMember = EclipseFactory.makeResolvedMember(binding);
                
                ResolvedMember signature =
                        new ResolvedMember(Member.CONSTRUCTOR, declaringTypeX, declaredModifiers, 
@@ -240,7 +240,7 @@ public class InterTypeConstructorDeclaration extends InterTypeDeclaration {
                        
                        
                        ((NewConstructorTypeMunger)munger).setExplicitConstructor(
-                               world.makeResolvedMember(explicitConstructor));
+                               EclipseFactory.makeResolvedMember(explicitConstructor));
                } else {
                        ((NewConstructorTypeMunger)munger).setExplicitConstructor(
                                new ResolvedMember(Member.CONSTRUCTOR, 
index 3babcfbf02f51f527c597c37f64a5f50adeffc14..d5bf73da6b6721359ddfd206fdc341226123a6e3 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.jdt.internal.compiler.CompilationResult;
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.flow.FlowContext;
+//import org.eclipse.jdt.internal.compiler.flow.FlowContext;
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
 import org.eclipse.jdt.internal.compiler.flow.InitializationFlowContext;
 import org.eclipse.jdt.internal.compiler.lookup.*;
@@ -177,7 +177,7 @@ public class InterTypeMethodDeclaration extends InterTypeDeclaration {
                        else
                                resolvedPosition++;
                }
-               TypeBinding type;
+//             TypeBinding type;
                if (methodBinding.isStatic())
                        codeStream.invokestatic(methodBinding);
                else {
index b55d3188f247b46c1aca8ad742637fca9d306909..b0595257e0600c5a2d09ad88b77e5d5cd6c1ae21 100644 (file)
@@ -19,8 +19,8 @@ import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
 import org.aspectj.ajdt.internal.core.builder.EclipseSourceContext;
 import org.aspectj.weaver.AjAttribute;
 import org.aspectj.weaver.ResolvedPointcutDefinition;
-import org.aspectj.weaver.ResolvedTypeX;
-import org.aspectj.weaver.TypeX;
+//import org.aspectj.weaver.ResolvedTypeX;
+//import org.aspectj.weaver.TypeX;
 import org.aspectj.weaver.patterns.Pointcut;
 import org.eclipse.jdt.internal.compiler.ClassFile;
 import org.eclipse.jdt.internal.compiler.CompilationResult;
index 4c0d2bc9dce0e3f7433eff6b78ee4f05b44f4194..a63ee3818e6e0e76c95fe4132ef950b161b06f94 100644 (file)
@@ -204,7 +204,7 @@ public class ProceedVisitor extends ASTVisitor {
        }
 
        private void removeParameter(int indexToRemove) {
-               TypeBinding[] parameters = method.binding.parameters;
+//             TypeBinding[] parameters = method.binding.parameters;
                method.scope.locals = removeLocalBinding(indexToRemove, method.scope.locals);
                method.binding.parameters = removeParameter(indexToRemove, method.binding.parameters);
        }
index 7cfbc8ea345bf57b9c406eb2c86fe3c365ee2c31..261e14af97e7792f4bf524023dc09ad11d76a149 100644 (file)
@@ -208,7 +208,7 @@ public class ThisJoinPointVisitor extends ASTVisitor {
        }
 
        private void removeParameter(int indexToRemove) {
-               TypeBinding[] parameters = method.binding.parameters;
+//             TypeBinding[] parameters = method.binding.parameters;
                method.scope.locals = removeLocalBinding(indexToRemove, method.scope.locals);
                method.scope.localIndex -= 1;
                method.binding.parameters = removeParameter(indexToRemove, method.binding.parameters);
index b3af379ee574c90a1e1046c8b736dc95c53fed66..4d0e4cae412bdb18a50da18742e28bf5aa22885b 100644 (file)
@@ -16,11 +16,11 @@ package org.aspectj.ajdt.internal.compiler.lookup;
 import java.util.*;
 
 import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration;
-import org.aspectj.ajdt.internal.compiler.ast.DeclareDeclaration;
+//import org.aspectj.ajdt.internal.compiler.ast.DeclareDeclaration;
 import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration;
-import org.aspectj.asm.*;
-import org.aspectj.asm.IProgramElement;
-import org.aspectj.asm.internal.Relationship;
+//import org.aspectj.asm.*;
+//import org.aspectj.asm.IProgramElement;
+//import org.aspectj.asm.internal.Relationship;
 import org.aspectj.bridge.IMessage;
 import org.aspectj.weaver.*;
 import org.aspectj.weaver.patterns.*;
index 88a9e1953ea2f2d1775aa96cb9310f8b8f3bf702..9bb093190f320f04a79c3daf53b4c0db6f5a3d6d 100644 (file)
@@ -12,7 +12,7 @@
  
 package org.aspectj.ajdt.internal.compiler.lookup;
 
-import java.io.IOException;
+//import java.io.IOException;
 
 import org.aspectj.asm.*;
 import org.aspectj.asm.internal.ProgramElement;
@@ -30,16 +30,16 @@ public class AsmInterTypeRelationshipProvider {
                ResolvedTypeX onType,
                EclipseTypeMunger munger) {
                        
-               IProgramElement.Kind kind = IProgramElement.Kind.ERROR;
-               if (munger.getMunger().getKind() == ResolvedTypeMunger.Field) {
-                       kind = IProgramElement.Kind.INTER_TYPE_FIELD;
-               } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Constructor) {
-                       kind = IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR;
-               } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Method) {
-                       kind = IProgramElement.Kind.INTER_TYPE_METHOD;
-               } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Parent) {
-                       kind = IProgramElement.Kind.INTER_TYPE_PARENT;
-               }        
+//             IProgramElement.Kind kind = IProgramElement.Kind.ERROR;
+//             if (munger.getMunger().getKind() == ResolvedTypeMunger.Field) {
+//                     kind = IProgramElement.Kind.INTER_TYPE_FIELD;
+//             } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Constructor) {
+//                     kind = IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR;
+//             } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Method) {
+//                     kind = IProgramElement.Kind.INTER_TYPE_METHOD;
+//             } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Parent) {
+//                     kind = IProgramElement.Kind.INTER_TYPE_PARENT;
+//             }        
        
                if (munger.getSourceLocation() != null
                        && munger.getSourceLocation() != null) {
index ba6d39ce975ab3eeb4710006944898e132d29d3d..1a4e71fe0e26cbc3c02624c7dc69ce967688cbc8 100644 (file)
@@ -37,7 +37,7 @@ public class EclipseFactory {
        
        private Map/*TypeX, TypeBinding*/ typexToBinding = new HashMap();
        //XXX currently unused
-       private Map/*TypeBinding, ResolvedTypeX*/ bindingToResolvedTypeX = new HashMap();
+//     private Map/*TypeBinding, ResolvedTypeX*/ bindingToResolvedTypeX = new HashMap();
        
        public static EclipseFactory fromLookupEnvironment(LookupEnvironment env) {
                AjLookupEnvironment aenv = (AjLookupEnvironment)env;
index 58a14aa32c7305386e47c04926e732b6dea86bfd..1bccc0e24dbfccf910e92e718508dc13c936c012 100644 (file)
@@ -69,7 +69,7 @@ public class EclipseScope implements IScope {
                
                //System.err.println("binding: " + b);
                //  Binding(tokens, bits & RestrictiveFlagMASK, this)
-               return world.fromBinding(b);
+               return EclipseFactory.fromBinding(b);
                
                /*
                computeImports();
@@ -114,12 +114,12 @@ public class EclipseScope implements IScope {
        }
        
        
-       private ResolvedTypeX resolveVisible(String name) {
-               ResolvedTypeX found = world.getWorld().resolve(TypeX.forName(name), true);
-               if (found == ResolvedTypeX.MISSING) return found;
-               if (ResolvedTypeX.isVisible(found.getModifiers(), found, enclosingType)) return found;
-               return ResolvedTypeX.MISSING; 
-       }
+//     private ResolvedTypeX resolveVisible(String name) {
+//             ResolvedTypeX found = world.getWorld().resolve(TypeX.forName(name), true);
+//             if (found == ResolvedTypeX.MISSING) return found;
+//             if (ResolvedTypeX.isVisible(found.getModifiers(), found, enclosingType)) return found;
+//             return ResolvedTypeX.MISSING; 
+//     }
        
 
 //     public TypeX lookupType(String name, IHasPosition location) {
index 99abeedf975645787587fb43aa0ac28a424fa697..5aef59393e01fe0501ed7e15bb32dbc0a6bde5a4 100644 (file)
@@ -50,9 +50,9 @@ public class EclipseShadow extends Shadow {
 
        public TypeX getEnclosingType() {
                if (context instanceof TypeDeclaration) {
-                       return world.fromBinding(((TypeDeclaration)context).binding);
+                       return EclipseFactory.fromBinding(((TypeDeclaration)context).binding);
                } else if (context instanceof AbstractMethodDeclaration) {
-                       return world.fromBinding(((AbstractMethodDeclaration)context).binding.declaringClass);
+                       return EclipseFactory.fromBinding(((AbstractMethodDeclaration)context).binding.declaringClass);
                } else {
                        return ResolvedTypeX.MISSING;
                }
@@ -68,7 +68,7 @@ public class EclipseShadow extends Shadow {
                        return new Member(Member.STATIC_INITIALIZATION, getEnclosingType(), 0, 
                                                ResolvedTypeX.VOID, "<clinit>", TypeX.NONE);
                } else if (context instanceof AbstractMethodDeclaration) {
-                       return world.makeResolvedMember(((AbstractMethodDeclaration)context).binding);
+                       return EclipseFactory.makeResolvedMember(((AbstractMethodDeclaration)context).binding);
                } else {
                        return null;
                }
@@ -110,12 +110,12 @@ public class EclipseShadow extends Shadow {
                if (astNode instanceof AllocationExpression) {
                        AllocationExpression e = (AllocationExpression)astNode;
                        return new EclipseShadow(world, Shadow.ConstructorCall,
-                                       world.makeResolvedMember(e.binding), astNode, context);
+                                       EclipseFactory.makeResolvedMember(e.binding), astNode, context);
                } else if (astNode instanceof MessageSend) {
                        MessageSend e = (MessageSend)astNode;
                        if (e.isSuperAccess()) return null;  // super calls don't have shadows
                        return new EclipseShadow(world, Shadow.MethodCall,
-                                       world.makeResolvedMember(e.binding), astNode, context);
+                                       EclipseFactory.makeResolvedMember(e.binding), astNode, context);
                } else if (astNode instanceof ExplicitConstructorCall) {
                        //??? these should be ignored, they don't have shadows
                        return null;                            
@@ -143,11 +143,11 @@ public class EclipseShadow extends Shadow {
                                //throw new RuntimeException("unimplemented: " + e);
                        }
                        return new EclipseShadow(world, kind,
-                                       world.makeResolvedMember(e.binding), astNode, context);
+                                       EclipseFactory.makeResolvedMember(e.binding), astNode, context);
                } else if (astNode instanceof TypeDeclaration) {
                        return new EclipseShadow(world, Shadow.StaticInitialization,
                                                        new Member(Member.STATIC_INITIALIZATION, 
-                                                               world.fromBinding(((TypeDeclaration)astNode).binding), 0, 
+                                                               EclipseFactory.fromBinding(((TypeDeclaration)astNode).binding), 0, 
                                                                ResolvedTypeX.VOID, "<clinit>", TypeX.NONE),
                                                        astNode, context);
                } else {
index 60f317f1f3f0ff56cd587416ecbca58a8686a6cd..2667909bc5647309174f818040d5ae40294f67f9 100644 (file)
@@ -18,7 +18,7 @@ import java.util.*;
 import org.aspectj.ajdt.internal.compiler.ast.*;
 import org.aspectj.ajdt.internal.core.builder.EclipseSourceContext;
 import org.aspectj.bridge.IMessage;
-import org.aspectj.bridge.ISourceLocation;
+//import org.aspectj.bridge.ISourceLocation;
 import org.aspectj.weaver.*;
 import org.aspectj.weaver.patterns.PerClause;
 import org.aspectj.weaver.patterns.PerSingleton;
@@ -107,7 +107,7 @@ public class EclipseSourceType extends ResolvedTypeX.ConcreteName {
                                        continue;
                                } else {
                                        if (amd.binding == null || !amd.binding.isValidBinding()) continue;
-                                       declaredMethods.add(eclipseWorld().makeResolvedMember(amd.binding));
+                                       declaredMethods.add(EclipseFactory.makeResolvedMember(amd.binding));
                                }
                        }
                }
@@ -115,7 +115,7 @@ public class EclipseSourceType extends ResolvedTypeX.ConcreteName {
                FieldBinding[] fields = binding.fields();
                for (int i=0, len=fields.length; i < len; i++) {
                        FieldBinding f = fields[i];
-                       declaredFields.add(eclipseWorld().makeResolvedMember(f));
+                       declaredFields.add(EclipseFactory.makeResolvedMember(f));
                }
                        
                this.declaredPointcuts = (ResolvedPointcutDefinition[])
index 2c4b9489c8e6296eea54046665a6325677b5808e..33a4f2a7894b2772683197f13b69b0f8b2385197 100644 (file)
@@ -22,11 +22,11 @@ import org.aspectj.weaver.NewFieldTypeMunger;
 import org.aspectj.weaver.NewMethodTypeMunger;
 import org.aspectj.weaver.ResolvedTypeMunger;
 import org.aspectj.weaver.ResolvedTypeX;
-import org.aspectj.weaver.TypeX;
+//import org.aspectj.weaver.TypeX;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
-import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+//import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
 
 
index d1f3b730fb09c3debdbfb49542b10e058a489847..f0b844903d36e47921981a38f66b7e82ca99090a 100644 (file)
@@ -46,11 +46,11 @@ public class InlineAccessFieldBinding extends FieldBinding {
                this.reader = new SimpleSyntheticAccessMethodBinding(
                        inAspect.factory.makeMethodBinding(
                                AjcMemberMaker.inlineAccessMethodForFieldGet(
-                                       inAspect.typeX, inAspect.factory.makeResolvedMember(baseField)
+                                       inAspect.typeX, EclipseFactory.makeResolvedMember(baseField)
                        )));
                this.writer = new SimpleSyntheticAccessMethodBinding(inAspect.factory.makeMethodBinding(
                                AjcMemberMaker.inlineAccessMethodForFieldSet(
-                                       inAspect.typeX, inAspect.factory.makeResolvedMember(baseField)
+                                       inAspect.typeX, EclipseFactory.makeResolvedMember(baseField)
                        )));
                        
                this.constant = ASTNode.NotAConstant;
index ae7da903211c342cda0b3bcc121f4c51168e0925..eaa81c8da3f79013f3f84d3c64b0afed516d5c85 100644 (file)
@@ -233,13 +233,13 @@ public class InterTypeMemberFinder implements IMemberFinder {
 //             }
 //     }
 
-       private ReferenceBinding getTargetType(MethodBinding m2) {
-               if (m2 instanceof InterTypeMethodBinding) {
-                       return ((InterTypeMethodBinding)m2).getTargetType();
-               }
-               
-               return m2.declaringClass;
-       }
+//     private ReferenceBinding getTargetType(MethodBinding m2) {
+//             if (m2 instanceof InterTypeMethodBinding) {
+//                     return ((InterTypeMethodBinding)m2).getTargetType();
+//             }
+//             
+//             return m2.declaringClass;
+//     }
 
 
        
index adedd1dbbd2ee84ac1bed0bc51db0730d954322a..af0db72c29234d84f64853ec76f64591c9dbd945 100644 (file)
@@ -35,11 +35,11 @@ public class PrivilegedFieldBinding extends FieldBinding {
                this.reader = new SimpleSyntheticAccessMethodBinding(
                        inAspect.factory.makeMethodBinding(
                                AjcMemberMaker.privilegedAccessMethodForFieldGet(
-                                       inAspect.typeX, inAspect.factory.makeResolvedMember(baseField)
+                                       inAspect.typeX, EclipseFactory.makeResolvedMember(baseField)
                        )));
                this.writer = new SimpleSyntheticAccessMethodBinding(inAspect.factory.makeMethodBinding(
                                AjcMemberMaker.privilegedAccessMethodForFieldSet(
-                                       inAspect.typeX, inAspect.factory.makeResolvedMember(baseField)
+                                       inAspect.typeX, EclipseFactory.makeResolvedMember(baseField)
                        )));
                        
                this.constant = ASTNode.NotAConstant;
index 6ee798eb81b33181d9196f2410c4be12994d5a3c..f765694752cf838b4fbf8bb5a9e1e33cc446ffa0 100644 (file)
@@ -45,7 +45,7 @@ public class PrivilegedHandler implements IPrivilegedHandler {
        }
 
        public FieldBinding getPrivilegedAccessField(FieldBinding baseField, ASTNode location) {                
-               ResolvedMember key = inAspect.factory.makeResolvedMember(baseField);
+               ResolvedMember key = EclipseFactory.makeResolvedMember(baseField);
                if (accessors.containsKey(key)) return (FieldBinding)accessors.get(key);
                FieldBinding ret = new PrivilegedFieldBinding(inAspect, baseField);
                checkWeaveAccess(key.getDeclaringType(), location);
index be36f8dca67688498b756637402fced1bc0cc655..87232ada8bac6d8d21cab6abbf75d50df1100ce4 100644 (file)
@@ -40,7 +40,7 @@ import org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.Literal;
 import org.eclipse.jdt.internal.compiler.ast.MessageSend;
-import org.eclipse.jdt.internal.compiler.ast.OperatorExpression;
+//import org.eclipse.jdt.internal.compiler.ast.OperatorExpression;
 import org.eclipse.jdt.internal.compiler.ast.OperatorIds;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
@@ -223,8 +223,8 @@ public class AjParser extends Parser {
                // handle modifiers, only without privileged for now
                if (isPrivileged) {
                        pos = eatIdentifier(); // eat the privileged
-                       int end = (int) pos;
-                   int start = (int) (pos >>> 32);
+//                     int end = (int) pos;
+//                 int start = (int) (pos >>> 32);
                    aspectDecl.isPrivileged = true;
                        //problemReporter().signalError(start, end, "privileged is unimplemented in 1.1alpha1");
                }
@@ -292,7 +292,7 @@ public class AjParser extends Parser {
                
                //the name
                long pos = identifierPositionStack[identifierPtr];
-               int sourceEnd = (int) pos;
+//             int sourceEnd = (int) pos;
                ret.sourceStart = (int) (pos >>> 32);
                ret.selector = identifierStack[identifierPtr--];
                identifierLengthPtr--;
index 45ee2e08149197b6208e56fb5c5277843e510d2c..2a4882e942b7beb3651c6f2b51c3b3149e81d55f 100644 (file)
@@ -175,7 +175,7 @@ public class AjProblemReporter extends ProblemReporter {
                CompilationResult unitResult)
        {
                if (severity != Ignore && DUMP_STACK) {
-                       Thread.currentThread().dumpStack();
+                       Thread.dumpStack();
                }
                super.handle(
                        problemId,
index 3727498c1f3d52974022f9c97c86cf3a4ade16a6..1ab91d09ed3e2556c494c262a5b41367569fc6bc 100644 (file)
@@ -22,7 +22,7 @@ import org.aspectj.ajdt.internal.compiler.lookup.*;
 import org.aspectj.ajdt.internal.compiler.parser.AjParser;
 import org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter;
 import org.aspectj.asm.*;
-import org.aspectj.asm.internal.*;
+//import org.aspectj.asm.internal.*;
 import org.aspectj.asm.internal.ProgramElement;
 import org.aspectj.bridge.*;
 import org.aspectj.weaver.World;
@@ -34,7 +34,7 @@ import org.eclipse.jdt.internal.compiler.batch.FileSystem;
 import org.eclipse.jdt.internal.compiler.env.*;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
+//import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
 
 public class AjBuildManager {
     static final boolean FAIL_IF_RUNTIME_NOT_FOUND = false;
@@ -153,7 +153,7 @@ public class AjBuildManager {
             // have to tell state we succeeded or next is not incremental
             state.successfulCompile(buildConfig);
 
-            boolean weaved = weaveAndGenerateClassFiles();
+            /*boolean weaved = */weaveAndGenerateClassFiles();
             // if not weaved, then no-op build, no model changes
             // but always returns true
             // XXX weaved not in Mik's incremental
@@ -194,7 +194,7 @@ public class AjBuildManager {
                        bcelWeaver.addLibraryJarFile(f);
                }
                
-               String lintMode = buildConfig.getLintMode();
+//             String lintMode = buildConfig.getLintMode();
                
                if (buildConfig.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT)) {
                        bcelWorld.getLint().loadDefaultProperties();
@@ -290,7 +290,7 @@ public class AjBuildManager {
        public CompilationUnit[] getCompilationUnits(String[] filenames, String[] encodings) {
                int fileCount = filenames.length;
                CompilationUnit[] units = new CompilationUnit[fileCount];
-               HashtableOfObject knownFileNames = new HashtableOfObject(fileCount);
+//             HashtableOfObject knownFileNames = new HashtableOfObject(fileCount);
 
                String defaultEncoding = (String) buildConfig.getJavaOptions().get(CompilerOptions.OPTION_Encoding);
                if ("".equals(defaultEncoding)) //$NON-NLS-1$
index d6e02a1df29a7f9300ce8d26fd8fdb8b2d11809c..eddc09cded83b19fd9b5f40e1dc3dd90bfd6503f 100644 (file)
@@ -71,7 +71,7 @@ public class AsmElementFormatter {
                        setParameters(methodDeclaration, node);
 
                } else if (methodDeclaration instanceof PointcutDeclaration) { 
-                       PointcutDeclaration pd = (PointcutDeclaration)methodDeclaration;
+//                     PointcutDeclaration pd = (PointcutDeclaration)methodDeclaration;
                        node.setKind(IProgramElement.Kind.POINTCUT);
                        node.setName(translatePointcutName(new String(methodDeclaration.selector)));
                        setParameters(methodDeclaration, node);
@@ -123,10 +123,10 @@ public class AsmElementFormatter {
                                node.setKind(IProgramElement.Kind.INTER_TYPE_FIELD);                            
                        } else if (methodDeclaration instanceof InterTypeMethodDeclaration) {
                                node.setKind(IProgramElement.Kind.INTER_TYPE_METHOD);
-                               InterTypeMethodDeclaration itmd = (InterTypeMethodDeclaration)methodDeclaration;
+//                             InterTypeMethodDeclaration itmd = (InterTypeMethodDeclaration)methodDeclaration;
                        } else if (methodDeclaration instanceof InterTypeConstructorDeclaration) {
                                node.setKind(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR);
-                               InterTypeConstructorDeclaration itcd = (InterTypeConstructorDeclaration)methodDeclaration;                              
+//                             InterTypeConstructorDeclaration itcd = (InterTypeConstructorDeclaration)methodDeclaration;                              
                        } else {
                                node.setKind(IProgramElement.Kind.ERROR);
                        }
index a594a9a56badb240b54437047d190e03b9b5f86b..3091094d738b25d886ca106889341611c5f9b326 100644 (file)
@@ -19,7 +19,7 @@ import java.util.*;
 import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration;
 import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
 import org.aspectj.asm.*;
-import org.aspectj.asm.internal.*;
+//import org.aspectj.asm.internal.*;
 import org.aspectj.asm.internal.ProgramElement;
 import org.aspectj.bridge.*;
 import org.aspectj.util.LangUtil;
@@ -218,7 +218,7 @@ public class AsmHierarchyBuilder extends ASTVisitor {
        }
        
        public boolean visit(TypeDeclaration memberTypeDeclaration, BlockScope scope) {
-               String name = new String(memberTypeDeclaration.name);
+//             String name = new String(memberTypeDeclaration.name);
                
                String fullName = "<undefined>";
                if (memberTypeDeclaration.binding != null
@@ -481,11 +481,11 @@ public class AsmHierarchyBuilder extends ASTVisitor {
        // AMC - overloaded set of methods to get start and end lines for
        // various ASTNode types. They have no common ancestor in the
        // hierarchy!!
-       private int getStartLine( AbstractVariableDeclaration avd ) {
-               return ProblemHandler.searchLineNumber(
-                       currCompilationResult.lineSeparatorPositions,
-                       avd.declarationSourceStart);
-       }
+//     private int getStartLine( AbstractVariableDeclaration avd ) {
+//             return ProblemHandler.searchLineNumber(
+//                     currCompilationResult.lineSeparatorPositions,
+//                     avd.declarationSourceStart);
+//     }
        
        // AMC - overloaded set of methods to get start and end lines for
        // various ASTNode types. They have no common ancestor in the
@@ -499,11 +499,11 @@ public class AsmHierarchyBuilder extends ASTVisitor {
        // AMC - overloaded set of methods to get start and end lines for
        // various ASTNode types. They have no common ancestor in the
        // hierarchy!!
-       private int getStartLine( AbstractMethodDeclaration amd ){
-               return ProblemHandler.searchLineNumber(
-                       currCompilationResult.lineSeparatorPositions,
-                       amd.declarationSourceStart);
-       }
+//     private int getStartLine( AbstractMethodDeclaration amd ){
+//             return ProblemHandler.searchLineNumber(
+//                     currCompilationResult.lineSeparatorPositions,
+//                     amd.declarationSourceStart);
+//     }
        
        // AMC - overloaded set of methods to get start and end lines for
        // various ASTNode types. They have no common ancestor in the
@@ -517,11 +517,11 @@ public class AsmHierarchyBuilder extends ASTVisitor {
        // AMC - overloaded set of methods to get start and end lines for
        // various ASTNode types. They have no common ancestor in the
        // hierarchy!!
-       private int getStartLine( TypeDeclaration td ){
-               return ProblemHandler.searchLineNumber(
-                       currCompilationResult.lineSeparatorPositions,
-                       td.declarationSourceStart);
-       }
+//     private int getStartLine( TypeDeclaration td ){
+//             return ProblemHandler.searchLineNumber(
+//                     currCompilationResult.lineSeparatorPositions,
+//                     td.declarationSourceStart);
+//     }
        
        // AMC - overloaded set of methods to get start and end lines for
        // various ASTNode types. They have no common ancestor in the
index 4188adeb4c188b8969c5a798e2f375f21ef22499..6dc8f40efe80d2c35762dbdd7f72b898a2c6ab41 100644 (file)
@@ -106,21 +106,21 @@ public class EmacsStructureModelManager {
             print(") ");
         }
 
-        private void printDecls(IRelationship node) {
-//            for (Iterator it = node.getTargets().iterator(); it.hasNext(); ) {
-//                // this ignores relations on the compile unit
-//                Object nodeObject = it.next();
-//                throw new RuntimeException("unimplemented");
-////                if (nodeObject instanceof LinkNode) {
-////                    LinkNode child = (LinkNode)nodeObject;
-////                    if (//!child.getProgramElementNode().getKind().equals("stmnt") &&
-////                        !child.getProgramElementNode().getKind().equals("<undefined>")) {
-////                        printDecl(child.getProgramElementNode(), false);
+//        private void printDecls(IRelationship node) {
+////            for (Iterator it = node.getTargets().iterator(); it.hasNext(); ) {
+////                // this ignores relations on the compile unit
+////                Object nodeObject = it.next();
+////                throw new RuntimeException("unimplemented");
+//////                if (nodeObject instanceof LinkNode) {
+//////                    LinkNode child = (LinkNode)nodeObject;
+//////                    if (//!child.getProgramElementNode().getKind().equals("stmnt") &&
+//////                        !child.getProgramElementNode().getKind().equals("<undefined>")) {
 //////                        printDecl(child.getProgramElementNode(), false);
-////                    }
-////                }
-//            }
-        }
+////////                        printDecl(child.getProgramElementNode(), false);
+//////                    }
+//////                }
+////            }
+//        }
 
         /**
          * @param   structureNode   can be a ProgramElementNode or a LinkNode
@@ -216,12 +216,12 @@ public class EmacsStructureModelManager {
                    subst(n, o, (in.substring(pos + o.length())));
         }
 
-        private void lose(Error e) {
-            try {
-                print("(ERROR \"" + e.toString() + "\")");
-            }
-            catch(Error ex) { }
-        }
+//        private void lose(Error e) {
+//            try {
+//                print("(ERROR \"" + e.toString() + "\")");
+//            }
+//            catch(Error ex) { }
+//        }
     }
 }
 
index af72b9a9aee54d7938de07be8821743068529253..bb54b5c3d0fe31111c7d779798e3ebbe479c83b3 100644 (file)
@@ -13,7 +13,7 @@
 
 package org.aspectj.ajdt.internal.core.builder;
 
-import java.util.HashMap;
+//import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
index 2be51cb6daef7f1d049652498e095a80fd28b4e1..e77a9f5a60e1cc0c9e575ef1093abe1f5aad99b3 100644 (file)
@@ -17,10 +17,10 @@ package org.aspectj.tools.ajc;
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintStream;
-import java.util.Arrays;
-import java.util.List;
-
-import org.aspectj.ajdt.ajc.BuildArgParser;
+//import java.util.Arrays;
+//import java.util.List;
+//
+//import org.aspectj.ajdt.ajc.BuildArgParser;
 import org.aspectj.bridge.AbortException;
 import org.aspectj.bridge.ICommand;
 import org.aspectj.bridge.IMessage;
@@ -225,12 +225,12 @@ public class Main {
             return;
         }      
         try {
-            boolean verbose = (-1 != ("" + Arrays.asList(args)).indexOf("-verbose"));
+//            boolean verbose = (-1 != ("" + Arrays.asList(args)).indexOf("-verbose"));
             outer:
             while (true) {
                 boolean passed = command.runCommand(args, holder);
                 if (report(passed, holder) && controller.incremental()) {
-                    final boolean onCommandLine = controller.commandLineIncremental();
+//                    final boolean onCommandLine = controller.commandLineIncremental();
                     while (controller.doRepeatCommand()) {
                         holder.clearMessages();
                         if (controller.buildFresh()) {
@@ -406,7 +406,7 @@ public class Main {
          * @return String rendering IMessage (never null)
          */
         protected String render(IMessage message) {
-            IMessage.Kind kind = message.getKind();
+//            IMessage.Kind kind = message.getKind();
             
             StringBuffer sb = new StringBuffer();
             String text = message.getMessage();
@@ -521,10 +521,10 @@ public class Main {
          */
         public String[] init(String[] args, IMessageHandler sink) {
             running = true;
-            String[] unused;
+//            String[] unused;
             if (!LangUtil.isEmpty(args)) {
                 String[][] options = LangUtil.copyStrings(OPTIONS);
-                unused = LangUtil.extractOptions(args, options);
+                /*unused = */LangUtil.extractOptions(args, options);
                 incremental = (null != options[0][0]);
                 if (null != options[1][0]) {
                     File file = new File(options[1][1]);
@@ -588,7 +588,7 @@ public class Main {
                     }
                     System.out.println(" press enter to recompile, r to rebuild, q to quit: ");
                     System.out.flush();
-                    boolean doMore = false;
+//                    boolean doMore = false;
                     // seek for one q or a series of [\n\r]...
                     do {
                         int input = System.in.read();
@@ -628,10 +628,10 @@ public class Main {
         
         /** delay between filesystem checks, returning if quit is set */
         protected void fileCheckDelay() {
-            final Thread thread = Thread.currentThread();
+//            final Thread thread = Thread.currentThread();
             long targetTime = System.currentTimeMillis() + delay;
-            long curTime;
-            while (targetTime > (curTime = System.currentTimeMillis())) {
+//            long curTime;
+            while (targetTime > System.currentTimeMillis()) {
                 if (quit) {
                     return;
                 }
index 19bdb1cf11422ac63797091147c5ff378cb9a6c8..46607896503ec8e9f26695cfc907262919c64ee1 100644 (file)
@@ -13,7 +13,7 @@
 
 package org.aspectj.ajdt.ajc;
 
-import org.aspectj.ajdt.internal.core.builder.AjBuildConfig;
+//import org.aspectj.ajdt.internal.core.builder.AjBuildConfig;
 import org.aspectj.bridge.*;
 import org.aspectj.util.*;
 import org.eclipse.jdt.core.compiler.InvalidInputException;
@@ -30,7 +30,7 @@ public class AjdtCommandTestCase extends TestCase {
 
     private ArrayList tempFiles = new ArrayList();
        private StreamPrintWriter outputWriter = new StreamPrintWriter(new PrintWriter(System.out));
-       private AjdtCommand command = new AjdtCommand();        
+//     private AjdtCommand command = new AjdtCommand();        
        private MessageWriter messageWriter = new MessageWriter(outputWriter, false);
        private CountingMessageHandler counter 
         = new CountingMessageHandler(messageWriter);
@@ -118,7 +118,7 @@ public class AjdtCommandTestCase extends TestCase {
     }
 
        public void testIncrementalOption() throws InvalidInputException {
-               AjBuildConfig config = command.genBuildConfig(
+               AjdtCommand.genBuildConfig(
             new String[] {  "-incremental" }, 
             counter);
                
@@ -127,7 +127,7 @@ public class AjdtCommandTestCase extends TestCase {
                        outputWriter.getContents().indexOf("specify a source root") != -1);     
                
                outputWriter.flushBuffer();             
-               config = command.genBuildConfig(
+               AjdtCommand.genBuildConfig(
                        new String[] { "-incremental", "-sourceroots", 
                     AjdtAjcTests.TESTDATA_PATH + "/src1" }, 
                        counter);
@@ -137,7 +137,7 @@ public class AjdtCommandTestCase extends TestCase {
                        outputWriter.getContents().equals(""));                 
 
                outputWriter.flushBuffer();             
-               config = command.genBuildConfig(
+               AjdtCommand.genBuildConfig(
                        new String[] { "-incremental", "testdata/src1/Hello.java" }, 
                        counter);
                
@@ -148,7 +148,7 @@ public class AjdtCommandTestCase extends TestCase {
        
        public void testBadOptionAndUsagePrinting() throws InvalidInputException {
                try {
-                       command.genBuildConfig(
+                       AjdtCommand.genBuildConfig(
                 new String[] { "-mubleBadOption" }, 
                 counter);              
                } catch (AbortException ae) { }
@@ -170,7 +170,7 @@ public class AjdtCommandTestCase extends TestCase {
                try {
                        try {
                                
-                               command.genBuildConfig(
+                               AjdtCommand.genBuildConfig(
                        args, 
                        counter);
                        } catch (AbortException  ae) { }
@@ -195,7 +195,7 @@ public class AjdtCommandTestCase extends TestCase {
                try {
                        try {
                                
-                               command.genBuildConfig(
+                               AjdtCommand.genBuildConfig(
                                        args, 
                                        counter);
                        } catch (AbortException  ae) { }
@@ -211,7 +211,7 @@ public class AjdtCommandTestCase extends TestCase {
        }
        
        public void testNonExistingLstFile() {
-               command.genBuildConfig(
+               AjdtCommand.genBuildConfig(
             new String[] { "@mumbleDoesNotExist" }, 
             counter);
                
index 2259e38089d41a1aac8ca4d116c2fbd733bf69a5..3cefb1e2ceefc9d6978776335e04afb0962564b5 100644 (file)
@@ -49,7 +49,7 @@ public class BuildArgParserTestCase extends TestCase {
             System.setProperty("java.class.path", ENTRY); // see finally below
             BuildArgParser parser = new BuildArgParser(messageWriter);
                AjBuildConfig config = parser.genBuildConfig(new String[] { });
-            String err = parser.getOtherMessages(true);       
+            /*String err = */parser.getOtherMessages(true);       
             //!!!assertTrue(err, null == err);
             assertTrue(
                        config.getClasspath().toString(),
@@ -71,7 +71,7 @@ public class BuildArgParserTestCase extends TestCase {
     
                        parser = new BuildArgParser(messageWriter);
                config = parser.genBuildConfig(new String[] { "-1.3" });
-            err = parser.getOtherMessages(true);       
+            /*err = */parser.getOtherMessages(true);       
             //!!!assertTrue(err, null == err);
                assertTrue(
                        config.getClasspath().toString(),
@@ -157,7 +157,7 @@ public class BuildArgParserTestCase extends TestCase {
 
        public void testBadPathToSourceFiles() {
                CountingMessageHandler countingHandler = new CountingMessageHandler(messageWriter);
-               AjBuildConfig config = genBuildConfig(new String[]{ "inventedDir/doesntexist/*.java"},countingHandler);
+               /*AjBuildConfig config = */genBuildConfig(new String[]{ "inventedDir/doesntexist/*.java"},countingHandler);
                assertTrue("Expected an error for the invalid path.",countingHandler.numMessages(IMessage.ERROR,false)==1);     
        }
 
@@ -368,7 +368,7 @@ public class BuildArgParserTestCase extends TestCase {
        }
 
        public void testXlint() throws InvalidInputException {
-               AjdtCommand command = new AjdtCommand();
+//             AjdtCommand command = new AjdtCommand();
                AjBuildConfig config = genBuildConfig(new String[] {"-Xlint"}, messageWriter);
                assertTrue("", config.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT));
                config = genBuildConfig(new String[] {"-Xlint:warn"}, messageWriter);
@@ -381,14 +381,14 @@ public class BuildArgParserTestCase extends TestCase {
 
        public void testXlintfile() throws InvalidInputException {
                String lintFile = AjdtAjcTests.TESTDATA_PATH + "/lintspec.properties"; 
-               String badLintFile = "lint.props";
+//             String badLintFile = "lint.props";
                AjBuildConfig config = genBuildConfig(new String[] {"-Xlintfile", lintFile}, messageWriter);
                assertTrue(new File(lintFile).exists());
                assertEquals(getCanonicalPath(new File(lintFile)),config.getLintSpecFile().getAbsolutePath());  
        }
 
        public void testOptions() throws InvalidInputException {
-               AjdtCommand command = new AjdtCommand();
+//             AjdtCommand command = new AjdtCommand();
                String TARGET = "1.4";
                AjBuildConfig config = genBuildConfig(new String[] {"-target", TARGET, "-source", TARGET}, messageWriter);
                assertTrue(
@@ -404,7 +404,7 @@ public class BuildArgParserTestCase extends TestCase {
                String SOURCE_PATH_1 = "A.java";
                String SOURCE_PATH_2 = "B.java";
 
-        File f = new File(FILE_PATH);
+//        File f = new File(FILE_PATH);
                
                AjBuildConfig config = genBuildConfig(new String[] { "@" + FILE_PATH }, messageWriter);
                List resultList = config.getFiles();
index 1e53cdd024cf2dc5155a616d5a03c05e33663b26..cd0ec9ddd46f9923968cfaa86f40f10ef6182cb6 100644 (file)
@@ -14,13 +14,13 @@ package org.aspectj.ajdt.internal.compiler.batch;
 
 import java.io.File;
 import java.util.ArrayList;
-import java.util.Arrays;
+//import java.util.Arrays;
 import java.util.List;
 
 import org.aspectj.ajdt.ajc.*;
 import org.aspectj.ajdt.ajc.AjdtCommand;
 import org.aspectj.bridge.ICommand;
-import org.aspectj.bridge.IMessage;
+//import org.aspectj.bridge.IMessage;
 import org.aspectj.bridge.MessageHandler;
 
 /**
@@ -117,7 +117,7 @@ public class BasicCommandTestCase extends CommandTestCase {
                ICommand command = new AjdtCommand();
                MessageHandler myHandler = new MessageHandler();
                //myHandler.setInterceptor(org.aspectj.tools.ajc.Main.MessagePrinter.TERSE);
-               boolean result = command.runCommand((String[])args.toArray(new String[args.size()]), myHandler);
+               /*boolean result = */command.runCommand((String[])args.toArray(new String[args.size()]), myHandler);
 
                //System.err.println("messages: " + Arrays.asList(myHandler.getMessages(IMessage.INFO, true)));
                // DON'T yet have a way of testing that we actually got a particular info message
@@ -137,7 +137,7 @@ public class BasicCommandTestCase extends CommandTestCase {
                ICommand command = new AjdtCommand();
                MessageHandler myHandler = new MessageHandler();
                myHandler.setInterceptor(org.aspectj.tools.ajc.Main.MessagePrinter.TERSE);
-               boolean result = command.runCommand((String[])args.toArray(new String[args.size()]), myHandler);
+               /*boolean result = */command.runCommand((String[])args.toArray(new String[args.size()]), myHandler);
 
                assertEquals("error for org.aspectj.lang.JoinPoint not found", 1, myHandler.getErrors().length);
        }
index b9ab0cb309361fa0f6db49b0972d096848e87754..c50ac5c89398a786f11d880348501fcaab62b898 100644 (file)
@@ -83,7 +83,7 @@ public abstract class CommandTestCase extends TestCase {
 
        public void rerunCompiler(ICommand command) {
                MessageHandler myHandler = new MessageHandler();
-               List recompiledFiles = new ArrayList();
+//             List recompiledFiles = new ArrayList();
            if (!command.repeatCommand(myHandler)) {
             assertTrue("recompile failed", false);
         }
index e8cd9ab21016134eb83e583722b0e052ba498992..b612c3bbebfdab44bef4b7b2a8c1aee1567b84a9 100644 (file)
@@ -32,7 +32,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.BitSet;
 import java.util.Collections;
-import java.util.Enumeration;
+//import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Properties;
@@ -49,7 +49,7 @@ public class IncrementalCase { // XXX NOT bound to junit - bridge tests?
        public static void main(String[] args) throws IOException {
        IncrementalCase me = new IncrementalCase();
                MessageHandler h = new MessageHandler();
-               boolean result;
+//             boolean result;
                StringBuffer sb = new StringBuffer();
                for (int i = 0; i < args.length; i++) {
                        sb.append("\n###### results for " + args[i]);
@@ -99,7 +99,7 @@ public class IncrementalCase { // XXX NOT bound to junit - bridge tests?
                boolean result = true;
 
                final String toSuffix = ".java";
-               final String canonicalFrom = srcBase.getCanonicalPath();
+//             final String canonicalFrom = srcBase.getCanonicalPath();
                final Definition[] defs = getDefinitions(srcBase);
                if ((null == defs) || (defs.length < 9)) {
                        throw new Error("did not get definitions");
@@ -439,7 +439,7 @@ public class IncrementalCase { // XXX NOT bound to junit - bridge tests?
                String[] eclipseErrors;
                String[] eclipseWarnings;
                Definition(String prefix, Properties props) {
-                       Enumeration keys = props.keys();
+//                     Enumeration keys = props.keys();
                        this.prefix = prefix;
                        files = get(props, prefix + ".files");
                        recompiled = get(props, prefix + ".recompiled");
index f602539c0220a3f1c7b4cbfcccfcf023544f3562..5cf5d8a8c830718c1b4464a0efd75d628a4e56fc 100644 (file)
@@ -13,7 +13,7 @@
 package org.aspectj.ajdt.internal.core.builder;
 
 import java.io.File;
-import java.io.FileOutputStream;
+//import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
 
@@ -352,11 +352,11 @@ public class AjBuildManagerTest extends TestCase {
 //             }
 //     }
 
-       private void touch(File file, boolean isAppend) throws IOException {
-               FileOutputStream s = new FileOutputStream(file.getAbsolutePath(), isAppend);
-               s.write(new byte[] {1,2,3});
-               s.close();
-       }
+//     private void touch(File file, boolean isAppend) throws IOException {
+//             FileOutputStream s = new FileOutputStream(file.getAbsolutePath(), isAppend);
+//             s.write(new byte[] {1,2,3});
+//             s.close();
+//     }
 
 
        /*
index bd594c3694a847756b81dce17b1c50c5fd3226fe..65e8786282cc8c41c097ec47483e41fadbaa5f19 100644 (file)
@@ -19,9 +19,9 @@ import org.apache.tools.ant.taskdefs.compilers.CompilerAdapter;
 import org.aspectj.util.FileUtil;
 
 import java.io.File;
-import java.io.FileFilter;
-import java.io.FileWriter;
-import java.io.IOException;
+//import java.io.FileFilter;
+//import java.io.FileWriter;
+//import java.io.IOException;
 
 /**
  * Adapt ajc to javac commands.
index 1582b1324fab5817905f26da7dfbfcd8182acbec..7e7ded5cfedcb457a916bbb0cfd1249cba29e960 100644 (file)
@@ -490,7 +490,7 @@ public class Ajc2 extends Javac {
                     line = line.substring(0, isharp);
                 }
 
-                int istar = -1;
+//                int istar = -1;
 
                 // Argument
                 if (line.startsWith("-")) {
@@ -498,7 +498,7 @@ public class Ajc2 extends Javac {
                 }
 
                 // If there are stars we'll try to resolve the file here
-                else if ((istar = line.indexOf("*")) != -1) {
+                else if (line.indexOf("*") != -1) {
                     log("The argfile line '" + line + "' is invalid",
                         Project.MSG_WARN);
                 }
index 798aeba31eeea5093e899f99f435ac638769be9b..0bf34a24ebb303edacc7aa144e88374686cfc51c 100644 (file)
@@ -1768,12 +1768,12 @@ public static class GuardedCommand {
         }
     }
     
-    private void addFile(File file) {
-        if (null != file) {
-            String path = file.getAbsolutePath();
-            addFlag(path, true);
-        }
-    }
+//    private void addFile(File file) {
+//        if (null != file) {
+//            String path = file.getAbsolutePath();
+//            addFlag(path, true);
+//        }
+//    }
     
     List extractArguments() {
         ArrayList result = new ArrayList();