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 107713 Details for
Bug 169682
In class that compiles and runs when ctrl+space is pressed I get "No completions available"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
bug169682_003.txt (text/plain), 7.42 KB, created by
David Audel
on 2008-07-17 05:55:50 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2008-07-17 05:55:50 EDT
Size:
7.42 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >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.185 >diff -u -r1.185 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 8 Jul 2008 13:29:10 -0000 1.185 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 17 Jul 2008 09:55:02 -0000 >@@ -163,6 +163,150 @@ > } > } > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=169682 >+public void testBug169682a() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ >+ String source = >+ "package test;\n"+ >+ "\n"+ >+ "public class Test \n"+ >+ "{\n"+ >+ " public Test() \n"+ >+ " {\n"+ >+ " this.t// do ctrl+space here\n"+ >+ " }\n"+ >+ "\n"+ >+ " Object field = new Object() \n"+ >+ " {\n"+ >+ " public void foo() {\n"+ >+ "\n"+ >+ " if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {}\n"+ >+ " else if(true)\n"+ >+ " {\n"+ >+ " if(true)\n"+ >+ " {\n"+ >+ " if(true)\n"+ >+ " {\n"+ >+ " boolean result[][];\n"+ >+ " }\n"+ >+ " }\n"+ >+ " } \n"+ >+ " }\n"+ >+ " }; \n"+ >+ "}"; >+ >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ source); >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "this.t"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "toString[METHOD_REF]{toString(), Ljava.lang.Object;, ()Ljava.lang.String;, toString, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=169682 >+public void testBug169682b() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ >+ String source = >+ "package test;\n"+ >+ "public class Test\n"+ >+ "{\n"+ >+ " #\n"+ >+ " int[] i;\n"+ >+ " Obj x; // do ctrl+space at |\n"+ >+ "}"; >+ >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ source); >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "Obj"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "Obj[POTENTIAL_METHOD_DECLARATION]{Obj, Ltest.Test;, ()V, Obj, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}\n" + >+ "Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=102572 > public void testCamelCaseField1() throws JavaModelException { > this.oldOptions = JavaCore.getOptions(); >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java,v >retrieving revision 1.195 >diff -u -r1.195 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 27 Jun 2008 16:03:58 -0000 1.195 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 17 Jul 2008 09:55:06 -0000 >@@ -2221,11 +2221,10 @@ > > boolean isLocalDeclaration = this.nestedMethod[this.nestedType] != 0; > int variableIndex = this.variablesCounter[this.nestedType]; >- int extendedDimension = this.intStack[this.intPtr + 1]; > > this.hasUnusedModifiers = false; > >- if(isLocalDeclaration || indexOfAssistIdentifier() < 0 || variableIndex != 0 || extendedDimension != 0) { >+ if(isLocalDeclaration || indexOfAssistIdentifier() < 0 || variableIndex != 0) { > this.identifierPtr++; > this.identifierLengthPtr++; >
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 169682
:
56452
|
100882
| 107713