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 55756 Details for
Bug 167750
[content assist] From some point in time Eclipse crashes on code completion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix for 3.2.2
bug167750_001_32.txt (text/plain), 4.69 KB, created by
David Audel
on 2006-12-15 09:08:47 EST
(
hide
)
Description:
Proposed fix for 3.2.2
Filename:
MIME Type:
Creator:
David Audel
Created:
2006-12-15 09:08:47 EST
Size:
4.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.157.4.2 >diff -u -r1.157.4.2 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 20 Nov 2006 14:06:08 -0000 1.157.4.2 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 15 Dec 2006 14:05:07 -0000 >@@ -2658,8 +2658,14 @@ > case TokenNameRIGHT_SHIFT: // or fred<X<X>>[(]1, 2) > case TokenNameUNSIGNED_RIGHT_SHIFT: //or Fred<X<X<X>>>[(]1, 2) > if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SELECTOR) { >- this.pushOnElementStack(K_SELECTOR_INVOCATION_TYPE, (this.invocationType == QUALIFIED_ALLOCATION) ? QUALIFIED_ALLOCATION : ALLOCATION); >- this.pushOnElementStack(K_SELECTOR_QUALIFIER, this.qualifier); >+ if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER, 1) == K_BINARY_OPERATOR && >+ topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER, 1) == GREATER) { >+ // it's not a selector invocation >+ popElement(K_SELECTOR); >+ } else { >+ this.pushOnElementStack(K_SELECTOR_INVOCATION_TYPE, (this.invocationType == QUALIFIED_ALLOCATION) ? QUALIFIED_ALLOCATION : ALLOCATION); >+ this.pushOnElementStack(K_SELECTOR_QUALIFIER, this.qualifier); >+ } > } > this.qualifier = -1; > this.invocationType = NO_RECEIVER; >#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.122.2.1 >diff -u -r1.122.2.1 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 2 Jul 2006 10:06:40 -0000 1.122.2.1 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 15 Dec 2006 14:05:15 -0000 >@@ -11685,6 +11685,65 @@ > } > } > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=164311 >+public void testBug164311() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ "package test;"+ >+ "public class Test {\n" + >+ " public int zzzzzz;\n" + >+ " public void method1() {\n" + >+ " label : if (0> (10));\n" + >+ " zzz\n" + >+ " }\n" + >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "zzz"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "zzzzzz[FIELD_REF]{zzzzzz, Ltest.Test;, I, zzzzzz, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=164311 >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=167750 >+public void testBug164311_2() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ "package test;\n"+ >+ "public class X {\n"+ >+ " public void zork() { \n"+ >+ " } \n"+ >+ " public void foo() { \n"+ >+ " this.foo(new Object(){\n"+ >+ " public void bar() {\n"+ >+ " if (zzz>(Integer)vvv.foo(i)) {\n"+ >+ " return;\n"+ >+ " }\n"+ >+ " if (true) {\n"+ >+ " return;\n"+ >+ " }\n"+ >+ " zor\n"+ >+ " } \n"+ >+ " });\n"+ >+ " }\n"+ >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "zor"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "zork[METHOD_REF]{zork(), Ltest.X;, ()V, zork, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} > public void testCompletionImportedType1() throws JavaModelException { > this.workingCopies = new ICompilationUnit[2]; > this.workingCopies[0] = getWorkingCopy(
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 167750
:
55581
|
55582
|
55731
|
55732
| 55756