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 179038 Details for
Bug 312603
[content assist] field being declared is proposed as a method argument inside initialization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
fix for comment 11 + test
patch312603.txt (text/plain), 5.31 KB, created by
Ayushman Jain
on 2010-09-16 11:20:21 EDT
(
hide
)
Description:
fix for comment 11 + test
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2010-09-16 11:20:21 EDT
Size:
5.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java,v >retrieving revision 1.19 >diff -u -r1.19 InternalExtendedCompletionContext.java >--- codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java 10 Sep 2010 07:24:55 -0000 1.19 >+++ codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java 16 Sep 2010 15:09:31 -0000 >@@ -195,6 +195,15 @@ > if (this.visibleFields.size > 0 && this.visibleFields.contains(fieldDeclaration.binding)) { > this.visibleFields.remove(fieldDeclaration.binding); > } >+ int count = 0; >+ while (count < this.visibleFields.size) { >+ FieldBinding visibleField = (FieldBinding)this.visibleFields.elementAt(count); >+ if (visibleField.id > fieldDeclaration.binding.id) { >+ this.visibleFields.remove(visibleField); >+ continue; >+ } >+ count++; >+ } > break done; > } > /*(Incase fieldDeclaration != null is not sufficient to infer that >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/CompletionContextTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionContextTests.java,v >retrieving revision 1.19 >diff -u -r1.19 CompletionContextTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionContextTests.java 10 Sep 2010 07:24:58 -0000 1.19 >+++ src/org/eclipse/jdt/core/tests/model/CompletionContextTests.java 16 Sep 2010 15:09:34 -0000 >@@ -5425,4 +5425,53 @@ > "}", > result.context); > } >+ >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=312603 >+public void test0177() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[3]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src3/test/X.java", >+ "package test;\n" + >+ "import java.text.MessageFormat;\n" + >+ "public class X {\n" + >+ " String fooBar = \"Hi\";" + >+ " String furchtbar= MessageFormat.format\n" + >+ " String abc1 = \"Hi\";" + >+ " String abc2 = \"Hi\";" + >+ " String abc3 = \"Hi\";" + >+ " String abc4 = \"Hi\";" + >+ "}"); >+ >+ String str = this.workingCopies[0].getSource(); >+ int tokenStart = str.lastIndexOf("format"); >+ int tokenEnd = tokenStart + "format".length() - 1; >+ int cursorLocation = str.lastIndexOf("format") + "format".length(); >+ >+ CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation, true, true); >+ String jclPath = getExternalJCLPathString(); >+ assertResults( >+ "completion offset="+(cursorLocation)+"\n" + >+ "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" + >+ "completion token=\"format\"\n" + >+ "completion token kind=TOKEN_KIND_NAME\n" + >+ "expectedTypesSignatures={Ljava.lang.String;}\n" + >+ "expectedTypesKeys={Ljava/lang/String;}\n" + >+ "completion token location=UNKNOWN\n" + >+ "enclosingElement=furchtbar {key=Ltest/X;.furchtbar)Ljava/lang/String;} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]]\n" + >+ "visibleElements={\n" + >+ " fooBar {key=Ltest/X;.fooBar)Ljava/lang/String;} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]],\n" + >+ " wait(long, int) {key=Ljava/lang/Object;.wait(JI)V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " wait(long) {key=Ljava/lang/Object;.wait(J)V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " wait() {key=Ljava/lang/Object;.wait()V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " toString() {key=Ljava/lang/Object;.toString()Ljava/lang/String;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " notifyAll() {key=Ljava/lang/Object;.notifyAll()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " notify() {key=Ljava/lang/Object;.notify()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " hashCode() {key=Ljava/lang/Object;.hashCode()I} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " getClass() {key=Ljava/lang/Object;.getClass()Ljava/lang/Class;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + >+ " finalize() {key=Ljava/lang/Object;.finalize()V|Ljava/lang/Throwable;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " equals(java.lang.Object) {key=Ljava/lang/Object;.equals(Ljava/lang/Object;)Z} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + >+ " clone() {key=Ljava/lang/Object;.clone()Ljava/lang/Object;|Ljava/lang/CloneNotSupportedException;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + >+ "}", >+ result.context); >+} > }
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 312603
:
168330
|
168752
|
178587
|
179038
|
179380