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 39679 Details for
Bug 138672
Bad code completion formatting for Collections.synchronizedMap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_138672.txt (text/plain), 3.06 KB, created by
Olivier Thomann
on 2006-04-27 11:38:40 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-04-27 11:38:40 EDT
Size:
3.06 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.88 >diff -u -r1.88 BinaryMethod.java >--- model/org/eclipse/jdt/internal/core/BinaryMethod.java 26 Apr 2006 14:41:03 -0000 1.88 >+++ model/org/eclipse/jdt/internal/core/BinaryMethod.java 27 Apr 2006 15:19:02 -0000 >@@ -25,7 +25,6 @@ > */ > > /* package */ class BinaryMethod extends BinaryMember implements IMethod { >- > /** > * The parameter type signatures of the method - stored locally > * to perform equality test. <code>null</code> indicates no >@@ -243,7 +242,7 @@ > javadocContents.substring(indexOfOpenParen + 1, indexOfClosingParen).toCharArray(), > " ".toCharArray(), //$NON-NLS-1$ > new char[] {' '}); >- final char[][] params = CharOperation.splitOn(',', paramsSource); >+ final char[][] params = splitParameters(paramsSource, paramCount); > final int paramsLength = params.length; > this.parameterNames = new String[paramsLength]; > for (int i = 0; i < paramsLength; i++) { >@@ -263,6 +262,66 @@ > // if still no parameter names, produce fake ones > return this.parameterNames = getRawParameterNames(paramCount); > } >+private char[][] splitParameters(char[] parametersSource, int paramCount) { >+ // we have generic types as one of the parameter types >+ char[][] params = new char[paramCount][]; >+ int paramIndex = 0; >+ int index = 0; >+ int balance = 0; >+ int length = parametersSource.length; >+ int start = 0; >+ while(index < length) { >+ switch (parametersSource[index]) { >+ case '<': >+ balance++; >+ index++; >+ while(index < length && parametersSource[index] != '>') { >+ index++; >+ } >+ break; >+ case '>' : >+ balance--; >+ index++; >+ break; >+ case ',' : >+ if (balance == 0 && paramIndex < paramCount) { >+ params[paramIndex++] = CharOperation.subarray(parametersSource, start, index); >+ start = index + 1; >+ } >+ index++; >+ break; >+ case '&' : >+ if ((index + 4) < length) { >+ if (parametersSource[index + 1] == 'l' >+ && parametersSource[index + 2] == 't' >+ && parametersSource[index + 3] == ';') { >+ balance++; >+ index += 4; >+ } else if (parametersSource[index + 1] == 'g' >+ && parametersSource[index + 2] == 't' >+ && parametersSource[index + 3] == ';') { >+ balance--; >+ index += 4; >+ } else { >+ index++; >+ } >+ } else { >+ index++; >+ } >+ break; >+ default: >+ index++; >+ } >+ } >+ if (paramIndex < paramCount) { >+ params[paramIndex++] = CharOperation.subarray(parametersSource, start, index); >+ } >+ if (paramIndex != paramCount) { >+ // happens only for constructors with synthetic enclosing type in the signature >+ System.arraycopy(params, 0, (params = new char[paramIndex][]), 0, paramIndex); >+ } >+ return params; >+} > /* > * @see IMethod > */
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 138672
: 39679 |
39680