Java Doc for CompletionEngine.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » internal » codeassist » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » jdt » org.eclipse.jdt.internal.codeassist 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jdt.internal.codeassist.impl.Engine
      org.eclipse.jdt.internal.codeassist.CompletionEngine

CompletionEngine
final public class CompletionEngine extends Engine implements ISearchRequestor,TypeConstants,TerminalTokens,RelevanceConstants,SuffixConstants(Code)
This class is the entry point for source completions. It contains two public APIs used to call CodeAssist on a given source with a given environment, assisting position and storage (and possibly options).

Inner Class :public class CompletionProblemFactory extends DefaultProblemFactory

Field Summary
final static  BaseTypeBinding[]BASE_TYPES
    
final static  intBASE_TYPES_LENGTH
    
final static  intBASE_TYPES_WITHOUT_VOID_LENGTH
    
final static  char[][]BASE_TYPE_NAMES
    
final static  char[][]BASE_TYPE_NAMES_WITHOUT_VOID
    
public static  booleanDEBUG
    
static  InvocationSiteFakeInvocationSite
    
final public static  booleanNO_TYPE_COMPLETION_ON_EMPTY_TOKEN
    
public static  booleanPERF
    
final static  char[]THIS
    
final static  char[]THROWS
    
 booleanassistNodeCanBeSingleMemberAnnotation
    
 intassistNodeInJavadoc
    
 booleanassistNodeIsAnnotation
    
 booleanassistNodeIsClass
    
 booleanassistNodeIsConstructor
    
 booleanassistNodeIsEnum
    
 booleanassistNodeIsException
    
 booleanassistNodeIsInterface
    
 booleanassistNodeIsSuperType
    
final static  char[]classField
    
final static  char[]cloneMethod
    
 char[]completionToken
    
 TypeBinding[]expectedTypes
    
 intexpectedTypesFilter
    
 intexpectedTypesPtr
    
 ImportBinding[]favoriteReferenceBindings
    
 char[]fileName
    
 Binding[]forbbidenBindings
    
 intforbbidenBindingsFilter
    
 intforbbidenBindingsPtr
    
 booleanhasJavaLangObjectAsExpectedType
    
 booleaninsideQualifiedReference
    
 IJavaProjectjavaProject
    
 intjavadocTagPosition
    
 HashtableOfObjectknownPkgs
    
 HashtableOfObjectknownTypes
    
final static  char[]lengthField
    
 ScannernameScanner
    
 booleannoProposal
    
 CompletionParserparser
    
 CategorizedProblemproblem
    
 CompletionProblemFactoryproblemFactory
    
 ProblemReporterproblemReporter
    
 char[]qualifiedCompletionToken
    
 CompletionRequestorrequestor
    
 booleanresolvingImports
    
 booleanresolvingStaticImports
    
 char[]source
    
 intstartPositionactualCompletionPositionendPositionoffset
    
 longtargetedElement
    
public  HashtableOfObjecttypeCache
    
 Binding[]uninterestingBindings
    
 intuninterestingBindingsPtr
    

Constructor Summary
public  CompletionEngine(SearchableEnvironment nameEnvironment, CompletionRequestor requestor, Map settings, IJavaProject javaProject)
     The CompletionEngine is responsible for computing source completions.

Method Summary
public  voidacceptPackage(char[] packageName)
     One result of the search consists of a new package.
public  voidacceptType(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, int modifiers, AccessRestriction accessRestriction)
     One result of the search consists of a new type.
public  voidacceptUnresolvedName(char[] name)
    
public  voidcomplete(IType type, char[] snippet, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic)
    
public  voidcomplete(ICompilationUnit sourceUnit, int completionPosition, int pos)
     Ask the engine to compute a completion at the specified position of the given compilation unit. No return completion results are answered through a requestor.
Parameters:
  sourceUnit - org.eclipse.jdt.internal.compiler.env.ICompilationUnitthe source of the current compilation unit.
Parameters:
  completionPosition - inta position in the source where the completion is taking place.
 intcomputeBaseRelevance()
    
 intcomputeRelevanceForCaseMatching(char[] token, char[] proposalName)
    
 intcomputeRelevanceForInterestingProposal()
    
 intcomputeRelevanceForQualification(boolean prefixRequired)
    
 intcomputeRelevanceForResolution()
    
 intcomputeRelevanceForResolution(boolean isResolved)
    
 intcomputeRelevanceForRestrictions(int accessRuleKind)
    
public static  char[]createMethodSignature(char[][] parameterPackageNames, char[][] parameterTypeNames, char[] returnPackagename, char[] returnTypeName)
    
public static  char[]createMethodSignature(char[][] parameterPackageNames, char[][] parameterTypeNames, char[] returnTypeSignature)
    
public static  char[]createNonGenericTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName)
    
protected  CompletionProposalcreateProposal(int kind, int completionOffset)
    
public static  char[]createTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName)
    
