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 182731 Details for
Bug 329288
Fetching parameter names literally hangs on a class with a lot of methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed fix v1.0
patch329288.txt (text/plain), 3.76 KB, created by
Ayushman Jain
on 2010-11-09 11:31:55 EST
(
hide
)
Description:
proposed fix v1.0
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2010-11-09 11:31:55 EST
Size:
3.76 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/core/compiler/CharOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java,v >retrieving revision 1.88 >diff -u -r1.88 CharOperation.java >--- compiler/org/eclipse/jdt/core/compiler/CharOperation.java 9 Aug 2010 09:43:40 -0000 1.88 >+++ compiler/org/eclipse/jdt/core/compiler/CharOperation.java 9 Nov 2010 16:17:00 -0000 >@@ -2962,6 +2962,63 @@ > } > > /** >+ * Answers true if the given name, starting from the given index, starts with the given prefix, >+ * false otherwise. isCaseSensitive is used to find out whether or not the comparison should be >+ * case sensitive. >+ * <br> >+ * <br> >+ * For example: >+ * <ol> >+ * <li><pre> >+ * prefix = { 'a' , 'B' } >+ * name = { 'c', 'd', 'a' , 'b', 'b', 'a', 'b', 'a' } >+ * startIndex = 2 >+ * isCaseSensitive = false >+ * result => true >+ * </pre> >+ * </li> >+ * <li><pre> >+ * prefix = { 'a' , 'B' } >+ * name = { 'c', 'd', 'a' , 'b', 'b', 'a', 'b', 'a' } >+ * startIndex = 2 >+ * isCaseSensitive = true >+ * result => false >+ * </pre> >+ * </li> >+ * </ol> >+ * >+ * @param prefix the given prefix >+ * @param name the given name >+ * @param isCaseSensitive to find out whether or not the comparison should be case sensitive >+ * @param startIndex index from which the prefix should be searched in the name >+ * @return true if the given name starts with the given prefix, false otherwise >+ * @throws NullPointerException if the given name is null or if the given prefix is null >+ * @since 3.7 >+ */ >+public static final boolean prefixEquals( >+ char[] prefix, >+ char[] name, >+ boolean isCaseSensitive, >+ int startIndex) { >+ >+ int max = prefix.length; >+ if (name.length - startIndex < max) >+ return false; >+ if (isCaseSensitive) { >+ for (int i = max; --i >= 0;) // assumes the prefix is not larger than the name >+ if (prefix[i] != name[startIndex + i]) >+ return false; >+ return true; >+ } >+ >+ for (int i = max; --i >= 0;) // assumes the prefix is not larger than the name >+ if (ScannerHelper.toLowerCase(prefix[i]) >+ != ScannerHelper.toLowerCase(name[startIndex + i])) >+ return false; >+ return true; >+} >+ >+/** > * Answers a new array removing a given character. Answers the given array if there is > * no occurrence of the character to remove. > * <br> >Index: model/org/eclipse/jdt/internal/core/JavadocContents.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java,v >retrieving revision 1.3 >diff -u -r1.3 JavadocContents.java >--- model/org/eclipse/jdt/internal/core/JavadocContents.java 9 Aug 2010 09:43:40 -0000 1.3 >+++ model/org/eclipse/jdt/internal/core/JavadocContents.java 9 Nov 2010 16:17:00 -0000 >@@ -145,7 +145,7 @@ > for (int i = 0; i < this.tempAnchorIndexesCount; i++) { > int anchorEndStart = this.tempAnchorIndexes[i]; > >- if (anchorEndStart != -1 && CharOperation.indexOf(anchor, this.content, false, anchorEndStart) == anchorEndStart) { >+ if (anchorEndStart != -1 && CharOperation.prefixEquals(anchor, this.content, false, anchorEndStart)) { > > this.tempAnchorIndexes[i] = -1; > >@@ -165,7 +165,7 @@ > > this.tempLastAnchorFoundIndex = anchorEndStart; > >- if (CharOperation.indexOf(anchor, this.content, false, anchorEndStart) == anchorEndStart) { >+ if (CharOperation.prefixEquals(anchor, this.content, false, anchorEndStart)) { > return computeChildRange(anchorEndStart, anchor, indexOfSectionBottom); > } else { > if (this.tempAnchorIndexes.length == this.tempAnchorIndexesCount) {
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 329288
:
182229
|
182230
|
182237
|
182238
|
182239
|
182241
|
182242
|
182244
|
182438
|
182439
|
182731
|
183264
|
183385
|
186898