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 74386 Details for
Bug 53727
[Tasks] longest tags should match
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_53727.txt (text/plain), 2.88 KB, created by
Olivier Thomann
on 2007-07-23 15:07:18 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-07-23 15:07:18 EDT
Size:
2.88 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/util/Util.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java,v >retrieving revision 1.62 >diff -u -r1.62 Util.java >--- compiler/org/eclipse/jdt/internal/compiler/util/Util.java 27 Apr 2007 15:51:39 -0000 1.62 >+++ compiler/org/eclipse/jdt/internal/compiler/util/Util.java 23 Jul 2007 18:49:17 -0000 >@@ -424,7 +424,37 @@ > int suffixIndex = suffixLength - i - 1; > if (c != SUFFIX_java[suffixIndex] && c != SUFFIX_JAVA[suffixIndex]) return false; > } >- return true; >+ return true; >+ } >+ >+ public static void reverseQuickSort(char[][] list, int left, int right, int[] result) { >+ int original_left= left; >+ int original_right= right; >+ char[] mid= list[(right + left) / 2]; >+ do { >+ while (CharOperation.compareTo(list[left], mid) > 0) { >+ left++; >+ } >+ while (CharOperation.compareTo(mid, list[right]) > 0) { >+ right--; >+ } >+ if (left <= right) { >+ char[] tmp= list[left]; >+ list[left]= list[right]; >+ list[right]= tmp; >+ int temp = result[left]; >+ result[left] = result[right]; >+ result[right] = temp; >+ left++; >+ right--; >+ } >+ } while (left <= right); >+ if (original_left < right) { >+ reverseQuickSort(list, original_left, right, result); >+ } >+ if (left < original_right) { >+ reverseQuickSort(list, left, original_right, result); >+ } > } > > /** >Index: compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java,v >retrieving revision 1.187 >diff -u -r1.187 Scanner.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java 17 Jul 2007 23:51:58 -0000 1.187 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java 23 Jul 2007 18:49:17 -0000 >@@ -207,9 +207,19 @@ > this.sourceLevel = sourceLevel; > this.complianceLevel = complianceLevel; > this.checkNonExternalizedStringLiterals = checkNonExternalizedStringLiterals; >- this.taskTags = taskTags; >- this.taskPriorities = taskPriorities; >- this.isTaskCaseSensitive = isTaskCaseSensitive; >+ if (taskTags != null && taskPriorities != null) { >+ int length = taskTags.length; >+ int[] initialIndexes = new int[length]; >+ for (int i = 0; i < length; i++) initialIndexes[i] = i; >+ Util.reverseQuickSort(taskTags, 0, taskTags.length - 1, initialIndexes); >+ this.taskTags = taskTags; >+ char[][] temp = new char[length][]; >+ for (int i = 0; i < length; i++) { >+ temp[i] = taskPriorities[initialIndexes[i]]; >+ } >+ this.taskPriorities = temp; >+ this.isTaskCaseSensitive = isTaskCaseSensitive; >+ } > } > > public Scanner(
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 53727
:
74386
|
74463
|
74464