protected  voidfindFieldsAndMethods(char[] token, TypeBinding receiverType, Scope scope, InvocationSite invocationSite, Scope invocationScope, boolean implicitCall, boolean superCall, Binding[] missingElements, int[] missingElementsStarts, int[] missingElementsEnds, boolean missingElementsHaveProblems)
    
public  AssistParsergetParser()
    
protected  booleanhasPossibleAnnotationTarget(TypeBinding typeBinding, Scope scope)
    
protected  voidprintDebug(CategorizedProblem error)
    
protected  voidprintDebug(CompletionProposal proposal)
    
protected  voidreset()
    

Field Detail
BASE_TYPES
final static BaseTypeBinding[] BASE_TYPES(Code)



BASE_TYPES_LENGTH
final static int BASE_TYPES_LENGTH(Code)



BASE_TYPES_WITHOUT_VOID_LENGTH
final static int BASE_TYPES_WITHOUT_VOID_LENGTH(Code)



BASE_TYPE_NAMES
final static char[][] BASE_TYPE_NAMES(Code)



BASE_TYPE_NAMES_WITHOUT_VOID
final static char[][] BASE_TYPE_NAMES_WITHOUT_VOID(Code)



DEBUG
public static boolean DEBUG(Code)



FakeInvocationSite
static InvocationSite FakeInvocationSite(Code)



NO_TYPE_COMPLETION_ON_EMPTY_TOKEN
final public static boolean NO_TYPE_COMPLETION_ON_EMPTY_TOKEN(Code)



PERF
public static boolean PERF(Code)



THIS
final static char[] THIS(Code)



THROWS
final static char[] THROWS(Code)



assistNodeCanBeSingleMemberAnnotation
boolean assistNodeCanBeSingleMemberAnnotation(Code)



assistNodeInJavadoc
int assistNodeInJavadoc(Code)



assistNodeIsAnnotation
boolean assistNodeIsAnnotation(Code)



assistNodeIsClass
boolean assistNodeIsClass(Code)



assistNodeIsConstructor
boolean assistNodeIsConstructor(Code)



assistNodeIsEnum
boolean assistNodeIsEnum(Code)



assistNodeIsException
boolean assistNodeIsException(Code)



assistNodeIsInterface
boolean assistNodeIsInterface(Code)



assistNodeIsSuperType
boolean assistNodeIsSuperType(Code)



classField
final static char[] classField(Code)



cloneMethod
final static char[] cloneMethod(Code)



completionToken
char[] completionToken(Code)



expectedTypes
TypeBinding[] expectedTypes(Code)



expectedTypesFilter
int expectedTypesFilter(Code)



expectedTypesPtr
int expectedTypesPtr(Code)



favoriteReferenceBindings
ImportBinding[] favoriteReferenceBindings(Code)



fileName
char[] fileName(Code)



forbbidenBindings
Binding[] forbbidenBindings(Code)



forbbidenBindingsFilter
int forbbidenBindingsFilter(Code)



forbbidenBindingsPtr
int forbbidenBindingsPtr(Code)



hasJavaLangObjectAsExpectedType
boolean hasJavaLangObjectAsExpectedType(Code)



insideQualifiedReference
boolean insideQualifiedReference(Code)



javaProject
IJavaProject javaProject(Code)



javadocTagPosition
int javadocTagPosition(Code)



knownPkgs
HashtableOfObject knownPkgs(Code)



knownTypes
HashtableOfObject knownTypes(Code)



lengthField
final static char[] lengthField(Code)



nameScanner
Scanner nameScanner(Code)



noProposal
boolean noProposal(Code)



parser
CompletionParser parser(Code)



problem
CategorizedProblem problem(Code)



problemFactory
CompletionProblemFactory problemFactory(Code)



problemReporter
ProblemReporter problemReporter(Code)



qualifiedCompletionToken
char[] qualifiedCompletionToken(Code)



requestor
CompletionRequestor requestor(Code)



resolvingImports
boolean resolvingImports(Code)



resolvingStaticImports
boolean resolvingStaticImports(Code)



source
char[] source(Code)



startPositionactualCompletionPositionendPositionoffset
int startPositionactualCompletionPositionendPositionoffset(Code)



targetedElement
long targetedElement(Code)



typeCache
public HashtableOfObject typeCache(Code)



uninterestingBindings
Binding[] uninterestingBindings(Code)



uninterestingBindingsPtr
int uninterestingBindingsPtr(Code)




Constructor Detail
CompletionEngine
public CompletionEngine(SearchableEnvironment nameEnvironment, CompletionRequestor requestor, Map settings, IJavaProject javaProject)(Code)
The CompletionEngine is responsible for computing source completions. It requires a searchable name environment, which supports some specific search APIs, and a requestor to feed back the results to a UI.
Parameters:
  nameEnvironment - org.eclipse.jdt.internal.codeassist.ISearchableNameEnvironmentused to resolve type/package references and search for types/packagesbased on partial names.
Parameters:
  requestor - org.eclipse.jdt.internal.codeassist.ICompletionRequestorsince the engine might produce answers of various forms, the engine is associated with a requestor able to accept all possible completions.
