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 183820 Details for
Bug 329671
Regression: arg0,1,2... parameter names are cached
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch with test
bug_329671.txt (text/plain), 3.78 KB, created by
Jay Arthanareeswaran
on 2010-11-25 01:08:07 EST
(
hide
)
Description:
Patch with test
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2010-11-25 01:08:07 EST
Size:
3.78 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/BinaryMethod.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryMethod.java,v >retrieving revision 1.107 >diff -u -r1.107 BinaryMethod.java >--- model/org/eclipse/jdt/internal/core/BinaryMethod.java 7 Sep 2010 03:17:29 -0000 1.107 >+++ model/org/eclipse/jdt/internal/core/BinaryMethod.java 25 Nov 2010 05:59:00 -0000 >@@ -302,8 +302,8 @@ > return this.parameterNames = names; > } > } >- // if still no parameter names, produce fake ones >- return this.parameterNames = getRawParameterNames(paramCount); >+ // If still no parameter names, produce fake ones, but don't cache them (https://bugs.eclipse.org/bugs/show_bug.cgi?id=329671) >+ return getRawParameterNames(paramCount); > } > private char[][] splitParameters(char[] parametersSource, int paramCount) { > // we have generic types as one of the parameter types >#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.233 >diff -u -r1.233 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 24 Nov 2010 16:56:38 -0000 1.233 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 25 Nov 2010 05:59:04 -0000 >@@ -21856,4 +21856,54 @@ > "myString1[LOCAL_VARIABLE_REF]{myString1, null, Ljava.lang.String;, myString1, null, " + (R_NON_STATIC + R_UNQUALIFIED + R_CASE + R_NON_RESTRICTED + R_EXACT_EXPECTED_TYPE) + "}", > requestor.getResults()); > } >+public void testBug329671() throws CoreException, IOException { >+ System.out.println("Test testBug329671"); >+ Map options = this.currentProject.getOptions(false); >+ Object timeout = options.get(JavaCore.TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC); >+ options.put(JavaCore.TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC, "1"); //$NON-NLS-1$ >+ this.currentProject.setOptions(options); >+ >+ try { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/p/Test.java", >+ "package p;"+ >+ "public class Test {\n" + >+ " void foo(bug.X x) {\n" + >+ " x.fo\n" + >+ " }\n" + >+ "}\n"); >+ >+ addLibrary( >+ "Completion", >+ "bug329671.jar", >+ null, >+ "bug329671_doc.zip", >+ false); >+ >+ try { >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "x.fo"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ assertResults("foo[METHOD_REF]{foo(), Lbug.X;, (Ljava.lang.Object;)V, foo, (arg0), 35}", requestor.getResults()); >+ //The previous attempt would have already kicked off the Javadoc fetching. Small delay to allow it to complete. >+ try { >+ Thread.sleep(2000); >+ }catch (InterruptedException ie) { >+ } >+ options.put(JavaCore.TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC, "2000"); //$NON-NLS-1$ >+ requestor = new CompletionTestsRequestor2(true); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ assertResults("foo[METHOD_REF]{foo(), Lbug.X;, (Ljava.lang.Object;)V, foo, (param), 35}", requestor.getResults()); >+ } finally { >+ removeLibrary("Completion", "bug329671.jar"); >+ } >+ } finally { >+ options.put(JavaCore.TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC, timeout); >+ this.currentProject.setOptions(options); >+ } >+} > }
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 329671
:
183576
|
183820
|
183821
|
183835
|
184103
|
184122
|
184129