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 106818 Details for
Bug 101610
Code assist not offered without transitive dependency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated patch
bug101610_002.txt (text/plain), 9.40 KB, created by
David Audel
on 2008-07-08 09:18:20 EDT
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
David Audel
Created:
2008-07-08 09:18:20 EDT
Size:
9.40 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.370 >diff -u -r1.370 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 27 Jun 2008 16:04:03 -0000 1.370 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 8 Jul 2008 13:15:28 -0000 >@@ -2540,6 +2540,7 @@ > } catch (CompletionNodeFound e) { > // completionNodeFound = true; > if (e.astNode != null) { >+ // if null then we found a problem in the completion node > if(DEBUG) { > System.out.print("COMPLETION - Completion node : "); //$NON-NLS-1$ > System.out.println(e.astNode.toString()); >@@ -2548,7 +2549,7 @@ > System.out.println(this.parser.assistNodeParent); > } > } >- // if null then we found a problem in the completion node >+ this.lookupEnvironment.unitBeingCompleted = parsedUnit; // better resilient to further error reporting > contextAccepted = > complete( > e.astNode, >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/JavadocTypeCompletionModelTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavadocTypeCompletionModelTest.java,v >retrieving revision 1.16 >diff -u -r1.16 JavadocTypeCompletionModelTest.java >--- src/org/eclipse/jdt/core/tests/model/JavadocTypeCompletionModelTest.java 27 Jun 2008 16:02:38 -0000 1.16 >+++ src/org/eclipse/jdt/core/tests/model/JavadocTypeCompletionModelTest.java 8 Jul 2008 13:15:32 -0000 >@@ -340,7 +340,9 @@ > assertSortedResults( > "Bin1[TYPE_REF]{pack.Bin1, pack, Lpack.Bin1;, null, null, "+this.positions+R_DRICQNR+"}\n" + > "Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DRICQNR+"}\n" + >- "Bin3[TYPE_REF]{pack.Bin3, pack, Lpack.Bin3;, null, null, "+this.positions+R_DRICQNR+"}" >+ "Bin3[TYPE_REF]{pack.Bin3, pack, Lpack.Bin3;, null, null, "+this.positions+R_DRICQNR+"}\n" + >+ "Bin4[TYPE_REF]{pack.Bin4, pack, Lpack.Bin4;, null, null, "+this.positions+R_DRICQNR+"}\n" + >+ "Bin5[TYPE_REF]{pack.Bin5, pack, Lpack.Bin5;, null, null, "+this.positions+R_DRICQNR+"}" > ); > } > >@@ -357,7 +359,9 @@ > assertSortedResults( > "Bin1[TYPE_REF]{pack.Bin1, pack, Lpack.Bin1;, null, null, "+this.positions+R_DRICQNR+"}\n" + > "Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DRICQNR+"}\n" + >- "Bin3[TYPE_REF]{pack.Bin3, pack, Lpack.Bin3;, null, null, "+this.positions+R_DRICQNR+"}" >+ "Bin3[TYPE_REF]{pack.Bin3, pack, Lpack.Bin3;, null, null, "+this.positions+R_DRICQNR+"}\n" + >+ "Bin4[TYPE_REF]{pack.Bin4, pack, Lpack.Bin4;, null, null, "+this.positions+R_DRICQNR+"}\n" + >+ "Bin5[TYPE_REF]{pack.Bin5, pack, Lpack.Bin5;, null, null, "+this.positions+R_DRICQNR+"}" > ); > } > >Index: src/org/eclipse/jdt/core/tests/model/JavadocFieldCompletionModelTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavadocFieldCompletionModelTest.java,v >retrieving revision 1.13 >diff -u -r1.13 JavadocFieldCompletionModelTest.java >--- src/org/eclipse/jdt/core/tests/model/JavadocFieldCompletionModelTest.java 27 Jun 2008 16:02:40 -0000 1.13 >+++ src/org/eclipse/jdt/core/tests/model/JavadocFieldCompletionModelTest.java 8 Jul 2008 13:15:32 -0000 >@@ -270,7 +270,9 @@ > assertSortedResults( > "Bin1[TYPE_REF]{pack.Bin1, pack, Lpack.Bin1;, null, null, "+this.positions+R_DRICQNR+"}\n" + > "Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DRICQNR+"}\n" + >- "Bin3[TYPE_REF]{pack.Bin3, pack, Lpack.Bin3;, null, null, "+this.positions+R_DRICQNR+"}" >+ "Bin3[TYPE_REF]{pack.Bin3, pack, Lpack.Bin3;, null, null, "+this.positions+R_DRICQNR+"}\n" + >+ "Bin4[TYPE_REF]{pack.Bin4, pack, Lpack.Bin4;, null, null, "+this.positions+R_DRICQNR+"}\n" + >+ "Bin5[TYPE_REF]{pack.Bin5, pack, Lpack.Bin5;, null, null, "+this.positions+R_DRICQNR+"}" > ); > } > >Index: src/org/eclipse/jdt/core/tests/model/JavadocPackageCompletionModelTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavadocPackageCompletionModelTest.java,v >retrieving revision 1.14 >diff -u -r1.14 JavadocPackageCompletionModelTest.java >--- src/org/eclipse/jdt/core/tests/model/JavadocPackageCompletionModelTest.java 27 Jun 2008 16:02:40 -0000 1.14 >+++ src/org/eclipse/jdt/core/tests/model/JavadocPackageCompletionModelTest.java 8 Jul 2008 13:15:32 -0000 >@@ -284,7 +284,9 @@ > assertSortedResults( > "Bin1[TYPE_REF]{pack.Bin1, pack, Lpack.Bin1;, null, null, "+this.positions+R_DRICQNR+"}\n" + > "Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DRICQNR+"}\n" + >- "Bin3[TYPE_REF]{pack.Bin3, pack, Lpack.Bin3;, null, null, "+this.positions+R_DRICQNR+"}" >+ "Bin3[TYPE_REF]{pack.Bin3, pack, Lpack.Bin3;, null, null, "+this.positions+R_DRICQNR+"}\n" + >+ "Bin4[TYPE_REF]{pack.Bin4, pack, Lpack.Bin4;, null, null, "+this.positions+R_DRICQNR+"}\n" + >+ "Bin5[TYPE_REF]{pack.Bin5, pack, Lpack.Bin5;, null, null, "+this.positions+R_DRICQNR+"}" > ); > } > >Index: src/org/eclipse/jdt/core/tests/model/CompletionTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java,v >retrieving revision 1.184 >diff -u -r1.184 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 27 Jun 2008 16:02:40 -0000 1.184 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 8 Jul 2008 13:15:32 -0000 >@@ -13462,6 +13462,7 @@ > cu.codeComplete(cursorLocation, requestor); > > assertEquals( >+ "element:bar completion:bar relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC+ R_NON_RESTRICTED) +"\n"+ > "element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), > requestor.getResults()); > } >@@ -13475,6 +13476,7 @@ > cu.codeComplete(cursorLocation, requestor); > > assertEquals( >+ "element:bar completion:bar() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC+ R_NON_RESTRICTED) +"\n"+ > "element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), > requestor.getResults()); > } >@@ -13488,9 +13490,52 @@ > cu.codeComplete(cursorLocation, requestor); > > assertEquals( >+ "element:bar completion:bar() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC+ R_NON_RESTRICTED) +"\n"+ > "element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), > requestor.getResults()); > } >+public void testCompletionUnresolvedSuperclass() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ "package test;"+ >+ "public class Test {\n" + >+ " public void foo(pack.Bin4 b) {\n" + >+ " b.bar\n" + >+ " }\n" + >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "bar"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "barPlus[METHOD_REF]{barPlus(), Lpack.Bin4;, ()V, barPlus, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} >+public void testCompletionUnresolvedSuperinteface() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ "package test;"+ >+ "public class Test {\n" + >+ " public void foo(pack.Bin5 b) {\n" + >+ " b.bar\n" + >+ " }\n" + >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "bar"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "barPlus[METHOD_REF]{barPlus(), Lpack.Bin5;, ()V, barPlus, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} > public void testCompletionVariableInitializerInInitializer1() throws JavaModelException { > CompletionTestsRequestor requestor = new CompletionTestsRequestor(); > ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer1.java"); >Index: workspace/Completion/pack.jar >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/workspace/Completion/pack.jar,v >retrieving revision 1.1 >diff -u -r1.1 pack.jar >Binary files /tmp/cvsng78qb and pack.jar differ
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 101610
:
102371
|
102375
| 106818 |
106823