Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 183654 Details for
Bug 325481
[assist] fields declared after a particular field are proposed in its initialization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
fix for next i build
patch325481.txt (text/plain), 1.92 KB, created by
Ayushman Jain
on 2010-11-23 05:17:18 EST
(
hide
)
Description:
fix for next i build
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2010-11-23 05:17:18 EST
Size:
1.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v >retrieving revision 1.421 >diff -u -r1.421 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 5 Nov 2010 13:40:19 -0000 1.421 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 23 Nov 2010 10:15:54 -0000 >@@ -5980,10 +5980,23 @@ > for (int f = fields.length; --f >=0;) { > FieldBinding field = fields[f]; > FieldDeclaration fieldDeclaration = field.sourceField(); >- if (fieldDeclaration != null && fieldDeclaration.initialization != null) { >- // We're asking for a proposal inside this field's initialization. So record its id >- fieldBeingCompletedId = field.id; >- break; >+ // We maybe asking for a proposal inside this field's initialization. So record its id >+ ASTNode astNode = this.parser.assistNode; >+ if(fieldDeclaration != null && fieldDeclaration.initialization != null && astNode != null) { >+ if (fieldDeclaration.initialization.sourceEnd > 0) { >+ if (fieldDeclaration.initialization.sourceStart <= astNode.sourceStart && >+ astNode.sourceEnd <= fieldDeclaration.initialization.sourceEnd) { >+ // completion is inside a field initializer >+ fieldBeingCompletedId = field.id; >+ break; >+ } >+ } else { // The sourceEnd may not yet be set >+ CompletionNodeDetector detector = new CompletionNodeDetector(astNode, fieldDeclaration.initialization); >+ if (detector.containsCompletionNode()) { // completion is inside a field initializer >+ fieldBeingCompletedId = field.id; >+ break; >+ } >+ } > } > } > // Inherited fields which are hidden by subclasses are filtered out
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 325481
:
179057
| 183654 |
183729
|
183833