misc changes
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / codeassist / CompletionEngine.java
index 8d4ed79..5715c97 100644 (file)
  ******************************************************************************/
 package net.sourceforge.phpdt.internal.codeassist;
 
-import java.util.*;
+import java.util.Locale;
+import java.util.Map;
 
-import net.sourceforge.phpdt.core.compiler.InvalidInputException;
-import net.sourceforge.phpdt.internal.compiler.*;
-import net.sourceforge.phpdt.internal.compiler.env.*;
-
-import net.sourceforge.phpdt.internal.codeassist.impl.*;
 import net.sourceforge.phpdt.core.ICompletionRequestor;
-import net.sourceforge.phpdt.core.IType;
-//import net.sourceforge.phpdt.core.JavaCore;
-//import net.sourceforge.phpdt.core.JavaModelException;
-import net.sourceforge.phpdt.core.compiler.*;
 import net.sourceforge.phpdt.core.compiler.IProblem;
-import net.sourceforge.phpdt.internal.codeassist.complete.*;
-
-import net.sourceforge.phpdt.internal.compiler.ast.*;
-import net.sourceforge.phpdt.internal.compiler.lookup.*;
-import net.sourceforge.phpdt.internal.compiler.parser.*;
-import net.sourceforge.phpdt.internal.compiler.problem.*;
-import net.sourceforge.phpdt.internal.compiler.util.*;
-import net.sourceforge.phpdt.internal.core.BasicCompilationUnit;
-import net.sourceforge.phpdt.internal.core.TypeConverter;
-import net.sourceforge.phpdt.internal.compiler.impl.*;
+import net.sourceforge.phpdt.core.compiler.ITerminalSymbols;
+import net.sourceforge.phpdt.core.compiler.InvalidInputException;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionNodeFound;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnArgumentName;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnClassLiteralAccess;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnClassReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnExceptionReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnExplicitConstructorCall;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnFieldName;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnFieldType;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnImportReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnInterfaceReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnLocalName;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnMemberAccess;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnMessageSend;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnMethodName;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnMethodReturnType;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnPackageReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedAllocationExpression;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedClassReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedExceptionReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedInterfaceReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedNameReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedTypeReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnSingleNameReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnSingleTypeReference;
+import net.sourceforge.phpdt.internal.codeassist.complete.CompletionParser;
+import net.sourceforge.phpdt.internal.codeassist.complete.InvalidCursorLocation;
+import net.sourceforge.phpdt.internal.codeassist.impl.AssistParser;
+import net.sourceforge.phpdt.internal.codeassist.impl.Engine;
+import net.sourceforge.phpdt.internal.compiler.CompilationResult;
+import net.sourceforge.phpdt.internal.compiler.DefaultErrorHandlingPolicies;
+import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration;
+import net.sourceforge.phpdt.internal.compiler.ast.AbstractVariableDeclaration;
+import net.sourceforge.phpdt.internal.compiler.ast.Argument;
+import net.sourceforge.phpdt.internal.compiler.ast.Assignment;
+import net.sourceforge.phpdt.internal.compiler.ast.AstNode;
+import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration;
+import net.sourceforge.phpdt.internal.compiler.ast.Expression;
+import net.sourceforge.phpdt.internal.compiler.ast.ImportReference;
+import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration;
+import net.sourceforge.phpdt.internal.compiler.ast.ReturnStatement;
+import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference;
+import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration;
+import net.sourceforge.phpdt.internal.compiler.ast.TypeReference;
+import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit;
+import net.sourceforge.phpdt.internal.compiler.env.IConstants;
+import net.sourceforge.phpdt.internal.compiler.env.ISourceMethod;
+import net.sourceforge.phpdt.internal.compiler.env.ISourceType;
+import net.sourceforge.phpdt.internal.compiler.env.NameEnvironmentAnswer;
+import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext;
+import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypes;
+import net.sourceforge.phpdt.internal.compiler.lookup.Binding;
+import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
+import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope;
+import net.sourceforge.phpdt.internal.compiler.lookup.CompilerModifiers;
+import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.InvocationSite;
+import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.LookupEnvironment;
+import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope;
+import net.sourceforge.phpdt.internal.compiler.lookup.PackageBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.Scope;
+import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.TagBits;
+import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.TypeConstants;
+import net.sourceforge.phpdt.internal.compiler.lookup.VariableBinding;
+import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation;
+import net.sourceforge.phpdt.internal.compiler.problem.DefaultProblemFactory;
+import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter;
+import net.sourceforge.phpdt.internal.compiler.util.CharOperation;
+import net.sourceforge.phpdt.internal.compiler.util.HashtableOfObject;
+import net.sourceforge.phpdt.internal.compiler.util.ObjectVector;
 
 /**
  * This class is the entry point for source completions.
@@ -946,7 +1005,7 @@ public final class CompletionEngine
                                                continue next;
                                        for (int a = minArgLength; --a >= 0;)
                                                if (argTypes[a] != null) // can be null if it could not be resolved properly
-                                                       if (!scope.areTypesCompatible(argTypes[a], constructor.parameters[a]))
+                                                       if (!Scope.areTypesCompatible(argTypes[a], constructor.parameters[a]))
                                                                continue next;
        
                                        char[][] parameterPackageNames = new char[paramLength][];
@@ -1667,7 +1726,7 @@ public final class CompletionEngine
 
                        for (int a = minArgLength; --a >= 0;){
                                if (argTypes[a] != null){ // can be null if it could not be resolved properly
-                                       if (!scope.areTypesCompatible(argTypes[a], method.parameters[a])) {
+                                       if (!Scope.areTypesCompatible(argTypes[a], method.parameters[a])) {
                                                continue next;
                                        }
                                }