Parameters:
  settings - java.util.Mapset of options used to configure the code assist engine.




Method Detail
acceptPackage
public void acceptPackage(char[] packageName)(Code)
One result of the search consists of a new package. NOTE - All package names are presented in their readable form: Package names are in the form "a.b.c". The default package is represented by an empty array.



acceptType
public void acceptType(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, int modifiers, AccessRestriction accessRestriction)(Code)
One result of the search consists of a new type. NOTE - All package and type names are presented in their readable form: Package names are in the form "a.b.c". Nested type names are in the qualified form "A.I". The default package is represented by an empty array.



acceptUnresolvedName
public void acceptUnresolvedName(char[] name)(Code)



complete
public void complete(IType type, char[] snippet, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic)(Code)



complete
public void complete(ICompilationUnit sourceUnit, int completionPosition, int pos)(Code)
Ask the engine to compute a completion at the specified position of the given compilation unit. No return completion results are answered through a requestor.
Parameters:
  sourceUnit - org.eclipse.jdt.internal.compiler.env.ICompilationUnitthe source of the current compilation unit.
Parameters:
  completionPosition - inta position in the source where the completion is taking place. This position is relative to the source provided.



computeBaseRelevance
int computeBaseRelevance()(Code)



computeRelevanceForCaseMatching
int computeRelevanceForCaseMatching(char[] token, char[] proposalName)(Code)



computeRelevanceForInterestingProposal
int computeRelevanceForInterestingProposal()(Code)



computeRelevanceForQualification
int computeRelevanceForQualification(boolean prefixRequired)(Code)



computeRelevanceForResolution
int computeRelevanceForResolution()(Code)



computeRelevanceForResolution
int computeRelevanceForResolution(boolean isResolved)(Code)



computeRelevanceForRestrictions
int computeRelevanceForRestrictions(int accessRuleKind)(Code)



createMethodSignature
public static char[] createMethodSignature(char[][] parameterPackageNames, char[][] parameterTypeNames, char[] returnPackagename, char[] returnTypeName)(Code)



createMethodSignature
public static char[] createMethodSignature(char[][] parameterPackageNames, char[][] parameterTypeNames, char[] returnTypeSignature)(Code)



createNonGenericTypeSignature
public static char[] createNonGenericTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName)(Code)



createProposal
protected CompletionProposal createProposal(int kind, int completionOffset)(Code)



createTypeSignature
public static char[] createTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName)(Code)



findFieldsAndMethods
protected void findFieldsAndMethods(char[] token, TypeBinding receiverType, Scope scope, InvocationSite invocationSite, Scope invocationScope, boolean implicitCall, boolean superCall, Binding[] missingElements, int[] missingElementsStarts, int[] missingElementsEnds, boolean missingElementsHaveProblems)(Code)



getParser
public AssistParser getParser()(Code)



hasPossibleAnnotationTarget
protected boolean hasPossibleAnnotationTarget(TypeBinding typeBinding, Scope scope)(Code)



printDebug
protected void printDebug(CategorizedProblem error)(Code)



printDebug
protected void printDebug(CompletionProposal proposal)(Code)



reset
protected void reset()(Code)



Fields inherited from org.eclipse.jdt.internal.codeassist.impl.Engine
public CompilerOptions compilerOptions(Code)(Java Doc)
public char[] currentPackageName(Code)(Java Doc)
public boolean discouragedReferenceIsError(Code)(Java Doc)
public boolean forbiddenReferenceIsError(Code)(Java Doc)
public int importCacheCount(Code)(Java Doc)
public boolean importCachesInitialized(Code)(Java Doc)
public char[][][] importsCache(Code)(Java Doc)
public LookupEnvironment lookupEnvironment(Code)(Java Doc)
public SearchableEnvironment nameEnvironment(Code)(Java Doc)
public int onDemandImportCacheCount(Code)(Java Doc)
public ImportBinding[] onDemandImportsCache(Code)(Java Doc)
public AssistOptions options(Code)(Java Doc)
protected CompilationUnitScope unitScope(Code)(Java Doc)

Methods inherited from org.eclipse.jdt.internal.codeassist.impl.Engine
public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction)(Code)(Java Doc)
public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction)(Code)(Java Doc)
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction)(Code)(Java Doc)
abstract public AssistParser getParser()(Code)(Java Doc)
public static char[] getSignature(Binding binding)(Code)(Java Doc)
public static char[][] getSignatures(Binding[] bindings)(Code)(Java Doc)
public static char[] getTypeSignature(TypeBinding typeBinding)(Code)(Java Doc)
public void initializeImportCaches()(Code)(Java Doc)
protected boolean mustQualifyType(char[] packageName, char[] typeName, char[] enclosingTypeNames, int modifiers)(Code)(Java Doc)
protected ASTNode parseBlockStatements(CompilationUnitDeclaration unit, int position)(Code)(Java Doc)
protected void reset()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.